Mercurial > hg
comparison tests/test-convert-svn-tags @ 6398:0e91ef0b52e7
Add a test for svn tags conversion
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 29 Mar 2008 17:15:43 +0100 |
parents | |
children | 5efd447a9b8d |
comparison
equal
deleted
inserted
replaced
6397:e1402cf5e08a | 6398:0e91ef0b52e7 |
---|---|
1 #!/bin/sh | |
2 | |
3 "$TESTDIR/hghave" svn svn-bindings || exit 80 | |
4 | |
5 fix_path() | |
6 { | |
7 tr '\\' / | |
8 } | |
9 | |
10 echo "[extensions]" >> $HGRCPATH | |
11 echo "convert = " >> $HGRCPATH | |
12 echo "hgext.graphlog =" >> $HGRCPATH | |
13 | |
14 svnadmin create svn-repo | |
15 | |
16 svnpath=`pwd | fix_path` | |
17 # SVN wants all paths to start with a slash. Unfortunately, | |
18 # Windows ones don't. Handle that. | |
19 expr $svnpath : "\/" > /dev/null | |
20 if [ $? -ne 0 ]; then | |
21 svnpath='/'$svnpath | |
22 fi | |
23 | |
24 echo % initial svn import | |
25 mkdir projA | |
26 cd projA | |
27 mkdir trunk | |
28 mkdir branches | |
29 mkdir tags | |
30 cd .. | |
31 | |
32 svnurl=file://$svnpath/svn-repo/projA | |
33 svn import -m "init projA" projA $svnurl | fix_path | |
34 | |
35 echo % update svn repository | |
36 svn co $svnurl A | fix_path | |
37 cd A | |
38 echo a > trunk/a | |
39 svn add trunk/a | |
40 svn ci -m adda | |
41 echo a >> trunk/a | |
42 svn ci -m changea | |
43 echo a >> trunk/a | |
44 svn ci -m changea2 | |
45 echo % tag current revision | |
46 svn up | |
47 svn copy trunk tags/trunk.v1 | |
48 svn ci -m "tagging trunk.v1" | |
49 echo a >> trunk/a | |
50 svn ci -m changea3 | |
51 cd .. | |
52 | |
53 echo % convert | |
54 hg convert --datesort $svnurl A-hg | |
55 | |
56 cd A-hg | |
57 hg glog --template '#rev# #desc|firstline# tags: #tags#\n' | |
58 hg tags -q | |
59 cd .. |