Changeset 1574 in tailor for vcpx/repository/darcs/__init__.py


Ignore:
Timestamp:
05/29/08 23:49:34 (5 years ago)
Author:
lele@…
Hash name:
20080529214934-97f81-be3fac52c7a5b07e0c6ff85d25e14f17b71b1845
Message:

Load the darcs version, to disambiguate between 1.0 and 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/repository/darcs/__init__.py

    r1558 r1574  
    1515 
    1616from vcpx.repository import Repository 
    17 from vcpx.shwrap import ExternalCommand 
     17from vcpx.shwrap import ExternalCommand, PIPE 
    1818from vcpx.target import TargetInitializationFailure 
    1919 
     
    2626        cget = project.config.get 
    2727        self.EXECUTABLE = cget(self.name, 'darcs-command', 'darcs') 
     28        cmd = self.command('--version') 
     29        version = ExternalCommand(command=cmd) 
     30        self.darcs_version = version.execute(stdout=PIPE)[0].read().strip() 
     31        self.log.debug('Using %s, version %s', self.EXECUTABLE, self.darcs_version) 
    2832        init_options = cget(self.name, 'init-options', '') 
    2933        if init_options: 
Note: See TracChangeset for help on using the changeset viewer.