Changes in mergebot/trunk/mergebot/Actor.py [24:17]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mergebot/trunk/mergebot/Actor.py
r24 r17 1 """Base class for mergebot actors that do the various kinds of tasks2 """3 1 import os 4 from mergebot import SvnOps5 2 6 3 class Actor(object): 7 """Base class for mergebot actors"""8 4 def __init__(self, work_dir, repo_url, repo_dir, ticket, component, 9 5 version, summary, requestor): … … 27 23 28 24 def logfilename(self): 29 """Returns the absolute path of the logfile for this ticket"""30 25 return os.path.abspath(os.path.join(os.path.dirname(self.work_dir), 31 26 'ticket-%s.log' % self.ticket)) 32 27 33 28 def public_url(self): 34 """Returns the public URL for this component"""35 29 return '%s/%s' % (self.repo_url, self.component) 36 30 … … 41 35 42 36 def local_url(self): 43 """Returns the local URL for this component"""44 37 return 'file://%s/%s' % (self.repo_dir, self.component) 45 38 … … 55 48 56 49 def version_subdir(self): 57 """Returns the subdirectory name for the version"""58 50 if self.version == 'trunk': 59 51 subdir = 'trunk' … … 66 58 return subdir 67 59 68 def check_required_directories(self):69 """Make sure the various urls we require do exist"""70 if not SvnOps.does_url_exist(self.local_url()):71 return 'Component %s does not exist in the repository.' \72 % self.component73 if not SvnOps.does_url_exist(self.local_url() + '/branches'):74 return 'No directory in which to create branches for ' \75 'component %s in the repository.' % self.component76 if not SvnOps.does_url_exist(self.baseline_local_url()):77 return 'Version %s for component %s does not exist in the ' \78 'repository.' % (self.version, self.component)79 return None80
Note: See TracChangeset
for help on using the changeset viewer.