Mercurial > hg > mercurial-source
diff mercurial/copies.py @ 30973:8c69c52ced98
copies: compute a suitable TCA if base turns out to be unsuitable
This will be used later in an update to _checkcopies.
(Pierre-Yves David was involved in the cleanup of this patch.)
author | Gábor Stefanik <gabor.stefanik@nng.com> |
---|---|
date | Thu, 13 Oct 2016 02:03:49 +0200 (2016-10-13) |
parents | 368e27eb1ffa |
children | 88626de195f8 |
line wrap: on
line diff
--- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -338,6 +338,10 @@ dirtyc1 = not (base == _c1 or base.descendant(_c1)) dirtyc2 = not (base== _c2 or base.descendant(_c2)) graft = dirtyc1 or dirtyc2 + tca = base + if graft: + tca = _c1.ancestor(_c2) + limit = _findlimit(repo, c1.rev(), c2.rev()) if limit is None: # no common ancestor, no copies