Test mercurial convert sink removes empty directories.
authorPatrick Mezard <pmezard@gmail.com>
Sun, 30 Sep 2007 12:08:33 +0200
changeset 5345 9f35d0bcf00e
parent 5344 002fe2f364f5
child 5346 8838fe5a236f
child 5353 9c0f864fddca
Test mercurial convert sink removes empty directories.
tests/test-convert-git
tests/test-convert-git.out
--- a/tests/test-convert-git	Sun Sep 30 12:08:33 2007 +0200
+++ b/tests/test-convert-git	Sun Sep 30 12:08:33 2007 +0200
@@ -25,16 +25,26 @@
 cd git-repo
 git init-db >/dev/null 2>/dev/null
 echo a > a
-git add a
-commit -m t1
+mkdir d
+echo b > d/b
+git add a d
+commit -a -m t1
+
+# Remove the directory, then try to replace it with a file
+# (issue 754)
+git rm -r d
+commit -m t2
+echo d > d
+git add d
+commit -m t3
 
 echo b >> a
-commit -a -m t2.1
+commit -a -m t4.1
 
 git checkout -b other HEAD^ >/dev/null 2>/dev/null
 echo c > a
 echo a >> a
-commit -a -m t2.2
+commit -a -m t4.2
 
 git checkout master >/dev/null 2>/dev/null
 git pull --no-commit . other > /dev/null 2>/dev/null
--- a/tests/test-convert-git.out	Sun Sep 30 12:08:33 2007 +0200
+++ b/tests/test-convert-git.out	Sun Sep 30 12:08:33 2007 +0200
@@ -1,18 +1,21 @@
+rm 'd/b'
 assuming destination git-repo-hg
 initializing destination git-repo-hg repository
 scanning source...
 sorting...
 converting...
-3 t1
-2 t2.1
-1 t2.2
+5 t1
+4 t2
+3 t3
+2 t4.1
+1 t4.2
 0 Merge branch other
-changeset:   3:f0873470732d
+changeset:   5:77dc8b329132
 tag:         tip
-parent:      1:cb991dbbb06b
-parent:      2:600bef931ca4
+parent:      3:6f360826ff29
+parent:      4:b5fadecd5d0e
 user:        test <test@example.org>
-date:        Mon Jan 01 00:00:13 2007 +0000
+date:        Mon Jan 01 00:00:15 2007 +0000
 files:       a
 description:
 Merge branch other