changeset 6396:18eeabae6148

test-convert-mtn: test directory deletion
author Patrick Mezard <pmezard@gmail.com>
date Sat, 29 Mar 2008 17:14:47 +0100
parents 1e4ddc9ac9f7
children e1402cf5e08a
files tests/test-convert-mtn tests/test-convert-mtn.out
diffstat 2 files changed, 32 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-convert-mtn	Mon Mar 24 18:05:30 2008 -0500
+++ b/tests/test-convert-mtn	Sat Mar 29 17:14:47 2008 +0100
@@ -58,6 +58,15 @@
 # Test directory move
 mtn mv dir dir2
 mtn ci -m movedir
+# Test directory removal with empty directory
+mkdir dir2/dir
+mkdir dir2/dir/subdir
+echo f > dir2/dir/subdir/f
+mkdir dir2/dir/emptydir
+mtn add -R dir2/dir
+mtn ci -m emptydir
+mtn drop -R dir2/dir
+mtn ci -m dropdirectory
 cd ..
 
 echo % convert incrementally
@@ -75,4 +84,6 @@
 hg manifest
 echo % contents
 cat dir2/a
+test -d dir2/dir && echo 'removed dir2/dir is still there!'
+exit 0
 
--- a/tests/test-convert-mtn.out	Mon Mar 24 18:05:30 2008 -0500
+++ b/tests/test-convert-mtn.out	Sat Mar 29 17:14:47 2008 +0100
@@ -29,15 +29,33 @@
 mtn: renaming dir to dir2 in workspace manifest
 mtn: beginning commit on branch 'com.selenic.test'
 mtn: committed revision 5de5abe7c15eae70cf3acdda23c9c319ea50c1af
+mtn: adding dir2/dir to workspace manifest
+mtn: adding dir2/dir/emptydir to workspace manifest
+mtn: adding dir2/dir/subdir to workspace manifest
+mtn: adding dir2/dir/subdir/f to workspace manifest
+mtn: beginning commit on branch 'com.selenic.test'
+mtn: committed revision 27a423be1e406595cc57f50f42a8790fa0a93d8e
+mtn: dropping dir2/dir/subdir/f from workspace manifest
+mtn: dropping dir2/dir/subdir from workspace manifest
+mtn: dropping dir2/dir/emptydir from workspace manifest
+mtn: dropping dir2/dir from workspace manifest
+mtn: beginning commit on branch 'com.selenic.test'
+mtn: committed revision ba57ba5ac63178529d37fa8a2a1a012fc0e42047
 % convert incrementally
 assuming destination repo.mtn-hg
 scanning source...
 sorting...
 converting...
-1 update2
-0 movedir
+3 update2
+2 movedir
+1 emptydir
+0 dropdirectory
 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-@  3 "movedir" files: dir/a dir2/a
+@  5 "dropdirectory" files: dir2/dir/subdir/f
+|
+o  4 "emptydir" files: dir2/dir/subdir/f
+|
+o  3 "movedir" files: dir/a dir2/a
 |
 o  2 "update2" files: bin bin2 dir/b e
 |