Mercurial > hg
diff tests/test-convert-svn-tags @ 7475:90d8dfb481e7
Rewrite svn tests using svndump
They are:
- faster to run (12s vs 30s in test-convert-svn-branches case)
- easier to craft
- easier to debug
- more portable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 06 Dec 2008 20:07:44 +0100 |
parents | 6ec941b6003d |
children | 965b11c1bd82 |
line wrap: on
line diff
--- a/tests/test-convert-svn-tags Tue Nov 18 21:46:01 2008 -0600 +++ b/tests/test-convert-svn-tags Sat Dec 06 20:07:44 2008 +0100 @@ -12,6 +12,7 @@ echo "hgext.graphlog =" >> $HGRCPATH svnadmin create svn-repo +cat "$TESTDIR/svn/tags.svndump" | svnadmin load svn-repo > /dev/null svnpath=`pwd | fix_path` # SVN wants all paths to start with a slash. Unfortunately, @@ -20,47 +21,7 @@ if [ $? -ne 0 ]; then svnpath='/'$svnpath fi - -echo % initial svn import -mkdir projA -cd projA -mkdir trunk -mkdir branches -mkdir tags -mkdir unrelated -cd .. - -svnurl=file://$svnpath/svn-repo/projA -svn import -m "init projA" projA $svnurl | fix_path | sort - -echo % update svn repository -svn co $svnurl A | fix_path -cd A -echo a > trunk/a -svn add trunk/a -svn ci -m adda -"$TESTDIR/svn-safe-append.py" a trunk/a -svn ci -m changea -"$TESTDIR/svn-safe-append.py" a trunk/a -svn ci -m changea2 -# Add an unrelated commit to test that tags are bound to the -# correct "from" revision and not a dummy one -"$TESTDIR/svn-safe-append.py" a unrelated/dummy -svn add unrelated/dummy -svn ci -m unrelatedchange -echo % tag current revision -svn up -svn copy trunk tags/trunk.v1 -svn copy trunk tags/trunk.badtag -svn ci -m "tagging trunk.v1 trunk.badtag" -"$TESTDIR/svn-safe-append.py" a trunk/a -svn ci -m changea3 -echo % fix the bad tag -# trunk.badtag should not show in converted tags -svn up -svn mv tags/trunk.badtag tags/trunk.goodtag -svn ci -m "fix trunk.badtag" -cd .. +svnurl=file://$svnpath/svn-repo echo % convert hg convert --datesort $svnurl A-hg