changeset 6401:635c57cf0de8

test-convert-svn-source: remove redundant tests
author Patrick Mezard <pmezard@gmail.com>
date Sat, 29 Mar 2008 17:16:39 +0100
parents c237b27e1350
children d1cf40b596f8 b8346ae5d64b ecde0baee570
files tests/test-convert-svn-source tests/test-convert-svn-source.out
diffstat 2 files changed, 47 insertions(+), 242 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-convert-svn-source	Sat Mar 29 17:16:18 2008 +0100
+++ b/tests/test-convert-svn-source	Sat Mar 29 17:16:39 2008 +0100
@@ -9,15 +9,10 @@
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
+echo 'hgext.graphlog =' >> $HGRCPATH
 
 svnadmin create svn-repo
 
-echo % initial svn import
-mkdir t
-cd t
-echo a > a
-cd ..
-
 svnpath=`pwd | fix_path`
 # SVN wants all paths to start with a slash. Unfortunately,
 # Windows ones don't. Handle that.
@@ -26,106 +21,6 @@
     svnpath='/'$svnpath
 fi
 
-svnurl=file://$svnpath/svn-repo/trunk/test
-svn import -m init t $svnurl | fix_path
-
-echo % update svn repository
-svn co $svnurl t2 | fix_path
-cd t2
-echo b >> a
-echo b > b
-svn add b
-svn ci -m changea
-cd ..
-
-echo % convert to hg once
-hg convert $svnurl
-
-echo % update svn repository again
-cd t2
-echo c >> a
-echo c >> b
-svn ci -m changeb
-cd ..
-
-echo % test incremental conversion
-hg convert -v $svnurl | sed 's/source:.*/source:/'
-
-echo % test filemap
-echo 'include b' > filemap
-hg convert --filemap filemap $svnurl fmap
-echo '[extensions]' >> $HGRCPATH
-echo 'hgext.graphlog =' >> $HGRCPATH
-hg glog -R fmap --template '#rev# #desc|firstline# files: #files#\n'
-
-echo % test stop revision
-hg convert --rev 1 $svnurl stoprev
-# Check convert_revision extra-records.
-# This is also the only place testing more than one extra field
-# in a revision.
-hg --cwd stoprev tip --debug | grep extra | sed 's/=.*/=/'
-
-########################################
-
-echo "# now tests that it works with trunk/branches/tags layout"
-echo
-echo % initial svn import
-mkdir projA
-cd projA
-mkdir trunk
-mkdir branches
-mkdir tags
-cd ..
-
-svnurl=file://$svnpath/svn-repo/projA
-svn import -m "init projA" projA $svnurl | fix_path
-
-
-echo % update svn repository
-svn co $svnurl/trunk A | fix_path
-cd A
-echo hello > letter.txt
-svn add letter.txt
-svn ci -m hello
-
-echo world >> letter.txt
-svn ci -m world
-
-svn copy -m "tag v0.1" $svnurl/trunk $svnurl/tags/v0.1
-
-echo 'nice day today!' >> letter.txt
-svn ci -m "nice day"
-cd ..
-
-echo % convert to hg once
-hg convert $svnurl A-hg
-
-echo % update svn repository again
-cd A
-echo "see second letter" >> letter.txt
-# Put it in a subdirectory to test duplicate file records
-# from svn source (issue 714)
-mkdir todo
-echo "nice to meet you" > todo/letter2.txt
-svn add todo
-svn ci -m "second letter"
-
-svn copy -m "tag v0.2" $svnurl/trunk $svnurl/tags/v0.2
-
-echo "blah-blah-blah" >> todo/letter2.txt
-svn ci -m "work in progress"
-cd ..
-
-echo % test incremental conversion
-hg convert $svnurl A-hg
-
-cd A-hg
-hg glog --template '#rev# #desc|firstline# files: #files#\n'
-hg tags -q
-cd ..
-
-########################################
-
 echo "# now tests that it works with trunk/tags layout, but no branches yet"
 echo
 echo % initial svn import
@@ -171,6 +66,8 @@
 svn ci -m "work in progress"
 cd ..
 
+########################################
+
 echo % test incremental conversion
 hg convert $svnurl B-hg
 
@@ -178,3 +75,15 @@
 hg glog --template '#rev# #desc|firstline# files: #files#\n'
 hg tags -q
 cd ..
+
+echo % test filemap
+echo 'include letter2.txt' > filemap
+hg convert --filemap filemap $svnurl/trunk fmap
+hg glog -R fmap --template '#rev# #desc|firstline# files: #files#\n'
+
+echo % test stop revision
+hg convert --rev 1 $svnurl/trunk stoprev
+# Check convert_revision extra-records.
+# This is also the only place testing more than one extra field
+# in a revision.
+hg --cwd stoprev tip --debug | grep extra | sed 's/=.*/=/'
--- a/tests/test-convert-svn-source.out	Sat Mar 29 17:16:18 2008 +0100
+++ b/tests/test-convert-svn-source.out	Sat Mar 29 17:16:39 2008 +0100
@@ -1,151 +1,24 @@
-% initial svn import
-Adding         t/a
-
-Committed revision 1.
-% update svn repository
-A    t2/a
-Checked out revision 1.
-A         b
-Sending        a
-Adding         b
-Transmitting file data ..
-Committed revision 2.
-% convert to hg once
-assuming destination test-hg
-initializing destination test-hg repository
-scanning source...
-sorting...
-converting...
-1 init
-0 changea
-% update svn repository again
-Sending        a
-Sending        b
-Transmitting file data ..
-Committed revision 3.
-% test incremental conversion
-assuming destination test-hg
-scanning source...
-fetching revision log for "/trunk/test" from 3 to 2
-sorting...
-converting...
-0 changeb
-source:
-a
-b
-no tags found at revision 3
-% test filemap
-initializing destination fmap repository
-scanning source...
-sorting...
-converting...
-2 init
-1 changea
-0 changeb
-o  1 changeb files: b
-|
-o  0 changea files: b
-
-% test stop revision
-initializing destination stoprev repository
-scanning source...
-sorting...
-converting...
-0 init
-extra:       branch=
-extra:       convert_revision=
-# now tests that it works with trunk/branches/tags layout
-
-% initial svn import
-Adding         projA/trunk
-Adding         projA/branches
-Adding         projA/tags
-
-Committed revision 4.
-% update svn repository
-Checked out revision 4.
-A         letter.txt
-Adding         letter.txt
-Transmitting file data .
-Committed revision 5.
-Sending        letter.txt
-Transmitting file data .
-Committed revision 6.
-
-Committed revision 7.
-Sending        letter.txt
-Transmitting file data .
-Committed revision 8.
-% convert to hg once
-initializing destination A-hg repository
-scanning source...
-sorting...
-converting...
-3 init projA
-2 hello
-1 world
-0 nice day
-updating tags
-% update svn repository again
-A         todo
-A         todo/letter2.txt
-Sending        letter.txt
-Adding         todo
-Adding         todo/letter2.txt
-Transmitting file data ..
-Committed revision 9.
-
-Committed revision 10.
-Sending        todo/letter2.txt
-Transmitting file data .
-Committed revision 11.
-% test incremental conversion
-scanning source...
-sorting...
-converting...
-1 second letter
-0 work in progress
-updating tags
-o  7 update tags files: .hgtags
-|
-o  6 work in progress files: todo/letter2.txt
-|
-o  5 second letter files: letter.txt todo/letter2.txt
-|
-o  4 update tags files: .hgtags
-|
-o  3 nice day files: letter.txt
-|
-o  2 world files: letter.txt
-|
-o  1 hello files: letter.txt
-|
-o  0 init projA files:
-
-tip
-v0.2
-v0.1
 # now tests that it works with trunk/tags layout, but no branches yet
 
 % initial svn import
 Adding         projB/trunk
 Adding         projB/tags
 
-Committed revision 12.
+Committed revision 1.
 % update svn repository
-Checked out revision 12.
+Checked out revision 1.
 A         letter.txt
 Adding         letter.txt
 Transmitting file data .
-Committed revision 13.
+Committed revision 2.
 Sending        letter.txt
 Transmitting file data .
-Committed revision 14.
+Committed revision 3.
 
-Committed revision 15.
+Committed revision 4.
 Sending        letter.txt
 Transmitting file data .
-Committed revision 16.
+Committed revision 5.
 % convert to hg once
 initializing destination B-hg repository
 scanning source...
@@ -161,12 +34,12 @@
 Sending        letter.txt
 Adding         letter2.txt
 Transmitting file data ..
-Committed revision 17.
+Committed revision 6.
 
-Committed revision 18.
+Committed revision 7.
 Sending        letter2.txt
 Transmitting file data .
-Committed revision 19.
+Committed revision 8.
 % test incremental conversion
 scanning source...
 sorting...
@@ -193,3 +66,26 @@
 tip
 v0.2
 v0.1
+% test filemap
+initializing destination fmap repository
+scanning source...
+sorting...
+converting...
+5 init projB
+4 hello
+3 world
+2 nice day
+1 second letter
+0 work in progress
+o  1 work in progress files: letter2.txt
+|
+o  0 second letter files: letter2.txt
+
+% test stop revision
+initializing destination stoprev repository
+scanning source...
+sorting...
+converting...
+0 init projB
+extra:       branch=
+extra:       convert_revision=