def IsChangeCommitted(self, change, dryrun=False, must_match=False): change = gob_util.GetChange(self.host, change) if not change: if must_match: raise QueryHasNoResults('Could not query for change %s' % change) return return change.get('status') == 'MERGED'
def IsChangeCommitted(self, change, must_match=False): """Check whether a gerrit change has been merged. Args: change: A gerrit change number. must_match: Raise an exception if the change is not found. If this is False, then a missing change will return None. """ change = gob_util.GetChange(self.host, change) if not change: if must_match: raise QueryHasNoResults('Could not query for change %s' % change) return return change.get('status') == 'MERGED'