Show More
@@ -1,76 +1,76 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 |
|
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 | |
4 |
|
4 | |||
5 | fix_path() |
|
5 | fix_path() | |
6 | { |
|
6 | { | |
7 | tr '\\' / |
|
7 | tr '\\' / | |
8 | } |
|
8 | } | |
9 |
|
9 | |||
10 | echo "[extensions]" >> $HGRCPATH |
|
10 | echo "[extensions]" >> $HGRCPATH | |
11 | echo "convert = " >> $HGRCPATH |
|
11 | echo "convert = " >> $HGRCPATH | |
12 | echo "hgext.graphlog =" >> $HGRCPATH |
|
12 | echo "hgext.graphlog =" >> $HGRCPATH | |
13 |
|
13 | |||
14 | svnadmin create svn-repo |
|
14 | svnadmin create svn-repo | |
15 |
|
15 | |||
16 | svnpath=`pwd | fix_path` |
|
16 | svnpath=`pwd | fix_path` | |
17 | # SVN wants all paths to start with a slash. Unfortunately, |
|
17 | # SVN wants all paths to start with a slash. Unfortunately, | |
18 | # Windows ones don't. Handle that. |
|
18 | # Windows ones don't. Handle that. | |
19 | expr $svnpath : "\/" > /dev/null |
|
19 | expr $svnpath : "\/" > /dev/null | |
20 | if [ $? -ne 0 ]; then |
|
20 | if [ $? -ne 0 ]; then | |
21 | svnpath='/'$svnpath |
|
21 | svnpath='/'$svnpath | |
22 | fi |
|
22 | fi | |
23 |
|
23 | |||
24 | echo % initial svn import |
|
24 | echo % initial svn import | |
25 | mkdir projA |
|
25 | mkdir projA | |
26 | cd projA |
|
26 | cd projA | |
27 | mkdir trunk |
|
27 | mkdir trunk | |
28 | mkdir branches |
|
28 | mkdir branches | |
29 | mkdir tags |
|
29 | mkdir tags | |
30 | mkdir unrelated |
|
30 | mkdir unrelated | |
31 | cd .. |
|
31 | cd .. | |
32 |
|
32 | |||
33 | svnurl=file://$svnpath/svn-repo/projA |
|
33 | svnurl=file://$svnpath/svn-repo/projA | |
34 | svn import -m "init projA" projA $svnurl | fix_path |
|
34 | svn import -m "init projA" projA $svnurl | fix_path | |
35 |
|
35 | |||
36 | echo % update svn repository |
|
36 | echo % update svn repository | |
37 | svn co $svnurl A | fix_path |
|
37 | svn co $svnurl A | fix_path | |
38 | cd A |
|
38 | cd A | |
39 | echo a > trunk/a |
|
39 | echo a > trunk/a | |
40 | svn add trunk/a |
|
40 | svn add trunk/a | |
41 | svn ci -m adda |
|
41 | svn ci -m adda | |
42 | echo a >> trunk/a |
|
42 | echo a >> trunk/a | |
43 | svn ci -m changea |
|
43 | svn ci -m changea | |
44 | echo a >> trunk/a |
|
44 | echo a >> trunk/a | |
45 | svn ci -m changea2 |
|
45 | svn ci -m changea2 | |
46 | # Add an unrelated commit to test that tags are bound to the |
|
46 | # Add an unrelated commit to test that tags are bound to the | |
47 | # correct "from" revision and not a dummy one |
|
47 | # correct "from" revision and not a dummy one | |
48 | echo a >> unrelated/dummy |
|
48 | echo a >> unrelated/dummy | |
49 | svn add unrelated/dummy |
|
49 | svn add unrelated/dummy | |
50 | svn ci -m unrelatedchange |
|
50 | svn ci -m unrelatedchange | |
51 | echo % tag current revision |
|
51 | echo % tag current revision | |
52 | svn up |
|
52 | svn up | |
53 | svn copy trunk tags/trunk.v1 |
|
53 | svn copy trunk tags/trunk.v1 | |
54 | svn copy trunk tags/trunk.badtag |
|
54 | svn copy trunk tags/trunk.badtag | |
55 | svn ci -m "tagging trunk.v1 trunk.badtag" |
|
55 | svn ci -m "tagging trunk.v1 trunk.badtag" | |
56 | echo a >> trunk/a |
|
56 | echo a >> trunk/a | |
57 | svn ci -m changea3 |
|
57 | svn ci -m changea3 | |
58 | echo % fix the bad tag |
|
58 | echo % fix the bad tag | |
59 | # trunk.badtag should not show in converted tags |
|
59 | # trunk.badtag should not show in converted tags | |
60 | svn up |
|
60 | svn up | |
61 | svn mv tags/trunk.badtag tags/trunk.goodtag |
|
61 | svn mv tags/trunk.badtag tags/trunk.goodtag | |
62 | svn ci -m "fix trunk.badtag" |
|
62 | svn ci -m "fix trunk.badtag" | |
63 | cd .. |
|
63 | cd .. | |
64 |
|
64 | |||
65 | echo % convert |
|
65 | echo % convert | |
66 | hg convert --datesort $svnurl A-hg |
|
66 | hg convert --datesort $svnurl A-hg | |
67 |
|
67 | |||
68 | cd A-hg |
|
68 | cd A-hg | |
69 | hg glog --template '#rev# #desc|firstline# tags: #tags#\n' |
|
69 | hg glog --template '#rev# #desc|firstline# tags: #tags#\n' | |
70 | hg tags -q |
|
70 | hg tags -q | |
71 | cd .. |
|
71 | cd .. | |
72 |
|
72 | |||
73 | echo % convert without tags |
|
73 | echo % convert without tags | |
74 | hg convert --datesort --config convert.svn.tags= $svnurl A-notags-hg |
|
74 | hg convert --datesort --config convert.svn.tags= $svnurl A-notags-hg | |
75 |
hg -R |
|
75 | hg -R A-notags-hg tags -q | |
76 |
|
76 |
General Comments 0
You need to be logged in to leave comments.
Login now