##// END OF EJS Templates
tests: cleanup of svn url handling...
Mads Kiilerich -
r17033:0413f68d default
parent child Browse files
Show More
@@ -1,15 +1,18 b''
1
1
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
3 $ fix_path()
4 > {
5 > tr '\\' /
6 > }
7 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
8 $ echo "convert = " >> $HGRCPATH
4 $ echo "convert = " >> $HGRCPATH
9 $ echo "mq = " >> $HGRCPATH
5 $ echo "mq = " >> $HGRCPATH
10 $ svnpath=`pwd | fix_path`/svn-repo
6
11 $ svnadmin create "$svnpath"
7 $ SVNREPOPATH=`pwd`/svn-repo
12 $ cat > "$svnpath"/hooks/pre-revprop-change <<EOF
8 #if windows
9 $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
10 #else
11 $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
12 #endif
13
14 $ svnadmin create "$SVNREPOPATH"
15 $ cat > "$SVNREPOPATH"/hooks/pre-revprop-change <<EOF
13 > #!/bin/sh
16 > #!/bin/sh
14 >
17 >
15 > REPOS="$1"
18 > REPOS="$1"
@@ -25,16 +28,10 b''
25 > echo "Changing prohibited revision property" >&2
28 > echo "Changing prohibited revision property" >&2
26 > exit 1
29 > exit 1
27 > EOF
30 > EOF
28 $ chmod +x "$svnpath"/hooks/pre-revprop-change
31 $ chmod +x "$SVNREPOPATH"/hooks/pre-revprop-change
29 $
32 $ svn co "$SVNREPOURL" "$SVNREPOPATH"-wc
30 $ # SVN wants all paths to start with a slash. Unfortunately,
31 $ # Windows ones don't. Handle that.
32 $ svnurl="$svnpath"
33 $ expr "$svnurl" : "\/" > /dev/null || svnurl="/$svnurl"
34 $ svnurl="file://$svnurl"
35 $ svn co "$svnurl" "$svnpath"-wc
36 Checked out revision 0.
33 Checked out revision 0.
37 $ cd "$svnpath"-wc
34 $ cd "$SVNREPOPATH"-wc
38 $ echo a > a
35 $ echo a > a
39 $ svn add a
36 $ svn add a
40 A a
37 A a
@@ -46,33 +43,33 b''
46
43
47 initial roundtrip
44 initial roundtrip
48
45
49 $ hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg | grep -v initializing
46 $ hg convert -s svn -d hg "$SVNREPOPATH"-wc "$SVNREPOPATH"-hg | grep -v initializing
50 scanning source...
47 scanning source...
51 sorting...
48 sorting...
52 converting...
49 converting...
53 0 added a
50 0 added a
54 $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
51 $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
55 scanning source...
52 scanning source...
56 sorting...
53 sorting...
57 converting...
54 converting...
58
55
59 second roundtrip should do nothing
56 second roundtrip should do nothing
60
57
61 $ hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg
58 $ hg convert -s svn -d hg "$SVNREPOPATH"-wc "$SVNREPOPATH"-hg
62 scanning source...
59 scanning source...
63 sorting...
60 sorting...
64 converting...
61 converting...
65 $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
62 $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
66 scanning source...
63 scanning source...
67 sorting...
64 sorting...
68 converting...
65 converting...
69
66
70 new hg rev
67 new hg rev
71
68
72 $ hg clone "$svnpath"-hg "$svnpath"-work
69 $ hg clone "$SVNREPOPATH"-hg "$SVNREPOPATH"-work
73 updating to branch default
70 updating to branch default
74 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
75 $ cd "$svnpath"-work
72 $ cd "$SVNREPOPATH"-work
76 $ echo b > b
73 $ echo b > b
77 $ hg add b
74 $ hg add b
78 $ hg ci -mb
75 $ hg ci -mb
@@ -85,8 +82,8 b' adding an empty revision'
85
82
86 echo hg to svn
83 echo hg to svn
87
84
88 $ hg --cwd "$svnpath"-hg pull -q "$svnpath"-work
85 $ hg --cwd "$SVNREPOPATH"-hg pull -q "$SVNREPOPATH"-work
89 $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
86 $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
90 scanning source...
87 scanning source...
91 sorting...
88 sorting...
92 converting...
89 converting...
@@ -95,14 +92,14 b' echo hg to svn'
95
92
96 svn back to hg should do nothing
93 svn back to hg should do nothing
97
94
98 $ hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg
95 $ hg convert -s svn -d hg "$SVNREPOPATH"-wc "$SVNREPOPATH"-hg
99 scanning source...
96 scanning source...
100 sorting...
97 sorting...
101 converting...
98 converting...
102
99
103 hg back to svn should do nothing
100 hg back to svn should do nothing
104
101
105 $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
102 $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
106 scanning source...
103 scanning source...
107 sorting...
104 sorting...
108 converting...
105 converting...
@@ -1,10 +1,6 b''
1
1
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
3
3
4 $ fixpath()
5 > {
6 > tr '\\' /
7 > }
8 $ cat >> $HGRCPATH <<EOF
4 $ cat >> $HGRCPATH <<EOF
9 > [extensions]
5 > [extensions]
10 > convert =
6 > convert =
@@ -13,20 +9,16 b''
13
9
14 $ svnadmin create svn-repo
10 $ svnadmin create svn-repo
15 $ svnadmin load -q svn-repo < "$TESTDIR/svn/move.svndump"
11 $ svnadmin load -q svn-repo < "$TESTDIR/svn/move.svndump"
16 $ svnpath=`pwd | fixpath`
12 $ SVNREPOPATH=`pwd`/svn-repo
17
13 #if windows
18 SVN wants all paths to start with a slash. Unfortunately,
14 $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
19 Windows ones don't. Handle that.
15 #else
20
16 $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
21 $ expr "$svnpath" : "\/" > /dev/null
17 #endif
22 > if [ $? -ne 0 ]; then
23 > svnpath="/$svnpath"
24 > fi
25 > svnurl="file://$svnpath/svn-repo"
26
18
27 Convert trunk and branches
19 Convert trunk and branches
28
20
29 $ hg convert --datesort "$svnurl"/subproject A-hg
21 $ hg convert --datesort "$SVNREPOURL"/subproject A-hg
30 initializing destination A-hg repository
22 initializing destination A-hg repository
31 scanning source...
23 scanning source...
32 sorting...
24 sorting...
@@ -1,15 +1,11 b''
1 $ "$TESTDIR/hghave" svn13 || exit 80
1 $ "$TESTDIR/hghave" svn13 || exit 80
2
2
3 $ fixpath()
4 > {
5 > tr '\\' /
6 > }
7 $ svnupanddisplay()
3 $ svnupanddisplay()
8 > {
4 > {
9 > (
5 > (
10 > cd $1;
6 > cd $1;
11 > svn up -q;
7 > svn up -q;
12 > svn st -v | fixpath | sed 's/ */ /g' | sort
8 > svn st -v | sed 's/ */ /g' | sort
13 > limit=''
9 > limit=''
14 > if [ $2 -gt 0 ]; then
10 > if [ $2 -gt 0 ]; then
15 > limit="--limit=$2"
11 > limit="--limit=$2"
@@ -1,10 +1,6 b''
1
1
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
2 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
3
3
4 $ fixpath()
5 > {
6 > tr '\\' /
7 > }
8 $ cat >> $HGRCPATH <<EOF
4 $ cat >> $HGRCPATH <<EOF
9 > [extensions]
5 > [extensions]
10 > convert =
6 > convert =
@@ -14,14 +10,12 b''
14 > EOF
10 > EOF
15
11
16 $ svnadmin create svn-repo
12 $ svnadmin create svn-repo
17 $ svnpath=`pwd | fixpath`
13 $ SVNREPOPATH=`pwd`/svn-repo
18
14 #if windows
19
15 $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
20 $ expr "$svnpath" : "\/" > /dev/null
16 #else
21 > if [ $? -ne 0 ]; then
17 $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
22 > svnpath="/$svnpath"
18 #endif
23 > fi
24 > svnurl="file://$svnpath/svn-repo"
25
19
26 Now test that it works with trunk/tags layout, but no branches yet.
20 Now test that it works with trunk/tags layout, but no branches yet.
27
21
@@ -33,8 +27,7 b' Initial svn import'
33 $ mkdir tags
27 $ mkdir tags
34 $ cd ..
28 $ cd ..
35
29
36 $ svnurl="file://$svnpath/svn-repo/proj%20B"
30 $ svn import -m "init projB" projB "$SVNREPOURL/proj%20B" | sort
37 $ svn import -m "init projB" projB "$svnurl" | fixpath | sort
38
31
39 Adding projB/mytrunk
32 Adding projB/mytrunk
40 Adding projB/tags
33 Adding projB/tags
@@ -42,7 +35,7 b' Initial svn import'
42
35
43 Update svn repository
36 Update svn repository
44
37
45 $ svn co "$svnurl"/mytrunk B | fixpath
38 $ svn co "$SVNREPOURL/proj%20B/mytrunk" B
46 Checked out revision 1.
39 Checked out revision 1.
47 $ cd B
40 $ cd B
48 $ echo hello > 'letter .txt'
41 $ echo hello > 'letter .txt'
@@ -59,7 +52,7 b' Update svn repository'
59 Transmitting file data .
52 Transmitting file data .
60 Committed revision 3.
53 Committed revision 3.
61
54
62 $ svn copy -m "tag v0.1" "$svnurl"/mytrunk "$svnurl"/tags/v0.1
55 $ svn copy -m "tag v0.1" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.1"
63
56
64 Committed revision 4.
57 Committed revision 4.
65
58
@@ -72,7 +65,7 b' Update svn repository'
72
65
73 Convert to hg once
66 Convert to hg once
74
67
75 $ hg convert "$svnurl" B-hg
68 $ hg convert "$SVNREPOURL/proj%20B" B-hg
76 initializing destination B-hg repository
69 initializing destination B-hg repository
77 scanning source...
70 scanning source...
78 sorting...
71 sorting...
@@ -96,7 +89,7 b' Update svn repository again'
96 Transmitting file data ..
89 Transmitting file data ..
97 Committed revision 6.
90 Committed revision 6.
98
91
99 $ svn copy -m "tag v0.2" "$svnurl"/mytrunk "$svnurl"/tags/v0.2
92 $ svn copy -m "tag v0.2" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.2"
100
93
101 Committed revision 7.
94 Committed revision 7.
102
95
@@ -107,7 +100,7 b' Update svn repository again'
107 Committed revision 8.
100 Committed revision 8.
108 $ cd ..
101 $ cd ..
109
102
110 $ hg convert -s svn "$svnurl/non-existent-path" dest
103 $ hg convert -s svn "$SVNREPOURL/proj%20B/non-existent-path" dest
111 initializing destination dest repository
104 initializing destination dest repository
112 abort: no revision found in module /proj B/non-existent-path
105 abort: no revision found in module /proj B/non-existent-path
113 [255]
106 [255]
@@ -116,7 +109,7 b' Update svn repository again'
116
109
117 Test incremental conversion
110 Test incremental conversion
118
111
119 $ hg convert "$svnurl" B-hg
112 $ hg convert "$SVNREPOURL/proj%20B" B-hg
120 scanning source...
113 scanning source...
121 sorting...
114 sorting...
122 converting...
115 converting...
@@ -150,7 +143,7 b' Test incremental conversion'
150
143
151 Test filemap
144 Test filemap
152 $ echo 'include letter2.txt' > filemap
145 $ echo 'include letter2.txt' > filemap
153 $ hg convert --filemap filemap "$svnurl"/mytrunk fmap
146 $ hg convert --filemap filemap "$SVNREPOURL/proj%20B/mytrunk" fmap
154 initializing destination fmap repository
147 initializing destination fmap repository
155 scanning source...
148 scanning source...
156 sorting...
149 sorting...
@@ -170,7 +163,7 b' Test filemap'
170
163
171
164
172 Test stop revision
165 Test stop revision
173 $ hg convert --rev 1 "$svnurl"/mytrunk stoprev
166 $ hg convert --rev 1 "$SVNREPOURL/proj%20B/mytrunk" stoprev
174 initializing destination stoprev repository
167 initializing destination stoprev repository
175 scanning source...
168 scanning source...
176 sorting...
169 sorting...
@@ -200,7 +193,7 b' Test converting empty heads (issue3347)'
200 converting...
193 converting...
201 1 init projA
194 1 init projA
202 0 adddir
195 0 adddir
203 $ hg --config convert.svn.trunk= convert file://$svnpath/svn-empty/trunk
196 $ hg --config convert.svn.trunk= convert "$SVNREPOURL/../svn-empty/trunk"
204 assuming destination trunk-hg
197 assuming destination trunk-hg
205 initializing destination trunk-hg repository
198 initializing destination trunk-hg repository
206 scanning source...
199 scanning source...
@@ -16,21 +16,23 b' fn to create new repository, and cd into'
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
@@ -1,23 +1,17 b''
1 $ "$TESTDIR/hghave" svn15 || exit 80
1 $ "$TESTDIR/hghave" svn15 || exit 80
2
2
3 $ fix_path()
3 $ SVNREPOPATH=`pwd`/svn-repo
4 > {
4 #if windows
5 > tr '\\' /
5 $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
6 > }
6 #else
7
7 $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
8 SVN wants all paths to start with a slash. Unfortunately, Windows ones
8 #endif
9 don't. Handle that.
10
11 $ escapedwd=`pwd | fix_path`
12 $ expr "$escapedwd" : '\/' > /dev/null || escapedwd="/$escapedwd"
13 $ escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"`
14
9
15 create subversion repo
10 create subversion repo
16
11
17 $ SVNREPO="file://$escapedwd/svn-repo"
18 $ WCROOT="`pwd`/svn-wc"
12 $ WCROOT="`pwd`/svn-wc"
19 $ svnadmin create svn-repo
13 $ svnadmin create svn-repo
20 $ svn co "$SVNREPO" svn-wc
14 $ svn co "$SVNREPOURL" svn-wc
21 Checked out revision 0.
15 Checked out revision 0.
22 $ cd svn-wc
16 $ cd svn-wc
23 $ mkdir src
17 $ mkdir src
@@ -38,7 +32,7 b' create subversion repo'
38 Transmitting file data ..
32 Transmitting file data ..
39 Committed revision 1.
33 Committed revision 1.
40 $ svn up -q
34 $ svn up -q
41 $ echo "externals -r1 $SVNREPO/externals" > extdef
35 $ echo "externals -r1 $SVNREPOURL/externals" > extdef
42 $ svn propset -F extdef svn:externals src
36 $ svn propset -F extdef svn:externals src
43 property 'svn:externals' set on 'src'
37 property 'svn:externals' set on 'src'
44 $ svn ci -m 'Setting externals'
38 $ svn ci -m 'Setting externals'
@@ -62,11 +56,11 b' first revision, no sub'
62
56
63 add first svn sub with leading whitespaces
57 add first svn sub with leading whitespaces
64
58
65 $ echo "s = [svn] $SVNREPO/src" >> .hgsub
59 $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub
66 $ echo "subdir/s = [svn] $SVNREPO/src" >> .hgsub
60 $ echo "subdir/s = [svn] $SVNREPOURL/src" >> .hgsub
67 $ svn co --quiet "$SVNREPO"/src s
61 $ svn co --quiet "$SVNREPOURL"/src s
68 $ mkdir subdir
62 $ mkdir subdir
69 $ svn co --quiet "$SVNREPO"/src subdir/s
63 $ svn co --quiet "$SVNREPOURL"/src subdir/s
70 $ hg add .hgsub
64 $ hg add .hgsub
71 $ hg ci -m1
65 $ hg ci -m1
72
66
@@ -132,7 +126,7 b' missing svn file, commit should fail'
132 add an unrelated revision in svn and update the subrepo to without
126 add an unrelated revision in svn and update the subrepo to without
133 bringing any changes.
127 bringing any changes.
134
128
135 $ svn mkdir "$SVNREPO/unrelated" -m 'create unrelated'
129 $ svn mkdir "$SVNREPOURL/unrelated" -m 'create unrelated'
136
130
137 Committed revision 4.
131 Committed revision 4.
138 $ svn up -q s
132 $ svn up -q s
@@ -151,7 +145,7 b' should be empty despite change to s/a'
151
145
152 add a commit from svn
146 add a commit from svn
153
147
154 $ cd "$WCROOT"/src
148 $ cd "$WCROOT/src"
155 $ svn up -q
149 $ svn up -q
156 $ echo xyz >> alpha
150 $ echo xyz >> alpha
157 $ svn propset svn:mime-type 'text/xml' alpha
151 $ svn propset svn:mime-type 'text/xml' alpha
@@ -215,21 +209,21 b' this commit fails because of externals m'
215 clone
209 clone
216
210
217 $ cd ..
211 $ cd ..
218 $ hg clone t tc | fix_path
212 $ hg clone t tc
219 updating to branch default
213 updating to branch default
220 A tc/s/alpha
214 A tc/s/alpha (glob)
221 U tc/s
215 U tc/s (glob)
222
216
223 Fetching external item into 'tc/s/externals'* (glob)
217 Fetching external item into 'tc/s/externals'* (glob)
224 A tc/s/externals/other
218 A tc/s/externals/other (glob)
225 Checked out external at revision 1.
219 Checked out external at revision 1.
226
220
227 Checked out revision 3.
221 Checked out revision 3.
228 A tc/subdir/s/alpha
222 A tc/subdir/s/alpha (glob)
229 U tc/subdir/s
223 U tc/subdir/s (glob)
230
224
231 Fetching external item into 'tc/subdir/s/externals'* (glob)
225 Fetching external item into 'tc/subdir/s/externals'* (glob)
232 A tc/subdir/s/externals/other
226 A tc/subdir/s/externals/other (glob)
233 Checked out external at revision 1.
227 Checked out external at revision 1.
234
228
235 Checked out revision 2.
229 Checked out revision 2.
@@ -258,7 +252,7 b' update to nullrev (must delete the subre'
258 $ ls
252 $ ls
259
253
260 Check hg update --clean
254 Check hg update --clean
261 $ cd $TESTTMP/sub/t
255 $ cd "$TESTTMP/sub/t"
262 $ cd s
256 $ cd s
263 $ echo c0 > alpha
257 $ echo c0 > alpha
264 $ echo c1 > f1
258 $ echo c1 > f1
@@ -290,7 +284,7 b' Check hg update --clean'
290 X * externals (glob)
284 X * externals (glob)
291
285
292 Sticky subrepositories, no changes
286 Sticky subrepositories, no changes
293 $ cd $TESTTMP/sub/t
287 $ cd "$TESTTMP/sub/t"
294 $ hg id -n
288 $ hg id -n
295 2
289 2
296 $ cd s
290 $ cd s
@@ -421,7 +415,7 b' Test subrepo already at intended revisio'
421 Test case where subversion would fail to update the subrepo because there
415 Test case where subversion would fail to update the subrepo because there
422 are unknown directories being replaced by tracked ones (happens with rebase).
416 are unknown directories being replaced by tracked ones (happens with rebase).
423
417
424 $ cd $WCROOT/src
418 $ cd "$WCROOT/src"
425 $ mkdir dir
419 $ mkdir dir
426 $ echo epsilon.py > dir/epsilon.py
420 $ echo epsilon.py > dir/epsilon.py
427 $ svn add dir
421 $ svn add dir
@@ -435,8 +429,8 b' are unknown directories being replaced b'
435 $ cd ../..
429 $ cd ../..
436 $ hg init rebaserepo
430 $ hg init rebaserepo
437 $ cd rebaserepo
431 $ cd rebaserepo
438 $ svn co -r5 --quiet "$SVNREPO"/src s
432 $ svn co -r5 --quiet "$SVNREPOURL"/src s
439 $ echo "s = [svn] $SVNREPO/src" >> .hgsub
433 $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub
440 $ hg add .hgsub
434 $ hg add .hgsub
441 $ hg ci -m addsub
435 $ hg ci -m addsub
442 $ echo a > a
436 $ echo a > a
@@ -462,14 +456,14 b' Modify one of the externals to point to '
462 test having obstructions when switching branches on checkout:
456 test having obstructions when switching branches on checkout:
463 $ hg checkout tip
457 $ hg checkout tip
464 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
458 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
465 $ echo "obstruct = [svn] $SVNREPO/externals" >> .hgsub
459 $ echo "obstruct = [svn] $SVNREPOURL/externals" >> .hgsub
466 $ svn co -r5 --quiet "$SVNREPO"/externals obstruct
460 $ svn co -r5 --quiet "$SVNREPOURL"/externals obstruct
467 $ hg commit -m 'Start making obstructed working copy'
461 $ hg commit -m 'Start making obstructed working copy'
468 $ hg book other
462 $ hg book other
469 $ hg co -r 'p1(tip)'
463 $ hg co -r 'p1(tip)'
470 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
464 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
471 $ echo "obstruct = [svn] $SVNREPO/src" >> .hgsub
465 $ echo "obstruct = [svn] $SVNREPOURL/src" >> .hgsub
472 $ svn co -r5 --quiet "$SVNREPO"/src obstruct
466 $ svn co -r5 --quiet "$SVNREPOURL"/src obstruct
473 $ hg commit -m 'Other branch which will be obstructed'
467 $ hg commit -m 'Other branch which will be obstructed'
474 created new head
468 created new head
475
469
@@ -495,13 +489,13 b' First, create that condition in the repo'
495 Transmitting file data .
489 Transmitting file data .
496 Committed revision 7.
490 Committed revision 7.
497 At revision 7.
491 At revision 7.
498 $ svn mkdir -m "baseline" $SVNREPO/trunk
492 $ svn mkdir -m "baseline" $SVNREPOURL/trunk
499
493
500 Committed revision 8.
494 Committed revision 8.
501 $ svn copy -m "initial branch" $SVNREPO/trunk $SVNREPO/branch
495 $ svn copy -m "initial branch" $SVNREPOURL/trunk $SVNREPOURL/branch
502
496
503 Committed revision 9.
497 Committed revision 9.
504 $ svn co --quiet "$SVNREPO"/branch tempwc
498 $ svn co --quiet "$SVNREPOURL"/branch tempwc
505 $ cd tempwc
499 $ cd tempwc
506 $ echo "something old" > somethingold
500 $ echo "something old" > somethingold
507 $ svn add somethingold
501 $ svn add somethingold
@@ -510,10 +504,10 b' First, create that condition in the repo'
510 Adding somethingold
504 Adding somethingold
511 Transmitting file data .
505 Transmitting file data .
512 Committed revision 10.
506 Committed revision 10.
513 $ svn rm -m "remove branch" $SVNREPO/branch
507 $ svn rm -m "remove branch" $SVNREPOURL/branch
514
508
515 Committed revision 11.
509 Committed revision 11.
516 $ svn copy -m "recreate branch" $SVNREPO/trunk $SVNREPO/branch
510 $ svn copy -m "recreate branch" $SVNREPOURL/trunk $SVNREPOURL/branch
517
511
518 Committed revision 12.
512 Committed revision 12.
519 $ svn up -q
513 $ svn up -q
@@ -526,10 +520,10 b' First, create that condition in the repo'
526 Committed revision 13.
520 Committed revision 13.
527 $ cd ..
521 $ cd ..
528 $ rm -rf tempwc
522 $ rm -rf tempwc
529 $ svn co "$SVNREPO/branch"@10 recreated
523 $ svn co "$SVNREPOURL/branch"@10 recreated
530 A recreated/somethingold (glob)
524 A recreated/somethingold (glob)
531 Checked out revision 10.
525 Checked out revision 10.
532 $ echo "recreated = [svn] $SVNREPO/branch" >> .hgsub
526 $ echo "recreated = [svn] $SVNREPOURL/branch" >> .hgsub
533 $ hg ci -m addsub
527 $ hg ci -m addsub
534 $ cd recreated
528 $ cd recreated
535 $ svn up -q
529 $ svn up -q
@@ -573,7 +567,7 b' Test a subrepo referencing a just moved '
573 be different from the revision, and the path will be different as
567 be different from the revision, and the path will be different as
574 well.
568 well.
575
569
576 $ cd $WCROOT
570 $ cd "$WCROOT"
577 $ svn up > /dev/null
571 $ svn up > /dev/null
578 $ mkdir trunk/subdir branches
572 $ mkdir trunk/subdir branches
579 $ echo a > trunk/subdir/a
573 $ echo a > trunk/subdir/a
@@ -587,17 +581,17 b' well.'
587 Adding trunk/subdir/a (glob)
581 Adding trunk/subdir/a (glob)
588 Transmitting file data .
582 Transmitting file data .
589 Committed revision 14.
583 Committed revision 14.
590 $ svn cp -m branchtrunk $SVNREPO/trunk $SVNREPO/branches/somebranch
584 $ svn cp -m branchtrunk $SVNREPOURL/trunk $SVNREPOURL/branches/somebranch
591
585
592 Committed revision 15.
586 Committed revision 15.
593 $ cd ..
587 $ cd ..
594
588
595 $ hg init repo2
589 $ hg init repo2
596 $ cd repo2
590 $ cd repo2
597 $ svn co $SVNREPO/branches/somebranch/subdir
591 $ svn co $SVNREPOURL/branches/somebranch/subdir
598 A subdir/a (glob)
592 A subdir/a (glob)
599 Checked out revision 15.
593 Checked out revision 15.
600 $ echo "subdir = [svn] $SVNREPO/branches/somebranch/subdir" > .hgsub
594 $ echo "subdir = [svn] $SVNREPOURL/branches/somebranch/subdir" > .hgsub
601 $ hg add .hgsub
595 $ hg add .hgsub
602 $ hg ci -m addsub
596 $ hg ci -m addsub
603 $ hg up null
597 $ hg up null
General Comments 0
You need to be logged in to leave comments. Login now