Mercurial > hg
comparison mercurial/copies.py @ 34348:1a5abc45e2fa
py3: explicitly convert dict.keys() and dict.items() into a list
Differential Revision: https://phab.mercurial-scm.org/D853
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 30 Sep 2017 15:45:15 +0530 |
parents | 1826d695ad58 |
children | d00910b286cd |
comparison
equal
deleted
inserted
replaced
34347:87a6be5b29f4 | 34348:1a5abc45e2fa |
---|---|
139 return None | 139 return None |
140 | 140 |
141 def _dirstatecopies(d): | 141 def _dirstatecopies(d): |
142 ds = d._repo.dirstate | 142 ds = d._repo.dirstate |
143 c = ds.copies().copy() | 143 c = ds.copies().copy() |
144 for k in c.keys(): | 144 for k in list(c): |
145 if ds[k] not in 'anm': | 145 if ds[k] not in 'anm': |
146 del c[k] | 146 del c[k] |
147 return c | 147 return c |
148 | 148 |
149 def _computeforwardmissing(a, b, match=None): | 149 def _computeforwardmissing(a, b, match=None): |
492 incompletediverge) | 492 incompletediverge) |
493 | 493 |
494 renamedelete = {} | 494 renamedelete = {} |
495 renamedeleteset = set() | 495 renamedeleteset = set() |
496 divergeset = set() | 496 divergeset = set() |
497 for of, fl in diverge.items(): | 497 for of, fl in list(diverge.items()): |
498 if len(fl) == 1 or of in c1 or of in c2: | 498 if len(fl) == 1 or of in c1 or of in c2: |
499 del diverge[of] # not actually divergent, or not a rename | 499 del diverge[of] # not actually divergent, or not a rename |
500 if of not in c1 and of not in c2: | 500 if of not in c1 and of not in c2: |
501 # renamed on one side, deleted on the other side, but filter | 501 # renamed on one side, deleted on the other side, but filter |
502 # out files that have been renamed and then deleted | 502 # out files that have been renamed and then deleted |