Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/copies.py @ 48516:79b904313357
pytype: stop excluding copies.py
I can't prove that `targetrev` is always in `all_copies`, but it would have been
a runtime error before too if it's not.
Differential Revision: https://phab.mercurial-scm.org/D11916
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 13 Dec 2021 00:04:53 -0500 |
parents | 19e6446cea11 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
48515:19e6446cea11 | 48516:79b904313357 |
---|---|
446 ) | 446 ) |
447 all_copies[current_rev] = current_copies | 447 all_copies[current_rev] = current_copies |
448 | 448 |
449 # filter out internal details and return a {dest: source mapping} | 449 # filter out internal details and return a {dest: source mapping} |
450 final_copies = {} | 450 final_copies = {} |
451 for dest, (tt, source) in all_copies[targetrev].items(): | 451 |
452 targetrev_items = all_copies[targetrev] | |
453 assert targetrev_items is not None # help pytype | |
454 | |
455 for dest, (tt, source) in targetrev_items.items(): | |
452 if source is not None: | 456 if source is not None: |
453 final_copies[dest] = source | 457 final_copies[dest] = source |
454 if not alwaysmatch: | 458 if not alwaysmatch: |
455 for filename in list(final_copies.keys()): | 459 for filename in list(final_copies.keys()): |
456 if not match(filename): | 460 if not match(filename): |