# HG changeset patch # User Pierre-Yves David # Date 1454939788 -3600 # Node ID 96f8baddbd6a3832454438f2bec4e478089d8153 # Parent 7d852bb47b0aeca31ee9beea76509a902f71aeff destutil: consistently retrieve 'p1' and 'branch' We already read p1 from the dirstate so let's read the branch from it too. diff -r 7d852bb47b0a -r 96f8baddbd6a mercurial/destutil.py --- 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()]