changeset 28104:96f8baddbd6a

destutil: consistently retrieve 'p1' and 'branch' We already read p1 from the dirstate so let's read the branch from it too.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 08 Feb 2016 14:56:28 +0100
parents 7d852bb47b0a
children 1fc7b5363871
files mercurial/destutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/destutil.py	Mon Feb 08 14:55:58 2016 +0100
+++ b/mercurial/destutil.py	Mon Feb 08 14:56:28 2016 +0100
@@ -194,7 +194,7 @@
     """find merge destination based on branch heads"""
     node = None
     parent = repo.dirstate.p1()
-    branch = repo[None].branch()
+    branch = repo.dirstate.branch()
     bheads = repo.branchheads(branch)
     nbhs = [bh for bh in bheads if not repo[bh].bookmarks()]