diff mercurial/commands.py @ 27954:9960b6369e7f stable

backout: disable --merge with --no-commit (issue4874) Because "backout --merge" have to make a commit before merging, it doesn't work with --no-commit. We could change "backout --merge" to make a merge commit automatically, and --no-commit to bypass a merge commit, but that change would be undesirable because: a) it's hard to fix bad merges in general b) two commits would be created with the same --message So, this patch simply disables "--merge --no-commit".
author Yuya Nishihara <yuya@tcha.org>
date Sat, 30 Jan 2016 18:00:11 +0900
parents f0d3c5794380
children ce9696193175
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jan 27 09:07:28 2016 -0800
+++ b/mercurial/commands.py	Sat Jan 30 18:00:11 2016 +0900
@@ -598,6 +598,8 @@
 def _dobackout(ui, repo, node=None, rev=None, **opts):
     if opts.get('commit') and opts.get('no_commit'):
         raise error.Abort(_("cannot use --commit with --no-commit"))
+    if opts.get('merge') and opts.get('no_commit'):
+        raise error.Abort(_("cannot use --merge with --no-commit"))
 
     if rev and node:
         raise error.Abort(_("please specify just one revision"))