Mercurial > hg-stable
comparison mercurial/copies.py @ 30137:f85f9e069e09
checkcopies: add an inline comment about the '_related' call
This helps understanding the flow of the function.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Sat, 08 Oct 2016 23:00:55 +0200 |
parents | 8797eadb5d90 |
children | 733fb9f7bc92 |
comparison
equal
deleted
inserted
replaced
30136:8797eadb5d90 | 30137:f85f9e069e09 |
---|---|
524 if of not in m2: | 524 if of not in m2: |
525 continue # no match, keep looking | 525 continue # no match, keep looking |
526 if m2[of] == mb.get(of): | 526 if m2[of] == mb.get(of): |
527 return # no merge needed, quit early | 527 return # no merge needed, quit early |
528 c2 = getfctx(of, m2[of]) | 528 c2 = getfctx(of, m2[of]) |
529 # c2 might be a plain new file on added on destination side that is | |
530 # unrelated to the droids we are looking for. | |
529 cr = _related(oc, c2, base.rev()) | 531 cr = _related(oc, c2, base.rev()) |
530 if cr and (of == f or of == c2.path()): # non-divergent | 532 if cr and (of == f or of == c2.path()): # non-divergent |
531 copy[f] = of | 533 copy[f] = of |
532 return | 534 return |
533 | 535 |