##// END OF EJS Templates
Test svn repository conversion
Patrick Mezard -
r5255:37c610c4 default
parent child Browse files
Show More
@@ -0,0 +1,53 b''
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
@@ -0,0 +1,32 b''
1 % initial svn import
2 Adding t/a
3
4 Committed revision 1.
5 % update svn repository
6 A t2/a
7 Checked out revision 1.
8 A b
9 Sending a
10 Adding b
11 Transmitting file data ..
12 Committed revision 2.
13 % convert to hg once
14 assuming destination trunk-hg
15 initializing destination trunk-hg repository
16 scanning source...
17 sorting...
18 converting...
19 1 init
20 0 changea
21 % update svn repository again
22 Sending a
23 Sending b
24 Transmitting file data ..
25 Committed revision 3.
26 % test incremental conversion
27 assuming destination trunk-hg
28 destination trunk-hg is a Mercurial repository
29 scanning source...
30 sorting...
31 converting...
32 0 changeb
General Comments 0
You need to be logged in to leave comments. Login now