Mercurial > hg-stable
diff tests/svn/svndump-tags.sh @ 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 | |
children | 965b11c1bd82 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/svn/svndump-tags.sh Sat Dec 06 20:07:44 2008 +0100 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Use this script to generate tags.svndump +# + +mkdir temp +cd temp + +mkdir project-orig +cd project-orig +mkdir trunk +mkdir branches +mkdir tags +mkdir unrelated +cd .. + +svnadmin create svn-repo +svnurl=file://`pwd`/svn-repo +svn import project-orig $svnurl -m "init projA" + +svn co $svnurl project +cd project +echo a > trunk/a +svn add trunk/a +svn ci -m adda +echo a >> trunk/a +svn ci -m changea +echo 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 +echo a >> unrelated/dummy +svn add unrelated/dummy +svn ci -m unrelatedchange +# 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" +echo a >> trunk/a +svn ci -m changea3 +# 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 .. + +svnadmin dump svn-repo > ../tags.svndump \ No newline at end of file