D7996: merge: don't auto-pick destination with `hg merge 'wdir()'`
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Jan 25 00:17:57 UTC 2020
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
If the user doesn't specify a commit to merge with, we'll have
`node==None` in `commands.merge()`. We'll then try to find a good
commit to merge with. However, if the user, for some strange reason,
runs `hg merge 'wdir()'`, we'll also have `node==None` and we'll do
that same. That's clearly not the intent, so let's not do that.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D7996
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4866,8 +4866,7 @@
if node:
node = scmutil.revsingle(repo, node).node()
-
- if not node:
+ else:
if ui.configbool(b'commands', b'merge.require-rev'):
raise error.Abort(
_(
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list