mercurial/copies.py
changeset 32561 52cdbdd208d8
parent 32560 931b7707179f
child 32562 e4d1bc14e39a
equal deleted inserted replaced
32560:931b7707179f 32561:52cdbdd208d8
   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, mdst, base, tca, remotebase, limit, data):
   601 def _checkcopies(srcctx, f, msrc, mdst, base, tca, remotebase, limit, data):
   602     """
   602     """
   603     check possible copies of f from msrc to mdst
   603     check possible copies of f from msrc to mdst
   604 
   604 
   605     ctx = starting context for f in msrc
   605     srcctx = 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     mdst = 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::srcctx, 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)
   614 
   614 
   615     note: limit is only an optimization, and there is no guarantee that
   615     note: limit is only an optimization, and there is no guarantee that
   616     irrelevant revisions will not be limited
   616     irrelevant revisions will not be limited
   628     #
   628     #
   629     # In the case there is both backward and forward renames (before and after
   629     # In the case there is both backward and forward renames (before and after
   630     # the base) this is more complicated as we must detect a divergence.
   630     # the base) this is more complicated as we must detect a divergence.
   631     # We use 'backwards = False' in that case.
   631     # We use 'backwards = False' in that case.
   632     backwards = not remotebase and base != tca and f in mb
   632     backwards = not remotebase and base != tca and f in mb
   633     getfctx = _makegetfctx(ctx)
   633     getfctx = _makegetfctx(srcctx)
   634 
   634 
   635     if msrc[f] == mb.get(f) and not remotebase:
   635     if msrc[f] == mb.get(f) and not remotebase:
   636         # Nothing to merge
   636         # Nothing to merge
   637         return
   637         return
   638 
   638