equal
deleted
inserted
replaced
19 ''' |
19 ''' |
20 # Build table of removed files: {hash(fctx.data()): [fctx, ...]}. |
20 # Build table of removed files: {hash(fctx.data()): [fctx, ...]}. |
21 # We use hash() to discard fctx.data() from memory. |
21 # We use hash() to discard fctx.data() from memory. |
22 hashes = {} |
22 hashes = {} |
23 progress = repo.ui.makeprogress( |
23 progress = repo.ui.makeprogress( |
24 _('searching for exact renames'), |
24 _(b'searching for exact renames'), |
25 total=(len(added) + len(removed)), |
25 total=(len(added) + len(removed)), |
26 unit=_('files'), |
26 unit=_(b'files'), |
27 ) |
27 ) |
28 for fctx in removed: |
28 for fctx in removed: |
29 progress.increment() |
29 progress.increment() |
30 h = hash(fctx.data()) |
30 h = hash(fctx.data()) |
31 if h not in hashes: |
31 if h not in hashes: |
79 Takes a list of new filectxs and a list of removed filectxs, and yields |
79 Takes a list of new filectxs and a list of removed filectxs, and yields |
80 (before, after, score) tuples of partial matches. |
80 (before, after, score) tuples of partial matches. |
81 ''' |
81 ''' |
82 copies = {} |
82 copies = {} |
83 progress = repo.ui.makeprogress( |
83 progress = repo.ui.makeprogress( |
84 _('searching for similar files'), unit=_('files'), total=len(removed) |
84 _(b'searching for similar files'), unit=_(b'files'), total=len(removed) |
85 ) |
85 ) |
86 for r in removed: |
86 for r in removed: |
87 progress.increment() |
87 progress.increment() |
88 data = None |
88 data = None |
89 for a in added: |
89 for a in added: |