[PATCH 2 of 3 V2] merge: get the default update destination from the function
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Oct 8 14:09:46 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 d67e4e13b4eab3b81f90fa58b8e7bcc423e9c543
# Parent 626558e252ef35fab8ccebaad863f08ad3f0839b
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
@@ -19,10 +19,11 @@ from .node import (
nullid,
nullrev,
)
from . import (
copies,
+ destutil,
filemerge,
obsolete,
subrepo,
util,
worker,
@@ -992,13 +993,11 @@ 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()
+ node = repo[destutil.destupdate(repo)].node()
overwrite = force and not branchmerge
p2 = repo[node]
if pas[0] is None:
More information about the Mercurial-devel
mailing list