Changes in mergebot/trunk/mergebot/RebranchActor.py [30:17]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mergebot/trunk/mergebot/RebranchActor.py
r30 r17 36 36 37 37 # Make sure the various urls we require do exist 38 problems = self.check_required_directories() 39 if problems: 40 return results, problems, False 38 if not SvnOps.get_branch_info(self.local_url(), logfile): 39 comment = 'Component %s does not exist in the repository.' \ 40 % self.component 41 return results, comment, False 42 if not SvnOps.get_branch_info(self.local_url() + '/branches', logfile): 43 comment = 'No directory in which to create branches for ' \ 44 'component %s in the repository.' % self.component 45 return results, comment, False 46 if not SvnOps.get_branch_info(self.baseline_local_url(), logfile): 47 comment = 'Version %s for component %s does not exist in the ' \ 48 'repository.' % (self.version, self.component) 49 return results, comment, False 41 50 42 51 rev_info = SvnOps.get_branch_info(self.branch_local_url(), logfile) … … 88 97 "Rebranch internal error: Unable to recreate the branch. %s" \ 89 98 % (instructioncomment, )), 99 (lambda x: SvnOps.checkout(self.branch_local_url(), workingcopy, x), 100 "Rebranch internal error: Unable to get working copy. %s" % \ 101 (instructioncomment, )), 90 102 ) 91 103 for cmd, error_comment in commanderrors: … … 96 108 results['mergebotstate'] = 'rebranchfailed' 97 109 return results, error_comment, False 98 99 # Check to see if there have been no commits on the branch. If there100 # have been no commits, we know we don't need to merge anything.101 if startrev == endrev:102 ticket_message = "\n".join([103 "Rebranched from %s for %s." % (self.version,104 self.requestor),105 "There were no changes to commit to the branch since there "106 "were no commits on the branch.",107 "You will need to update your working copy.",108 ])109 results['mergebotstate'] = 'branched'110 return results, ticket_message, True111 112 retval = SvnOps.checkout(self.branch_local_url(), workingcopy, logfile)113 if retval:114 error_comment = \115 "Rebranch internal error: Unable to get working copy. " + \116 instructioncomment117 if os.path.exists(workingcopy):118 shutil.rmtree(workingcopy)119 results['mergebotstate'] = 'rebranchfailed'120 return results, error_comment, False121 110 122 111 # On success, we're in the same state as if we had just branched. … … 146 135 "commit your work to the branch.", 147 136 ]) 148 success = False # the rebranch failed because there were conflicts149 137 else: # No conflicts, do the commit. 150 138 mergemessage = "\n".join([
Note: See TracChangeset
for help on using the changeset viewer.