##// END OF EJS Templates
py3: explicitly convert dict.keys() and dict.items() into a list...
Pulkit Goyal -
r34350:1a5abc45 default
parent child Browse files
Show More
@@ -141,7 +141,7 b' def _tracefile(fctx, am, limit=-1):'
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
@@ -494,7 +494,7 b' def _fullcopytracing(repo, c1, c2, base)'
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:
@@ -1029,7 +1029,7 b' def calculateupdates(repo, wctx, mctx, a'
1029 # bids is a mapping from action method to list af actions
1029 # bids is a mapping from action method to list af actions
1030 # Consensus?
1030 # Consensus?
1031 if len(bids) == 1: # all bids are the same kind of method
1031 if len(bids) == 1: # all bids are the same kind of method
1032 m, l = bids.items()[0]
1032 m, l = list(bids.items())[0]
1033 if all(a == l[0] for a in l[1:]): # len(bids) is > 1
1033 if all(a == l[0] for a in l[1:]): # len(bids) is > 1
1034 repo.ui.note(_(" %s: consensus for %s\n") % (f, m))
1034 repo.ui.note(_(" %s: consensus for %s\n") % (f, m))
1035 actions[f] = l[0]
1035 actions[f] = l[0]
@@ -1055,7 +1055,7 b' def calculateupdates(repo, wctx, mctx, a'
1055 for _f, args, msg in l:
1055 for _f, args, msg in l:
1056 repo.ui.note(' %s -> %s\n' % (msg, m))
1056 repo.ui.note(' %s -> %s\n' % (msg, m))
1057 # Pick random action. TODO: Instead, prompt user when resolving
1057 # Pick random action. TODO: Instead, prompt user when resolving
1058 m, l = bids.items()[0]
1058 m, l = list(bids.items())[0]
1059 repo.ui.warn(_(' %s: ambiguous merge - picked %s action\n') %
1059 repo.ui.warn(_(' %s: ambiguous merge - picked %s action\n') %
1060 (f, m))
1060 (f, m))
1061 actions[f] = l[0]
1061 actions[f] = l[0]
General Comments 0
You need to be logged in to leave comments. Login now