equal
deleted
inserted
replaced
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) |