[PATCH 3 of 4] merge: get the default update destination from the function
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Oct 7 14:02:23 CDT 2015
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1443503483 25200
# Mon Sep 28 22:11:23 2015 -0700
# Node ID 224f781d36bdfa50e8db7a3e02d5398848a88b20
# Parent cb49c9ec614d20e21bc5affae1439a8abe727f5e
merge: get the default update destination from the function
There is no value in using the revset instead of the extracted function.
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -992,13 +992,12 @@ def update(repo, node, branchmerge, forc
pas = [None]
if ancestor is not None:
pas = [repo[ancestor]]
if node is None:
- nodes = list(repo.set('_updatedefaultdest()'))
- if nodes:
- node = nodes[0].node()
+ from .scmutil import destupdate # avoid cycle
+ node = repo[destupdate(repo)].node()
overwrite = force and not branchmerge
p2 = repo[node]
if pas[0] is None:
More information about the Mercurial-devel
mailing list