##// END OF EJS Templates
mq: use cmdutil.revert instead of hg.revert...
Matt Mackall -
r26654:30657909 default
parent child Browse files
Show More
@@ -1428,9 +1428,9 b' class queue(object):'
1428 except AbortNoCleanup:
1428 except AbortNoCleanup:
1429 raise
1429 raise
1430 except: # re-raises
1430 except: # re-raises
1431 self.ui.warn(_('cleaning up working directory...'))
1431 self.ui.warn(_('cleaning up working directory...\n'))
1432 node = repo.dirstate.p1()
1432 cmdutil.revert(self.ui, repo, repo['.'],
1433 hg.revert(repo, node, None)
1433 repo.dirstate.parents(), no_backup=True)
1434 # only remove unknown files that we know we touched or
1434 # only remove unknown files that we know we touched or
1435 # created while patching
1435 # created while patching
1436 for f in all_files:
1436 for f in all_files:
@@ -766,10 +766,6 b' def outgoing(ui, repo, dest, opts):'
766 recurse()
766 recurse()
767 return 0 # exit code is zero since we found outgoing changes
767 return 0 # exit code is zero since we found outgoing changes
768
768
769 def revert(repo, node, choose):
770 """revert changes to revision in node without updating dirstate"""
771 return mergemod.update(repo, node, False, True, choose)[3] > 0
772
773 def verify(repo):
769 def verify(repo):
774 """verify the consistency of a repository"""
770 """verify the consistency of a repository"""
775 ret = verifymod.verify(repo)
771 ret = verifymod.verify(repo)
@@ -56,7 +56,9 b' test qpush on empty series'
56 applying bad-patch
56 applying bad-patch
57 transaction abort!
57 transaction abort!
58 rollback completed
58 rollback completed
59 cleaning up working directory...done
59 cleaning up working directory...
60 reverting foo
61 done
60 abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
62 abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
61 [255]
63 [255]
62 $ hg parents
64 $ hg parents
General Comments 0
You need to be logged in to leave comments. Login now