Show More
@@ -1,56 +1,63 | |||
|
1 | 1 | #require svn13 |
|
2 | 2 | |
|
3 | 3 | $ cat <<EOF >> $HGRCPATH |
|
4 | 4 | > [extensions] |
|
5 | 5 | > mq = |
|
6 | 6 | > [diff] |
|
7 | 7 | > nodates = 1 |
|
8 | 8 | > [subrepos] |
|
9 | 9 | > allowed = true |
|
10 | 10 | > svn:allowed = true |
|
11 | 11 | > EOF |
|
12 | 12 | |
|
13 | 13 | fn to create new repository, and cd into it |
|
14 | 14 | $ mkrepo() { |
|
15 | 15 | > hg init $1 |
|
16 | 16 | > cd $1 |
|
17 | 17 | > hg qinit |
|
18 | 18 | > } |
|
19 | 19 | |
|
20 | 20 | |
|
21 | 21 | handle svn subrepos safely |
|
22 | 22 | |
|
23 | 23 | $ svnadmin create svn-repo-2499 |
|
24 | 24 | |
|
25 | 25 | $ SVNREPOPATH=`pwd`/svn-repo-2499/project |
|
26 | ||
|
27 | #if py3 | |
|
28 | $ pathquoted=`"$PYTHON" -c "import sys, urllib.parse; sys.stdout.write(urllib.parse.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
|
29 | #else | |
|
30 | $ pathquoted=`"$PYTHON" -c "import sys, urllib; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
|
31 | #endif | |
|
32 | ||
|
26 | 33 | #if windows |
|
27 | $ SVNREPOURL=file:///`"$PYTHON" -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
|
34 | $ SVNREPOURL=file:///$pathquoted | |
|
28 | 35 | #else |
|
29 | $ SVNREPOURL=file://`"$PYTHON" -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
|
36 | $ SVNREPOURL=file://$pathquoted | |
|
30 | 37 | #endif |
|
31 | 38 | |
|
32 | 39 | $ mkdir -p svn-project-2499/trunk |
|
33 | 40 | $ svn import -qm 'init project' svn-project-2499 "$SVNREPOURL" |
|
34 | 41 | |
|
35 | 42 | qnew on repo w/svn subrepo |
|
36 | 43 | $ mkrepo repo-2499-svn-subrepo |
|
37 | 44 | $ svn co "$SVNREPOURL"/trunk sub |
|
38 | 45 | Checked out revision 1. |
|
39 | 46 | $ echo 'sub = [svn]sub' >> .hgsub |
|
40 | 47 | $ hg add .hgsub |
|
41 | 48 | $ hg status -S -X '**/format' |
|
42 | 49 | A .hgsub |
|
43 | 50 | $ hg qnew -m0 0.diff |
|
44 | 51 | $ cd sub |
|
45 | 52 | $ echo a > a |
|
46 | 53 | $ svn add a |
|
47 | 54 | A a |
|
48 | 55 | $ svn st |
|
49 | 56 | A* a (glob) |
|
50 | 57 | $ cd .. |
|
51 | 58 | $ hg status -S # doesn't show status for svn subrepos (yet) |
|
52 | 59 | $ hg qnew -m1 1.diff |
|
53 | 60 | abort: uncommitted changes in subrepository "sub" |
|
54 | 61 | [255] |
|
55 | 62 | |
|
56 | 63 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now