14 |
14 |
15 |
15 |
16 handle svn subrepos safely |
16 handle svn subrepos safely |
17 |
17 |
18 $ svnadmin create svn-repo-2499 |
18 $ svnadmin create svn-repo-2499 |
19 $ curpath=`pwd | tr '\\\\' /` |
19 |
20 $ expr "$svnpath" : "\/" > /dev/null |
20 $ SVNREPOPATH=`pwd`/svn-repo-2499/project |
21 > if [ $? -ne 0 ]; then |
21 #if windows |
22 > curpath="/$curpath" |
22 $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
23 > fi |
23 #else |
24 $ svnurl="file://$curpath/svn-repo-2499/project" |
24 $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
|
25 #endif |
|
26 |
25 $ mkdir -p svn-project-2499/trunk |
27 $ mkdir -p svn-project-2499/trunk |
26 $ svn import -m 'init project' svn-project-2499 "$svnurl" |
28 $ svn import -m 'init project' svn-project-2499 "$SVNREPOURL" |
27 Adding svn-project-2499/trunk (glob) |
29 Adding svn-project-2499/trunk (glob) |
28 |
30 |
29 Committed revision 1. |
31 Committed revision 1. |
30 |
32 |
31 qnew on repo w/svn subrepo |
33 qnew on repo w/svn subrepo |
32 $ mkrepo repo-2499-svn-subrepo |
34 $ mkrepo repo-2499-svn-subrepo |
33 $ svn co "$svnurl"/trunk sub |
35 $ svn co "$SVNREPOURL"/trunk sub |
34 Checked out revision 1. |
36 Checked out revision 1. |
35 $ echo 'sub = [svn]sub' >> .hgsub |
37 $ echo 'sub = [svn]sub' >> .hgsub |
36 $ hg add .hgsub |
38 $ hg add .hgsub |
37 $ hg status -S -X '**/format' |
39 $ hg status -S -X '**/format' |
38 A .hgsub |
40 A .hgsub |