Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 43873:8caec25f5d8f
merge: add commands.merge.require-rev to require an argument to hg merge
This is related to commands.rebase.requiredest, commands.update.requiredest, and
commands.push.require-revs. Since it isn't really a "destination", I went with
require-rev to be similar to push's require-revs.
Differential Revision: https://phab.mercurial-scm.org/D7620
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Wed, 11 Dec 2019 19:42:05 -0800 |
parents | aac921f54554 |
children | 8376d5d62d36 |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Dec 12 09:59:03 2019 -0800 +++ b/mercurial/commands.py Wed Dec 11 19:42:05 2019 -0800 @@ -4888,6 +4888,13 @@ node = scmutil.revsingle(repo, node).node() if not node and not abort: + if ui.configbool(b'commands', b'merge.require-rev'): + raise error.Abort( + _( + b'configuration requires specifying revision to merge ' + b'with' + ) + ) node = repo[destutil.destmerge(repo)].node() if opts.get(b'preview'):