# HG changeset patch # User Mads Kiilerich # Date 2017-03-12 23:41:46 # Node ID b6a6df38a80229ca8d8dad868bcb2d23c34fc5c8 # Parent 2e48c776a874b3154aff3dbf6de06faacacf81a0 merge: check current wc branch for 'nothing to merge', not its p1 The working directory will usually be clean or very clean, and wc will usually have the same branch as its parent. This change will thus usually not make any difference and is done as a separate change to show that. It will be used in a later change. diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -1544,7 +1544,7 @@ def update(repo, node, branchmerge, forc raise error.Abort(_("merging with a working directory ancestor" " has no effect")) elif pas == [p1]: - if not mergeancestor and p1.branch() == p2.branch(): + if not mergeancestor and wc.branch() == p2.branch(): raise error.Abort(_("nothing to merge"), hint=_("use 'hg update' " "or check 'hg heads'"))