def _add_abandoned_branches( self, abandoned_list, branches, working_branches, lander): for b in working_branches: rb = abdt_naming.makeReviewBranchNameFromWorkingBranch(b) if rb not in branches: working_branch = abdt_gittypes.makeGitWorkingBranch( b, self._remote) abandoned_list.append( abdt_branch.Branch( self, None, working_branch, lander, self._description))
def processAbandonedBranches(conduit, clone, remote, wbList, remote_branches): for wb in wbList: rb = abdt_naming.makeReviewBranchNameFromWorkingBranch(wb) if rb not in remote_branches: print "delete abandoned branch: " + wb.branch try: revisionid = int(wb.id) except ValueError: pass else: commenter = abdcmnt_commenter.Commenter(conduit, revisionid) commenter.abandonedBranch(rb) # TODO: abandon the associated revision if not already phlgit_push.delete(clone, wb.branch, remote)
def review_branch_name(self): """Return the string name of the branch the review is based on.""" if self._review_branch: return self._review_branch.branch return abdt_naming.makeReviewBranchNameFromWorkingBranch( self._tracking_branch)