Show More
@@ -348,12 +348,13 b' class filemap_source(converter_source):' | |||||
348 | # original filename in the rev part of the return value. |
|
348 | # original filename in the rev part of the return value. | |
349 | changes, copies = self.base.getchanges(rev) |
|
349 | changes, copies = self.base.getchanges(rev) | |
350 | newnames = {} |
|
350 | newnames = {} | |
351 |
files = |
|
351 | files = {} | |
352 | for f, r in changes: |
|
352 | for f, r in changes: | |
353 | newf = self.filemapper(f) |
|
353 | newf = self.filemapper(f) | |
354 | if newf: |
|
354 | if newf and (newf != f or newf not in files): | |
355 |
files |
|
355 | files[newf] = (f, r) | |
356 | newnames[f] = newf |
|
356 | newnames[f] = newf | |
|
357 | files = sorted(files.items()) | |||
357 |
|
358 | |||
358 | ncopies = {} |
|
359 | ncopies = {} | |
359 | for c in copies: |
|
360 | for c in copies: |
@@ -375,3 +375,36 b' exercise incremental conversion at the s' | |||||
375 | | |
|
375 | | | |
376 | o 0 "addb" files: b |
|
376 | o 0 "addb" files: b | |
377 |
|
377 | |||
|
378 | ||||
|
379 | filemap rename undoing revision rename | |||
|
380 | ||||
|
381 | $ hg init renameundo | |||
|
382 | $ cd renameundo | |||
|
383 | $ echo 1 > a | |||
|
384 | $ echo 1 > c | |||
|
385 | $ hg ci -qAm add | |||
|
386 | $ hg mv -q a b/a | |||
|
387 | $ hg mv -q c b/c | |||
|
388 | $ hg ci -qm rename | |||
|
389 | $ echo 2 > b/a | |||
|
390 | $ echo 2 > b/c | |||
|
391 | $ hg ci -qm modify | |||
|
392 | $ cd .. | |||
|
393 | ||||
|
394 | $ echo "rename b ." > renameundo.fmap | |||
|
395 | $ hg convert --filemap renameundo.fmap renameundo renameundo2 | |||
|
396 | initializing destination renameundo2 repository | |||
|
397 | scanning source... | |||
|
398 | sorting... | |||
|
399 | converting... | |||
|
400 | 2 add | |||
|
401 | 1 rename | |||
|
402 | filtering out empty revision | |||
|
403 | repository tip rolled back to revision 0 (undo commit) | |||
|
404 | 0 modify | |||
|
405 | $ glog -R renameundo2 | |||
|
406 | o 1 "modify" files: a c | |||
|
407 | | | |||
|
408 | o 0 "add" files: a c | |||
|
409 | ||||
|
410 |
General Comments 0
You need to be logged in to leave comments.
Login now