[PATCH] convert: Test svn sink for a repo with tags.
Daniel J. Lauk
daniel.lauk at gmail.com
Thu Aug 12 04:21:32 CDT 2010
# HG changeset patch
# User Daniel J. Lauk <daniel.lauk at gmail.com>
# Date 1281604533 -7200
# Node ID 107e8db07977c2e68327b94123ebdc51ae506149
# Parent 00cde9bddbe426d0fef20e001e590c2c3b15b01f
convert: Test svn sink for a repo with tags.
This test case backs the fix in changeset 7e5f5e5858f9. The subversion
sink used to crash, if the source repo used tags.
diff --git a/tests/test-convert-svn-sink b/tests/test-convert-svn-sink
--- a/tests/test-convert-svn-sink
+++ b/tests/test-convert-svn-sink
@@ -134,3 +134,15 @@
hg convert -d svn b
echo % expect 4 changes
svnupanddisplay b-hg-wc 0
+
+echo % tags are not supported, but must not break conversion
+
+rm -rf a a-hg a-hg-wc
+hg init a
+echo a > a/a
+hg --cwd a ci -d '0 0' -A -m 'Add file a'
+hg --cwd a tag -d '1 0' -m 'Tagged as v1.0' v1.0
+
+hg convert -d svn a
+svnupanddisplay a-hg-wc 2
+rm -rf a a-hg a-hg-wc
diff --git a/tests/test-convert-svn-sink.out b/tests/test-convert-svn-sink.out
--- a/tests/test-convert-svn-sink.out
+++ b/tests/test-convert-svn-sink.out
@@ -335,3 +335,41 @@
<msg>base</msg>
</logentry>
</log>
+% tags are not supported, but must not break conversion
+adding a
+assuming destination a-hg
+initializing svn repository 'a-hg'
+initializing svn working copy 'a-hg-wc'
+scanning source...
+sorting...
+converting...
+1 Add file a
+0 Tagged as v1.0
+writing Subversion tags is not yet implemented
+At revision 2.
+ 2 2 test .
+ 2 1 test a
+ 2 2 test .hgtags
+<?xml version="1.0"?>
+<log>
+<logentry
+ revision="2">
+<author>test</author>
+<date/>
+<paths>
+<path
+ action="A">/.hgtags</path>
+</paths>
+<msg>Tagged as v1.0</msg>
+</logentry>
+<logentry
+ revision="1">
+<author>test</author>
+<date/>
+<paths>
+<path
+ action="A">/a</path>
+</paths>
+<msg>Add file a</msg>
+</logentry>
+</log>
More information about the Mercurial-devel
mailing list