Ignore:
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 tasks
    2 """
    31import os
    4 from mergebot import SvnOps
    52
    63class Actor(object):
    7     """Base class for mergebot actors"""
    84    def __init__(self, work_dir, repo_url, repo_dir, ticket, component,
    95                 version, summary, requestor):
     
    2723
    2824    def logfilename(self):
    29         """Returns the absolute path of the logfile for this ticket"""
    3025        return os.path.abspath(os.path.join(os.path.dirname(self.work_dir),
    3126            'ticket-%s.log' % self.ticket))
    3227
    3328    def public_url(self):
    34         """Returns the public URL for this component"""
    3529        return '%s/%s' % (self.repo_url, self.component)
    3630
     
    4135
    4236    def local_url(self):
    43         """Returns the local URL for this component"""
    4437        return 'file://%s/%s' % (self.repo_dir, self.component)
    4538
     
    5548
    5649    def version_subdir(self):
    57         """Returns the subdirectory name for the version"""
    5850        if self.version == 'trunk':
    5951            subdir = 'trunk'
     
    6658        return subdir
    6759
    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.component
    73         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.component
    76         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 None
    80 
Note: See TracChangeset for help on using the changeset viewer.