--- a/mercurial/patch.py Sun May 17 03:26:08 2009 +0200
+++ b/mercurial/patch.py Sun May 17 03:28:49 2009 +0200
@@ -1033,7 +1033,7 @@
if not patches:
return
copies = []
- removes = {}
+ removes = set()
cfiles = patches.keys()
cwd = repo.getcwd()
if cwd:
@@ -1044,14 +1044,13 @@
continue
if gp.op == 'RENAME':
copies.append((gp.oldpath, gp.path))
- removes[gp.oldpath] = 1
+ removes.add(gp.oldpath)
elif gp.op == 'COPY':
copies.append((gp.oldpath, gp.path))
elif gp.op == 'DELETE':
- removes[gp.path] = 1
+ removes.add(gp.path)
for src, dst in copies:
repo.copy(src, dst)
- removes = removes.keys()
if (not similarity) and removes:
repo.remove(sorted(removes), True)
for f in patches:
@@ -1240,7 +1239,7 @@
for k, v in copy.items():
copy[v] = k
- gone = {}
+ gone = set()
gitmode = {'l': '120000', 'x': '100755', '': '100644'}
for f in sorted(modified + added + removed):
@@ -1262,7 +1261,7 @@
_addmodehdr(header, omode, mode)
if a in removed and a not in gone:
op = 'rename'
- gone[a] = 1
+ gone.add(a)
else:
op = 'copy'
header.append('%s from %s\n' % (op, a))