Show More
@@ -341,7 +341,7 def updatedir(ui, repo, patches, wlock=N | |||
|
341 | 341 | if not patches: |
|
342 | 342 | return |
|
343 | 343 | copies = [] |
|
344 |
removes = |
|
|
344 | removes = {} | |
|
345 | 345 | cfiles = patches.keys() |
|
346 | 346 | cwd = repo.getcwd() |
|
347 | 347 | if cwd: |
@@ -350,16 +350,18 def updatedir(ui, repo, patches, wlock=N | |||
|
350 | 350 | ctype, gp = patches[f] |
|
351 | 351 | if ctype == 'RENAME': |
|
352 | 352 | copies.append((gp.oldpath, gp.path, gp.copymod)) |
|
353 |
removes |
|
|
353 | removes[gp.oldpath] = 1 | |
|
354 | 354 | elif ctype == 'COPY': |
|
355 | 355 | copies.append((gp.oldpath, gp.path, gp.copymod)) |
|
356 | 356 | elif ctype == 'DELETE': |
|
357 |
removes |
|
|
357 | removes[gp.path] = 1 | |
|
358 | 358 | for src, dst, after in copies: |
|
359 | 359 | if not after: |
|
360 | 360 | copyfile(src, dst, repo.root) |
|
361 | 361 | repo.copy(src, dst, wlock=wlock) |
|
362 | removes = removes.keys() | |
|
362 | 363 | if removes: |
|
364 | removes.sort() | |
|
363 | 365 | repo.remove(removes, True, wlock=wlock) |
|
364 | 366 | for f in patches: |
|
365 | 367 | ctype, gp = patches[f] |
@@ -127,3 +127,19 EOF | |||
|
127 | 127 | |
|
128 | 128 | hg locate copy2 |
|
129 | 129 | hg cat rename2 |
|
130 | ||
|
131 | echo % one file renamed multiple times | |
|
132 | hg import -mmultirenames - <<EOF | |
|
133 | diff --git a/rename2 b/rename3 | |
|
134 | rename from rename2 | |
|
135 | rename to rename3 | |
|
136 | diff --git a/rename2 b/rename3-2 | |
|
137 | rename from rename2 | |
|
138 | rename to rename3-2 | |
|
139 | EOF | |
|
140 | hg log -vCr. --template '{rev} {files} / {file_copies%filecopy}\n' | |
|
141 | ||
|
142 | hg locate rename2 rename3 rename3-2 | |
|
143 | hg cat rename3 | |
|
144 | echo | |
|
145 | hg cat rename3-2 |
General Comments 0
You need to be logged in to leave comments.
Login now