Changeset 172


Ignore:
Timestamp:
04-04-07 03:52:10 (6 years ago)
Author:
thomas
Message:
  • moap/vcs/darcs.py (detect, Darcs, Darcs.getNotIgnored, Darcs.walker, Darcs.ignore, Darcs.commit, Darcs.diff, Darcs.getFileMatcher, Darcs.update): Add first stab at darcs support.
  • moap/vcs/svn.py (detect): Update doc string.
  • moap/vcs/vcs.py (detect, VCS.getFileMatcher, VCS.getChanges): Since darcs has slightly different diff output, factor out an overridable getFileMatcher to use in getChanges.
Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r171 r172  
     12007-04-04  Thomas Vander Stichele  <thomas at apestaart dot org> 
     2 
     3        * moap/vcs/darcs.py (detect, Darcs, Darcs.getNotIgnored, Darcs.walker, 
     4          Darcs.ignore, Darcs.commit, Darcs.diff, Darcs.getFileMatcher, 
     5          Darcs.update): 
     6          Add first stab at darcs support. 
     7        * moap/vcs/svn.py (detect): 
     8          Update doc string. 
     9        * moap/vcs/vcs.py (detect, VCS.getFileMatcher, VCS.getChanges): 
     10          Since darcs has slightly different diff output, factor out 
     11          an overridable getFileMatcher to use in getChanges. 
     12 
    1132007-04-03  Thomas Vander Stichele  <thomas at apestaart dot org> 
    214 
  • trunk/moap/vcs/svn.py

    r141 r172  
    1717    Detect if the given source tree is using svn. 
    1818 
    19     @return: True if the given path looks like a CVS tree. 
     19    @return: True if the given path looks like a Subversion tree. 
    2020    """ 
    2121    if not os.path.exists(os.path.join(path, '.svn')): 
  • trunk/moap/vcs/vcs.py

    r141 r172  
    2222        path = os.getcwd() 
    2323    systems = util.getPackageModules('moap.vcs', ignore=['vcs', ]) 
     24    log.debug('vcs', 'trying vcs modules %r' % systems) 
    2425 
    2526    for s in systems: 
     
    118119        raise NotImplementedError 
    119120 
     121    def getFileMatcher(self): 
     122        """ 
     123        Return an re matcher object that will expand to the file being 
     124        changed. 
     125 
     126        The default implementation works for CVS and SVN. 
     127        """ 
     128        return re.compile('^Index: (\S+)$') 
     129 
    120130    def getChanges(self, path, diff=None): 
    121131        """ 
     
    131141            diff = self.diff(path) 
    132142        changes = {} 
    133         fileMatcher = re.compile('^Index: (\S+)$') 
     143        fileMatcher = self.getFileMatcher() 
     144 
    134145        # cvs diff can put a function name after the final @@ pair 
    135146        changeMatcher = re.compile( 
Note: See TracChangeset for help on using the changeset viewer.