Changeset 1639 in tailor


Ignore:
Timestamp:
06/11/08 20:12:37 (5 years ago)
Author:
lele@…
Hash name:
20080611181237-7a6fb-3b0b4e602f4abab97995d5c5ca075388d935101d
Message:

Rename the pending file on darcs record failures

File:
1 edited

Legend:

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

    r1638 r1639  
    106106        """ 
    107107 
     108        from os import rename, unlink 
     109 
    108110        logmessage = [] 
    109111 
     
    135137 
    136138        if record.exit_status: 
     139            pending = join(self.repository.basedir, '_darcs', 'patches', 'pending') 
     140            if exists(pending): 
     141                wrongpending = pending + '.wrong' 
     142                if exists(wrongpending): 
     143                    unlink(wrongpending) 
     144                rename(pending, wrongpending) 
     145                self.log.debug("Pending file renamed to %s", wrongpending) 
    137146            raise ChangesetReplayFailure( 
    138147                "%s returned status %d, saying: %s" % (str(record), 
Note: See TracChangeset for help on using the changeset viewer.