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