destutil: consistently retrieve 'p1' and 'branch'
We already read p1 from the dirstate so let's read the branch from it too.
--- 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()]