diff mercurial/merge.py @ 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 e4f27fb65da7
children 56b2bcea2529
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