##// END OF EJS Templates
merge with stable
Matt Mackall -
r17175:f76e2196 merge default
parent child Browse files
Show More
@@ -358,12 +358,13 b' class filemap_source(converter_source):'
358 # original filename in the rev part of the return value.
358 # original filename in the rev part of the return value.
359 changes, copies = self.base.getchanges(rev)
359 changes, copies = self.base.getchanges(rev)
360 newnames = {}
360 newnames = {}
361 files = []
361 files = {}
362 for f, r in changes:
362 for f, r in changes:
363 newf = self.filemapper(f)
363 newf = self.filemapper(f)
364 if newf:
364 if newf and (newf != f or newf not in files):
365 files.append((newf, (f, r)))
365 files[newf] = (f, r)
366 newnames[f] = newf
366 newnames[f] = newf
367 files = sorted(files.items())
367
368
368 ncopies = {}
369 ncopies = {}
369 for c in copies:
370 for c in copies:
@@ -376,6 +376,39 b' exercise incremental conversion at the s'
376 o 0 "addb" files: b
376 o 0 "addb" files: b
377
377
378
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
411
379 test merge parents/empty merges pruning
412 test merge parents/empty merges pruning
380
413
381 $ glog()
414 $ glog()
General Comments 0
You need to be logged in to leave comments. Login now