hgext/shelve.py
changeset 33440 ec306bc6915b
parent 33313 ea03b3223611
child 34112 f7d41b85bbf6
equal deleted inserted replaced
33439:0e114b992e02 33440:ec306bc6915b
   295 
   295 
   296 def _aborttransaction(repo):
   296 def _aborttransaction(repo):
   297     '''Abort current transaction for shelve/unshelve, but keep dirstate
   297     '''Abort current transaction for shelve/unshelve, but keep dirstate
   298     '''
   298     '''
   299     tr = repo.currenttransaction()
   299     tr = repo.currenttransaction()
   300     repo.dirstate.savebackup(tr, suffix='.shelve')
   300     backupname = 'dirstate.shelve'
       
   301     repo.dirstate.savebackup(tr, backupname)
   301     tr.abort()
   302     tr.abort()
   302     repo.dirstate.restorebackup(None, suffix='.shelve')
   303     repo.dirstate.restorebackup(None, backupname)
   303 
   304 
   304 def createcmd(ui, repo, pats, opts):
   305 def createcmd(ui, repo, pats, opts):
   305     """subcommand that creates a new shelve"""
   306     """subcommand that creates a new shelve"""
   306     with repo.wlock():
   307     with repo.wlock():
   307         cmdutil.checkunfinished(repo)
   308         cmdutil.checkunfinished(repo)