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