Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
43872:527eba3013ea | 43873:8caec25f5d8f |
---|---|
4886 | 4886 |
4887 if node: | 4887 if node: |
4888 node = scmutil.revsingle(repo, node).node() | 4888 node = scmutil.revsingle(repo, node).node() |
4889 | 4889 |
4890 if not node and not abort: | 4890 if not node and not abort: |
4891 if ui.configbool(b'commands', b'merge.require-rev'): | |
4892 raise error.Abort( | |
4893 _( | |
4894 b'configuration requires specifying revision to merge ' | |
4895 b'with' | |
4896 ) | |
4897 ) | |
4891 node = repo[destutil.destmerge(repo)].node() | 4898 node = repo[destutil.destmerge(repo)].node() |
4892 | 4899 |
4893 if opts.get(b'preview'): | 4900 if opts.get(b'preview'): |
4894 # find nodes that are ancestors of p2 but not of p1 | 4901 # find nodes that are ancestors of p2 but not of p1 |
4895 p1 = repo.lookup(b'.') | 4902 p1 = repo.lookup(b'.') |