Mercurial > public > mercurial-scm > hg
diff mercurial/merge.py @ 26957:d16d73173fdd
merge: move messages about possible conflicts a litte earlier
I actually wanted to reduce the amount of code around the call to
applyupdates(), so I tried moving these warnings a little earlier, and
I think it makes the output make a little more sense (see changes to
test cases).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 12 Nov 2015 13:14:03 -0800 |
parents | b639b2f186bf |
children | 042422f3a773 |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Nov 01 15:46:06 2015 +0900 +++ b/mercurial/merge.py Thu Nov 12 13:14:03 2015 -0800 @@ -1273,16 +1273,6 @@ actions['g'].append((f, (flags,), "prompt recreating")) del actions['dc'][:] - ### apply phase - if not branchmerge: # just jump to the new rev - fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' - if not partial: - repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) - # note that we're in the middle of an update - repo.vfs.write('updatestate', p2.hex()) - - stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) - # divergent renames for f, fl in sorted(diverge.iteritems()): repo.ui.warn(_("note: possible conflict - %s was renamed " @@ -1297,6 +1287,16 @@ for nf in fl: repo.ui.warn(" %s\n" % nf) + ### apply phase + if not branchmerge: # just jump to the new rev + fp1, fp2, xp1, xp2 = fp2, nullid, xp2, '' + if not partial: + repo.hook('preupdate', throw=True, parent1=xp1, parent2=xp2) + # note that we're in the middle of an update + repo.vfs.write('updatestate', p2.hex()) + + stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) + if not partial: repo.dirstate.beginparentchange() repo.setparents(fp1, fp2)