##// END OF EJS Templates
backout: fix --no-commit option (issue5054)
Ruslan Sayfutdinov -
r27912:ae4e6b80 stable
parent child Browse files
Show More
@@ -653,11 +653,6 b' def _dobackout(ui, repo, node=None, rev='
653 repo.ui.status(_("use 'hg resolve' to retry unresolved "
653 repo.ui.status(_("use 'hg resolve' to retry unresolved "
654 "file merges\n"))
654 "file merges\n"))
655 return 1
655 return 1
656 elif opts.get('no_commit'):
657 msg = _("changeset %s backed out, "
658 "don't forget to commit.\n")
659 ui.status(msg % short(node))
660 return 0
661 finally:
656 finally:
662 ui.setconfig('ui', 'forcemerge', '', '')
657 ui.setconfig('ui', 'forcemerge', '', '')
663 lockmod.release(dsguard)
658 lockmod.release(dsguard)
@@ -666,6 +661,11 b' def _dobackout(ui, repo, node=None, rev='
666 repo.dirstate.setbranch(branch)
661 repo.dirstate.setbranch(branch)
667 cmdutil.revert(ui, repo, rctx, repo.dirstate.parents())
662 cmdutil.revert(ui, repo, rctx, repo.dirstate.parents())
668
663
664 if opts.get('no_commit'):
665 msg = _("changeset %s backed out, "
666 "don't forget to commit.\n")
667 ui.status(msg % short(node))
668 return 0
669
669
670 def commitfunc(ui, repo, message, match, opts):
670 def commitfunc(ui, repo, message, match, opts):
671 editform = 'backout'
671 editform = 'backout'
@@ -739,4 +739,17 b' Test usage of `hg resolve` in case of co'
739 nine
739 nine
740 TEN
740 TEN
741
741
742 --no-commit shouldn't commit
742
743
744 $ hg init a
745 $ cd a
746 $ for i in 1 2 3; do
747 > touch $i
748 > hg ci -Am $i
749 > done
750 adding 1
751 adding 2
752 adding 3
753 $ hg backout --no-commit .
754 removing 3
755 changeset cccc23d9d68f backed out, don't forget to commit.
General Comments 0
You need to be logged in to leave comments. Login now