def declareEupsTag(tag, eupsObj): """ Declare a new EUPS tag FIXME: Not sure if this is the right way to programmatically define and persist a new tag. Ask RHL. """ tags = eupsObj.tags if tag not in tags.getTagNames(): tags.registerTag(tag) tags.saveGlobalTags(eupsObj.path[0])
def declare_eups_tag(tag, eups_obj): """ Declare a new EUPS tag FIXME: Not sure if this is the right way to programmatically define and persist a new tag. Ask RHL. """ tags = eups_obj.tags if tag not in tags.getTagNames(): tag = str(tag) tags.registerTag(tag) tags.saveGlobalTags(eups_obj.path[0])
def __getBuildId(self): """Allocate the next unused EUPS tag that matches the bNNNN pattern""" tags = eups.tags.Tags() tags.loadFromEupsPath(self.eups.path) btre = re.compile('^b[0-9]+$') btags = [0] btags += [int(tag[1:]) for tag in tags.getTagNames() if btre.match(tag)] tag = "b%s" % (max(btags) + 1) return tag
def __get_build_id(self): """Allocate the next unused EUPS tag that matches the bNNNN pattern""" tags = eups.tags.Tags() tags.loadFromEupsPath(self.eups.path) btre = re.compile('^b[0-9]+$') btags = [0] btags += [ int(tag[1:]) for tag in tags.getTagNames() if btre.match(tag) ] tag = "b%s" % (max(btags) + 1) return tag