Changeset 425 in tailor


Ignore:
Timestamp:
07/25/05 22:59:07 (8 years ago)
Author:
lele@…
Hash name:
20050725205907-97f81-64d1f236956acd6948c0bd1c75d44eb96e07b100
Message:

Was still considering output a StringIO object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/darcs.py

    r394 r425  
    1212__docformat__ = 'reStructuredText' 
    1313 
    14 from shwrap import ExternalCommand, PIPE 
     14from shwrap import ExternalCommand, PIPE, STDOUT 
    1515from source import UpdatableSourceWorkingDir, ChangesetApplicationFailure, \ 
    1616     GetUpstreamChangesetsFailure 
     
    140140        cmd = [DARCS_CMD, "pull", "--dry-run"] 
    141141        pull = ExternalCommand(cwd=root, command=cmd) 
    142         output = pull.execute(repository, stdout=PIPE, TZ='UTC') 
     142        output = pull.execute(repository, stdout=PIPE, stderr=STDOUT, TZ='UTC') 
    143143         
    144144        if pull.exit_status: 
    145145            raise GetUpstreamChangesetsFailure( 
    146146                "%s returned status %d saying \"%s\"" % 
    147                 (str(pull), pull.exit_status, output.strip())) 
     147                (str(pull), pull.exit_status, output.read())) 
    148148 
    149149        l = output.readline() 
     
    206206        cmd = [DARCS_CMD, "pull", "--all", selector, revtag] 
    207207        pull = ExternalCommand(cwd=root, command=cmd) 
    208         output = pull.execute(stdout=PIPE) 
     208        output = pull.execute(stdout=PIPE, stderr=STDOUT) 
    209209         
    210210        if pull.exit_status: 
    211211            raise ChangesetApplicationFailure( 
    212212                "%s returned status %d saying \"%s\"" % 
    213                 (str(pull), pull.exit_status, output.strip())) 
     213                (str(pull), pull.exit_status, output.read())) 
    214214 
    215215        cmd = [DARCS_CMD, "changes", selector, revtag, 
     
    250250                    cmd.extend(["--tag", revision]) 
    251251                dpull = ExternalCommand(cwd=wdir, command=cmd) 
    252                 output = dpull.execute(repository, stdout=PIPE) 
     252                output = dpull.execute(repository, stdout=PIPE, stderr=STDOUT) 
    253253                         
    254254                if dpull.exit_status: 
    255255                    raise TargetInitializationFailure( 
    256256                        "%s returned status %d saying \"%s\"" % 
    257                         (str(dpull), dpull.exit_status, output.strip())) 
     257                        (str(dpull), dpull.exit_status, output.read())) 
    258258        else: 
    259259            # Use much faster 'darcs get' 
     
    264264                cmd.extend(["--tag", revision]) 
    265265            dget = ExternalCommand(cwd=basedir, command=cmd) 
    266             output = dget.execute(repository, subdir, stdout=PIPE) 
     266            output = dget.execute(repository, subdir, 
     267                                  stdout=PIPE, stderr=STDOUT) 
    267268             
    268269            if dget.exit_status: 
    269270                raise TargetInitializationFailure( 
    270271                    "%s returned status %d saying \"%s\"" % 
    271                     (str(dget), dget.exit_status, output.strip())) 
     272                    (str(dget), dget.exit_status, output.read())) 
    272273 
    273274        cmd = [DARCS_CMD, "changes", "--last", "1", "--xml-output"] 
    274275        changes = ExternalCommand(cwd=wdir, command=cmd) 
    275         output = changes.execute(stdout=PIPE) 
     276        output = changes.execute(stdout=PIPE, stderr=STDOUT) 
    276277         
    277278        if changes.exit_status: 
    278279            raise ChangesetApplicationFailure( 
    279280                "%s returned status %d saying \"%s\"" % 
    280                 (str(changes), changes.exit_status, output.strip())) 
     281                (str(changes), changes.exit_status, output.read())) 
    281282         
    282283        last = changesets_from_darcschanges(output) 
Note: See TracChangeset for help on using the changeset viewer.