changeset 26570:c8b332b1eb1f

merge: get the default update destination from the function There is no value in using the revset instead of the extracted function.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 28 Sep 2015 22:11:23 -0700
parents 2aeeef1dc9a5
children a024e2db4553
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Oct 05 01:46:47 2015 -0700
+++ b/mercurial/merge.py	Mon Sep 28 22:11:23 2015 -0700
@@ -21,6 +21,7 @@
 )
 from . import (
     copies,
+    destutil,
     filemerge,
     obsolete,
     subrepo,
@@ -994,9 +995,7 @@
             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