Show More
@@ -1,53 +1,53 | |||||
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 |
|
12 | |||
13 | svnadmin create svn-repo |
|
13 | svnadmin create svn-repo | |
14 |
|
14 | |||
15 | echo % initial svn import |
|
15 | echo % initial svn import | |
16 | mkdir t |
|
16 | mkdir t | |
17 | cd t |
|
17 | cd t | |
18 | echo a > a |
|
18 | echo a > a | |
19 | cd .. |
|
19 | cd .. | |
20 |
|
20 | |||
21 |
svnpath=`pwd | |
|
21 | svnpath=`pwd | fix_path` | |
22 | # SVN wants all paths to start with a slash. Unfortunately, |
|
22 | # SVN wants all paths to start with a slash. Unfortunately, | |
23 | # Windows ones don't. Handle that. |
|
23 | # Windows ones don't. Handle that. | |
24 | expr $svnpath : "\/" > /dev/null |
|
24 | expr $svnpath : "\/" > /dev/null | |
25 | if [ $? -ne 0 ]; then |
|
25 | if [ $? -ne 0 ]; then | |
26 | svnpath='/'$svnpath |
|
26 | svnpath='/'$svnpath | |
27 | fi |
|
27 | fi | |
28 |
|
28 | |||
29 | svnurl=file://$svnpath/svn-repo/trunk |
|
29 | svnurl=file://$svnpath/svn-repo/trunk | |
30 | svn import -m init t $svnurl | fix_path |
|
30 | svn import -m init t $svnurl | fix_path | |
31 |
|
31 | |||
32 | echo % update svn repository |
|
32 | echo % update svn repository | |
33 | svn co $svnurl t2 | fix_path |
|
33 | svn co $svnurl t2 | fix_path | |
34 | cd t2 |
|
34 | cd t2 | |
35 | echo b >> a |
|
35 | echo b >> a | |
36 | echo b > b |
|
36 | echo b > b | |
37 | svn add b |
|
37 | svn add b | |
38 | svn ci -m changea |
|
38 | svn ci -m changea | |
39 | cd .. |
|
39 | cd .. | |
40 |
|
40 | |||
41 | echo % convert to hg once |
|
41 | echo % convert to hg once | |
42 | hg convert $svnurl |
|
42 | hg convert $svnurl | |
43 |
|
43 | |||
44 | echo % update svn repository again |
|
44 | echo % update svn repository again | |
45 | cd t2 |
|
45 | cd t2 | |
46 | echo c >> a |
|
46 | echo c >> a | |
47 | echo c >> b |
|
47 | echo c >> b | |
48 | svn ci -m changeb |
|
48 | svn ci -m changeb | |
49 | cd .. |
|
49 | cd .. | |
50 |
|
50 | |||
51 | echo % test incremental conversion |
|
51 | echo % test incremental conversion | |
52 | hg convert $svnurl |
|
52 | hg convert $svnurl | |
53 |
|
53 |
General Comments 0
You need to be logged in to leave comments.
Login now