Mercurial > hg
comparison mercurial/copies.py @ 30194: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 |
parents | 368e27eb1ffa |
children | 88626de195f8 |
comparison
equal
deleted
inserted
replaced
30193:368e27eb1ffa | 30194:8c69c52ced98 |
---|---|
336 # if we have a dirty endpoint, we need to trigger graft logic, and also | 336 # if we have a dirty endpoint, we need to trigger graft logic, and also |
337 # keep track of which endpoint is dirty | 337 # keep track of which endpoint is dirty |
338 dirtyc1 = not (base == _c1 or base.descendant(_c1)) | 338 dirtyc1 = not (base == _c1 or base.descendant(_c1)) |
339 dirtyc2 = not (base== _c2 or base.descendant(_c2)) | 339 dirtyc2 = not (base== _c2 or base.descendant(_c2)) |
340 graft = dirtyc1 or dirtyc2 | 340 graft = dirtyc1 or dirtyc2 |
341 tca = base | |
342 if graft: | |
343 tca = _c1.ancestor(_c2) | |
344 | |
341 limit = _findlimit(repo, c1.rev(), c2.rev()) | 345 limit = _findlimit(repo, c1.rev(), c2.rev()) |
342 if limit is None: | 346 if limit is None: |
343 # no common ancestor, no copies | 347 # no common ancestor, no copies |
344 return {}, {}, {}, {} | 348 return {}, {}, {}, {} |
345 repo.ui.debug(" searching for copies back to rev %d\n" % limit) | 349 repo.ui.debug(" searching for copies back to rev %d\n" % limit) |