Mercurial > hg-stable
changeset 31388:b6a6df38a802
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 12 Mar 2017 16:41:46 -0700 |
parents | 2e48c776a874 |
children | 65d93d712777 |
files | mercurial/merge.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Mar 12 16:26:34 2017 -0700 +++ b/mercurial/merge.py Sun Mar 12 16:41:46 2017 -0700 @@ -1544,7 +1544,7 @@ 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'"))