Mercurial > hg-stable
comparison mercurial/copies.py @ 32593:931b7707179f
copies: rename m2 to mdst
Small refactoring to rename m2 to more clearer mdst.
author | Stanislau Hlebik <stash@fb.com> |
---|---|
date | Mon, 29 May 2017 05:52:15 -0700 |
parents | c8c9feffbd35 |
children | 52cdbdd208d8 |
comparison
equal
deleted
inserted
replaced
32592:c8c9feffbd35 | 32593:931b7707179f |
---|---|
596 elif f1r == f2r or f1r < limit or f2r < limit: | 596 elif f1r == f2r or f1r < limit or f2r < limit: |
597 return False # copy no longer relevant | 597 return False # copy no longer relevant |
598 except StopIteration: | 598 except StopIteration: |
599 return False | 599 return False |
600 | 600 |
601 def _checkcopies(ctx, f, msrc, m2, base, tca, remotebase, limit, data): | 601 def _checkcopies(ctx, f, msrc, mdst, base, tca, remotebase, limit, data): |
602 """ | 602 """ |
603 check possible copies of f from msrc to m2 | 603 check possible copies of f from msrc to mdst |
604 | 604 |
605 ctx = starting context for f in msrc | 605 ctx = starting context for f in msrc |
606 f = the filename to check (as in msrc) | 606 f = the filename to check (as in msrc) |
607 msrc = the source manifest | 607 msrc = the source manifest |
608 m2 = the destination manifest | 608 mdst = the destination manifest |
609 base = the changectx used as a merge base | 609 base = the changectx used as a merge base |
610 tca = topological common ancestor for graft-like scenarios | 610 tca = topological common ancestor for graft-like scenarios |
611 remotebase = True if base is outside tca::ctx, False otherwise | 611 remotebase = True if base is outside tca::ctx, False otherwise |
612 limit = the rev number to not search beyond | 612 limit = the rev number to not search beyond |
613 data = dictionary of dictionary to store copy data. (see mergecopies) | 613 data = dictionary of dictionary to store copy data. (see mergecopies) |
651 # remember for dir rename detection | 651 # remember for dir rename detection |
652 if backwards: | 652 if backwards: |
653 data['fullcopy'][of] = f # grafting backwards through renames | 653 data['fullcopy'][of] = f # grafting backwards through renames |
654 else: | 654 else: |
655 data['fullcopy'][f] = of | 655 data['fullcopy'][f] = of |
656 if of not in m2: | 656 if of not in mdst: |
657 continue # no match, keep looking | 657 continue # no match, keep looking |
658 if m2[of] == mb.get(of): | 658 if mdst[of] == mb.get(of): |
659 return # no merge needed, quit early | 659 return # no merge needed, quit early |
660 c2 = getfctx(of, m2[of]) | 660 c2 = getfctx(of, mdst[of]) |
661 # c2 might be a plain new file on added on destination side that is | 661 # c2 might be a plain new file on added on destination side that is |
662 # unrelated to the droids we are looking for. | 662 # unrelated to the droids we are looking for. |
663 cr = _related(oc, c2, tca.rev()) | 663 cr = _related(oc, c2, tca.rev()) |
664 if cr and (of == f or of == c2.path()): # non-divergent | 664 if cr and (of == f or of == c2.path()): # non-divergent |
665 if backwards: | 665 if backwards: |