merge: get the default update destination from the function
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 28 Sep 2015 22:11:23 -0700
changeset 26570 c8b332b1eb1f
parent 26569 2aeeef1dc9a5
child 26571 a024e2db4553
merge: get the default update destination from the function There is no value in using the revset instead of the extracted function.
mercurial/merge.py
--- 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