Changes in mergebot/trunk/mergebot/BranchActor.py [29:17]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mergebot/trunk/mergebot/BranchActor.py
r29 r17 2 2 """Module for creating new branches for tickets""" 3 3 4 import os 4 5 import time 5 6 … … 19 20 20 21 # Make sure the various urls we require do exist 21 problems = self.check_required_directories() 22 if problems: 23 return results, problems, False 22 if not SvnOps.get_branch_info(self.local_url(), logfile): 23 comment = 'Component %s does not exist in the repository.' \ 24 % self.component 25 return results, comment, False 26 if not SvnOps.get_branch_info(self.local_url() + '/branches', logfile): 27 comment = 'No directory in which to create branches for component %s in the repository.' % self.component 28 return results, comment, False 29 if not SvnOps.get_branch_info(self.baseline_local_url(), logfile): 30 comment = 'Version %s for component %s does not exist in the repository.' % (self.version, self.component) 31 return results, comment, False 24 32 25 33 commit_header = 'Ticket #%s: %s' % (self.ticket, self.summary) … … 27 35 # Delete the branch if it already exists. This can happen if the branch 28 36 # was merged, but we're still working on it. 29 if SvnOps. does_url_exist(self.branch_local_url()):37 if SvnOps.get_branch_info(self.branch_local_url(), logfile): 30 38 # This branch already exists. 31 39 commit_message = "\n".join([commit_header, … … 51 59 comment = 'Failed to create branch.' 52 60 return results, comment, False 53 54 61 results['mergebotstate'] = 'branched' 55 62 comment = '\n'.join([ 56 63 'Created branch from %s for %s.' % (self.version, self.requestor), 57 64 '', 58 'Browse branch [source:%s/branches/ticket-%s source code] and ' \ 59 '[log:%s/branches/ticket-%s commit log].' % 65 'Browse branch [source:%s/branches/ticket-%s source code] and [log:%s/branches/ticket-%s commit log].' % 60 66 (self.component, self.ticket, self.component, self.ticket), 61 67 '',
Note: See TracChangeset
for help on using the changeset viewer.