Mercurial > public > mercurial-scm > hg-stable
diff mercurial/copies.py @ 30229:69ffbbe73dd0 stable
merge: avoid superfluous filemerges when grafting through renames (issue5407)
This is a fix for a regression introduced by the patches for issue4028.
The test changes are due to us doing fewer _checkcopies searches now, which
makes some test outputs revert to the pre-issue4028 behavior. That issue itself
remains fixed, we only skip copy tracing for files where it isn't relevant.
As a nice side effect, this makes copy detection much faster when tracing
backwards through lots of renames.
author | G?bor Stefanik <gabor.stefanik@nng.com> |
---|---|
date | Tue, 25 Oct 2016 21:01:53 +0200 |
parents | 87a7c0d403ff |
children | 0298a07f64d9 |
line wrap: on
line diff
--- a/mercurial/copies.py Wed Oct 19 18:06:14 2016 +0200 +++ b/mercurial/copies.py Tue Oct 25 21:01:53 2016 +0200 @@ -631,6 +631,10 @@ backwards = not remotebase and base != tca and f in mb getfctx = _makegetfctx(ctx) + if m1[f] == mb.get(f) and not remotebase: + # Nothing to merge + return + of = None seen = set([f]) for oc in getfctx(f, m1[f]).ancestors():