Mercurial > hg
comparison tests/test-convert-hg-svn @ 5809:34c4131abdf9
test-convert-hg-svn: make it more windows friendly
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 05 Jan 2008 17:36:16 +0100 |
parents | 2147a734dcf9 |
children | a02d43acbc04 |
comparison
equal
deleted
inserted
replaced
5808:80e40ef3d8b8 | 5809:34c4131abdf9 |
---|---|
8 } | 8 } |
9 | 9 |
10 echo "[extensions]" >> $HGRCPATH | 10 echo "[extensions]" >> $HGRCPATH |
11 echo "convert = " >> $HGRCPATH | 11 echo "convert = " >> $HGRCPATH |
12 | 12 |
13 svnpath=`pwd`/svn-repo | 13 svnpath=`pwd | fix_path`/svn-repo |
14 svnadmin create $svnpath | 14 svnadmin create $svnpath |
15 | 15 |
16 cat > $svnpath/hooks/pre-revprop-change <<'EOF' | 16 cat > $svnpath/hooks/pre-revprop-change <<'EOF' |
17 #!/bin/sh | 17 #!/bin/sh |
18 | 18 |
29 echo "Changing prohibited revision property" >&2 | 29 echo "Changing prohibited revision property" >&2 |
30 exit 1 | 30 exit 1 |
31 EOF | 31 EOF |
32 chmod +x $svnpath/hooks/pre-revprop-change | 32 chmod +x $svnpath/hooks/pre-revprop-change |
33 | 33 |
34 svnurl=file://$svnpath | 34 # SVN wants all paths to start with a slash. Unfortunately, |
35 # Windows ones don't. Handle that. | |
36 svnurl=$svnpath | |
37 expr $svnurl : "\/" > /dev/null | |
38 if [ $? -ne 0 ]; then | |
39 svnurl='/'$svnurl | |
40 fi | |
41 svnurl=file://$svnurl | |
35 svn co $svnurl $svnpath-wc | 42 svn co $svnurl $svnpath-wc |
36 | 43 |
37 cd $svnpath-wc | 44 cd $svnpath-wc |
38 echo a > a | 45 echo a > a |
39 svn add a | 46 svn add a |