Changeset 424 in tailor for vcpx/svn.py


Ignore:
Timestamp:
07/25/05 22:42:48 (8 years ago)
Author:
lele@…
Hash name:
20050725204248-97f81-385eb318386f46b7bf64ecc1a70cc4b15cdacd6c
Message:

Factored out the call to svn info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/svn.py

    r420 r424  
    189189            return [] 
    190190 
     191        info = self.__getSvnInfo(root) 
     192 
     193        return self.__parseSvnLog(log, info['URL'], repository, module) 
     194 
     195    def __getSvnInfo(self, root): 
    191196        cmd = [SVN_CMD, "info"] 
    192197        svninfo = ExternalCommand(cwd=root, command=cmd) 
     
    203208                key, value = l.split(':', 1) 
    204209                info[key] = value[1:] 
    205          
    206         return self.__parseSvnLog(log, info['URL'], repository, module) 
     210 
     211        return info 
    207212 
    208213    def __parseSvnLog(self, log, url, repository, module): 
     
    253258            if logger: logger.info("%s already exists, assuming it's a svn working dir" % wdir) 
    254259 
    255         cmd = [SVN_CMD, "info"] 
    256         svninfo = ExternalCommand(cwd=wdir, command=cmd) 
    257         output = svninfo.execute('.', stdout=PIPE, LANG='') 
    258  
    259         if svninfo.exit_status: 
    260             raise GetUpstreamChangesetsFailure( 
    261                 "%s returned status %d" % (str(svninfo), svninfo.exit_status)) 
    262  
    263         info = {} 
    264         for l in output: 
    265             l = l[:-1] 
    266             if l: 
    267                 key, value = l.split(':', 1) 
    268                 info[key] = value[1:] 
    269  
     260        info = self.__getSvnInfo(wdir) 
     261         
    270262        actual = info['Revision'] 
    271263         
Note: See TracChangeset for help on using the changeset viewer.