Show More
@@ -1,56 +1,53 | |||||
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 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 | fn to create new repository, and cd into it |
|
10 | fn to create new repository, and cd into it | |
11 | $ mkrepo() { |
|
11 | $ mkrepo() { | |
12 | > hg init $1 |
|
12 | > hg init $1 | |
13 | > cd $1 |
|
13 | > cd $1 | |
14 | > hg qinit |
|
14 | > hg qinit | |
15 | > } |
|
15 | > } | |
16 |
|
16 | |||
17 |
|
17 | |||
18 | handle svn subrepos safely |
|
18 | handle svn subrepos safely | |
19 |
|
19 | |||
20 | $ svnadmin create svn-repo-2499 |
|
20 | $ svnadmin create svn-repo-2499 | |
21 |
|
21 | |||
22 | $ SVNREPOPATH=`pwd`/svn-repo-2499/project |
|
22 | $ SVNREPOPATH=`pwd`/svn-repo-2499/project | |
23 | #if windows |
|
23 | #if windows | |
24 | $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
|
24 | $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
25 | #else |
|
25 | #else | |
26 | $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
|
26 | $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
27 | #endif |
|
27 | #endif | |
28 |
|
28 | |||
29 | $ mkdir -p svn-project-2499/trunk |
|
29 | $ mkdir -p svn-project-2499/trunk | |
30 | $ svn import -m 'init project' svn-project-2499 "$SVNREPOURL" |
|
30 | $ svn import -qm 'init project' svn-project-2499 "$SVNREPOURL" | |
31 | Adding svn-project-2499/trunk (glob) |
|
|||
32 |
|
||||
33 | Committed revision 1. |
|
|||
34 |
|
31 | |||
35 | qnew on repo w/svn subrepo |
|
32 | qnew on repo w/svn subrepo | |
36 | $ mkrepo repo-2499-svn-subrepo |
|
33 | $ mkrepo repo-2499-svn-subrepo | |
37 | $ svn co "$SVNREPOURL"/trunk sub |
|
34 | $ svn co "$SVNREPOURL"/trunk sub | |
38 | Checked out revision 1. |
|
35 | Checked out revision 1. | |
39 | $ echo 'sub = [svn]sub' >> .hgsub |
|
36 | $ echo 'sub = [svn]sub' >> .hgsub | |
40 | $ hg add .hgsub |
|
37 | $ hg add .hgsub | |
41 | $ hg status -S -X '**/format' |
|
38 | $ hg status -S -X '**/format' | |
42 | A .hgsub |
|
39 | A .hgsub | |
43 | $ hg qnew -m0 0.diff |
|
40 | $ hg qnew -m0 0.diff | |
44 | $ cd sub |
|
41 | $ cd sub | |
45 | $ echo a > a |
|
42 | $ echo a > a | |
46 | $ svn add a |
|
43 | $ svn add a | |
47 | A a |
|
44 | A a | |
48 | $ svn st |
|
45 | $ svn st | |
49 | A* a (glob) |
|
46 | A* a (glob) | |
50 | $ cd .. |
|
47 | $ cd .. | |
51 | $ hg status -S # doesn't show status for svn subrepos (yet) |
|
48 | $ hg status -S # doesn't show status for svn subrepos (yet) | |
52 | $ hg qnew -m1 1.diff |
|
49 | $ hg qnew -m1 1.diff | |
53 | abort: uncommitted changes in subrepository 'sub' |
|
50 | abort: uncommitted changes in subrepository 'sub' | |
54 | [255] |
|
51 | [255] | |
55 |
|
52 | |||
56 | $ cd .. |
|
53 | $ cd .. |
@@ -1,687 +1,643 | |||||
1 | #require svn15 |
|
1 | #require svn15 | |
2 |
|
2 | |||
3 | $ SVNREPOPATH=`pwd`/svn-repo |
|
3 | $ SVNREPOPATH=`pwd`/svn-repo | |
4 | #if windows |
|
4 | #if windows | |
5 | $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
|
5 | $ SVNREPOURL=file:///`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
6 | #else |
|
6 | #else | |
7 | $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` |
|
7 | $ SVNREPOURL=file://`$PYTHON -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"` | |
8 | #endif |
|
8 | #endif | |
9 |
|
9 | |||
|
10 | $ filter_svn_output () { | |||
|
11 | > egrep -v 'Committing|Transmitting|Updating' || true | |||
|
12 | > } | |||
|
13 | ||||
10 | create subversion repo |
|
14 | create subversion repo | |
11 |
|
15 | |||
12 | $ WCROOT="`pwd`/svn-wc" |
|
16 | $ WCROOT="`pwd`/svn-wc" | |
13 | $ svnadmin create svn-repo |
|
17 | $ svnadmin create svn-repo | |
14 | $ svn co "$SVNREPOURL" svn-wc |
|
18 | $ svn co "$SVNREPOURL" svn-wc | |
15 | Checked out revision 0. |
|
19 | Checked out revision 0. | |
16 | $ cd svn-wc |
|
20 | $ cd svn-wc | |
17 | $ mkdir src |
|
21 | $ mkdir src | |
18 | $ echo alpha > src/alpha |
|
22 | $ echo alpha > src/alpha | |
19 | $ svn add src |
|
23 | $ svn add src | |
20 | A src |
|
24 | A src | |
21 | A src/alpha (glob) |
|
25 | A src/alpha (glob) | |
22 | $ mkdir externals |
|
26 | $ mkdir externals | |
23 | $ echo other > externals/other |
|
27 | $ echo other > externals/other | |
24 | $ svn add externals |
|
28 | $ svn add externals | |
25 | A externals |
|
29 | A externals | |
26 | A externals/other (glob) |
|
30 | A externals/other (glob) | |
27 | $ svn ci -m 'Add alpha' |
|
31 | $ svn ci -qm 'Add alpha' | |
28 | Adding externals |
|
|||
29 | Adding externals/other (glob) |
|
|||
30 | Adding src |
|
|||
31 | Adding src/alpha (glob) |
|
|||
32 | Transmitting file data .. |
|
|||
33 | Committed revision 1. |
|
|||
34 | $ svn up -q |
|
32 | $ svn up -q | |
35 | $ echo "externals -r1 $SVNREPOURL/externals" > extdef |
|
33 | $ echo "externals -r1 $SVNREPOURL/externals" > extdef | |
36 | $ svn propset -F extdef svn:externals src |
|
34 | $ svn propset -F extdef svn:externals src | |
37 | property 'svn:externals' set on 'src' |
|
35 | property 'svn:externals' set on 'src' | |
38 | $ svn ci -m 'Setting externals' |
|
36 | $ svn ci -qm 'Setting externals' | |
39 | Sending src |
|
|||
40 |
|
||||
41 | Committed revision 2. |
|
|||
42 | $ cd .. |
|
37 | $ cd .. | |
43 |
|
38 | |||
44 | create hg repo |
|
39 | create hg repo | |
45 |
|
40 | |||
46 | $ mkdir sub |
|
41 | $ mkdir sub | |
47 | $ cd sub |
|
42 | $ cd sub | |
48 | $ hg init t |
|
43 | $ hg init t | |
49 | $ cd t |
|
44 | $ cd t | |
50 |
|
45 | |||
51 | first revision, no sub |
|
46 | first revision, no sub | |
52 |
|
47 | |||
53 | $ echo a > a |
|
48 | $ echo a > a | |
54 | $ hg ci -Am0 |
|
49 | $ hg ci -Am0 | |
55 | adding a |
|
50 | adding a | |
56 |
|
51 | |||
57 | add first svn sub with leading whitespaces |
|
52 | add first svn sub with leading whitespaces | |
58 |
|
53 | |||
59 | $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub |
|
54 | $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub | |
60 | $ echo "subdir/s = [svn] $SVNREPOURL/src" >> .hgsub |
|
55 | $ echo "subdir/s = [svn] $SVNREPOURL/src" >> .hgsub | |
61 | $ svn co --quiet "$SVNREPOURL"/src s |
|
56 | $ svn co --quiet "$SVNREPOURL"/src s | |
62 | $ mkdir subdir |
|
57 | $ mkdir subdir | |
63 | $ svn co --quiet "$SVNREPOURL"/src subdir/s |
|
58 | $ svn co --quiet "$SVNREPOURL"/src subdir/s | |
64 | $ hg add .hgsub |
|
59 | $ hg add .hgsub | |
65 | $ hg ci -m1 |
|
60 | $ hg ci -m1 | |
66 |
|
61 | |||
67 | make sure we avoid empty commits (issue2445) |
|
62 | make sure we avoid empty commits (issue2445) | |
68 |
|
63 | |||
69 | $ hg sum |
|
64 | $ hg sum | |
70 | parent: 1:* tip (glob) |
|
65 | parent: 1:* tip (glob) | |
71 | 1 |
|
66 | 1 | |
72 | branch: default |
|
67 | branch: default | |
73 | commit: (clean) |
|
68 | commit: (clean) | |
74 | update: (current) |
|
69 | update: (current) | |
75 | phases: 2 draft |
|
70 | phases: 2 draft | |
76 | $ hg ci -moops |
|
71 | $ hg ci -moops | |
77 | nothing changed |
|
72 | nothing changed | |
78 | [1] |
|
73 | [1] | |
79 |
|
74 | |||
80 | debugsub |
|
75 | debugsub | |
81 |
|
76 | |||
82 | $ hg debugsub |
|
77 | $ hg debugsub | |
83 | path s |
|
78 | path s | |
84 | source file://*/svn-repo/src (glob) |
|
79 | source file://*/svn-repo/src (glob) | |
85 | revision 2 |
|
80 | revision 2 | |
86 | path subdir/s |
|
81 | path subdir/s | |
87 | source file://*/svn-repo/src (glob) |
|
82 | source file://*/svn-repo/src (glob) | |
88 | revision 2 |
|
83 | revision 2 | |
89 |
|
84 | |||
90 | change file in svn and hg, commit |
|
85 | change file in svn and hg, commit | |
91 |
|
86 | |||
92 | $ echo a >> a |
|
87 | $ echo a >> a | |
93 | $ echo alpha >> s/alpha |
|
88 | $ echo alpha >> s/alpha | |
94 | $ hg sum |
|
89 | $ hg sum | |
95 | parent: 1:* tip (glob) |
|
90 | parent: 1:* tip (glob) | |
96 | 1 |
|
91 | 1 | |
97 | branch: default |
|
92 | branch: default | |
98 | commit: 1 modified, 1 subrepos |
|
93 | commit: 1 modified, 1 subrepos | |
99 | update: (current) |
|
94 | update: (current) | |
100 | phases: 2 draft |
|
95 | phases: 2 draft | |
101 |
$ hg commit --subrepos -m 'Message!' | |
|
96 | $ hg commit --subrepos -m 'Message!' | filter_svn_output | |
102 | committing subrepository s |
|
97 | committing subrepository s | |
103 | Sending*s/alpha (glob) |
|
98 | Sending*s/alpha (glob) | |
104 | Transmitting file data . |
|
|||
105 | Committed revision 3. |
|
99 | Committed revision 3. | |
106 |
|
100 | |||
107 | Fetching external item into '*s/externals'* (glob) |
|
101 | Fetching external item into '*s/externals'* (glob) | |
108 | External at revision 1. |
|
102 | External at revision 1. | |
109 |
|
103 | |||
110 | At revision 3. |
|
104 | At revision 3. | |
111 | $ hg debugsub |
|
105 | $ hg debugsub | |
112 | path s |
|
106 | path s | |
113 | source file://*/svn-repo/src (glob) |
|
107 | source file://*/svn-repo/src (glob) | |
114 | revision 3 |
|
108 | revision 3 | |
115 | path subdir/s |
|
109 | path subdir/s | |
116 | source file://*/svn-repo/src (glob) |
|
110 | source file://*/svn-repo/src (glob) | |
117 | revision 2 |
|
111 | revision 2 | |
118 |
|
112 | |||
119 | missing svn file, commit should fail |
|
113 | missing svn file, commit should fail | |
120 |
|
114 | |||
121 | $ rm s/alpha |
|
115 | $ rm s/alpha | |
122 | $ hg commit --subrepos -m 'abort on missing file' |
|
116 | $ hg commit --subrepos -m 'abort on missing file' | |
123 | committing subrepository s |
|
117 | committing subrepository s | |
124 | abort: cannot commit missing svn entries (in subrepo s) |
|
118 | abort: cannot commit missing svn entries (in subrepo s) | |
125 | [255] |
|
119 | [255] | |
126 | $ svn revert s/alpha > /dev/null |
|
120 | $ svn revert s/alpha > /dev/null | |
127 |
|
121 | |||
128 | add an unrelated revision in svn and update the subrepo to without |
|
122 | add an unrelated revision in svn and update the subrepo to without | |
129 | bringing any changes. |
|
123 | bringing any changes. | |
130 |
|
124 | |||
131 | $ svn mkdir "$SVNREPOURL/unrelated" -m 'create unrelated' |
|
125 | $ svn mkdir "$SVNREPOURL/unrelated" -qm 'create unrelated' | |
132 |
|
||||
133 | Committed revision 4. |
|
|||
134 | $ svn up -q s |
|
126 | $ svn up -q s | |
135 | $ hg sum |
|
127 | $ hg sum | |
136 | parent: 2:* tip (glob) |
|
128 | parent: 2:* tip (glob) | |
137 | Message! |
|
129 | Message! | |
138 | branch: default |
|
130 | branch: default | |
139 | commit: (clean) |
|
131 | commit: (clean) | |
140 | update: (current) |
|
132 | update: (current) | |
141 | phases: 3 draft |
|
133 | phases: 3 draft | |
142 |
|
134 | |||
143 | $ echo a > s/a |
|
135 | $ echo a > s/a | |
144 |
|
136 | |||
145 | should be empty despite change to s/a |
|
137 | should be empty despite change to s/a | |
146 |
|
138 | |||
147 | $ hg st |
|
139 | $ hg st | |
148 |
|
140 | |||
149 | add a commit from svn |
|
141 | add a commit from svn | |
150 |
|
142 | |||
151 | $ cd "$WCROOT/src" |
|
143 | $ cd "$WCROOT/src" | |
152 | $ svn up -q |
|
144 | $ svn up -q | |
153 | $ echo xyz >> alpha |
|
145 | $ echo xyz >> alpha | |
154 | $ svn propset svn:mime-type 'text/xml' alpha |
|
146 | $ svn propset svn:mime-type 'text/xml' alpha | |
155 | property 'svn:mime-type' set on 'alpha' |
|
147 | property 'svn:mime-type' set on 'alpha' | |
156 | $ svn ci -m 'amend a from svn' |
|
148 | $ svn ci -qm 'amend a from svn' | |
157 | Sending *alpha (glob) |
|
|||
158 | Transmitting file data . |
|
|||
159 | Committed revision 5. |
|
|||
160 | $ cd ../../sub/t |
|
149 | $ cd ../../sub/t | |
161 |
|
150 | |||
162 | this commit from hg will fail |
|
151 | this commit from hg will fail | |
163 |
|
152 | |||
164 | $ echo zzz >> s/alpha |
|
153 | $ echo zzz >> s/alpha | |
165 | $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date' |
|
154 | $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date' | |
166 | committing subrepository s |
|
155 | committing subrepository s | |
167 | abort: svn:*Commit failed (details follow): (glob) |
|
156 | abort: svn:*Commit failed (details follow): (glob) | |
168 | [255] |
|
157 | [255] | |
169 | $ svn revert -q s/alpha |
|
158 | $ svn revert -q s/alpha | |
170 |
|
159 | |||
171 | this commit fails because of meta changes |
|
160 | this commit fails because of meta changes | |
172 |
|
161 | |||
173 | $ svn propset svn:mime-type 'text/html' s/alpha |
|
162 | $ svn propset svn:mime-type 'text/html' s/alpha | |
174 | property 'svn:mime-type' set on 's/alpha' (glob) |
|
163 | property 'svn:mime-type' set on 's/alpha' (glob) | |
175 | $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date' |
|
164 | $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date' | |
176 | committing subrepository s |
|
165 | committing subrepository s | |
177 | abort: svn:*Commit failed (details follow): (glob) |
|
166 | abort: svn:*Commit failed (details follow): (glob) | |
178 | [255] |
|
167 | [255] | |
179 | $ svn revert -q s/alpha |
|
168 | $ svn revert -q s/alpha | |
180 |
|
169 | |||
181 | this commit fails because of externals changes |
|
170 | this commit fails because of externals changes | |
182 |
|
171 | |||
183 | $ echo zzz > s/externals/other |
|
172 | $ echo zzz > s/externals/other | |
184 | $ hg ci --subrepos -m 'amend externals from hg' |
|
173 | $ hg ci --subrepos -m 'amend externals from hg' | |
185 | committing subrepository s |
|
174 | committing subrepository s | |
186 | abort: cannot commit svn externals (in subrepo s) |
|
175 | abort: cannot commit svn externals (in subrepo s) | |
187 | [255] |
|
176 | [255] | |
188 | $ hg diff --subrepos -r 1:2 | grep -v diff |
|
177 | $ hg diff --subrepos -r 1:2 | grep -v diff | |
189 | --- a/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 |
|
178 | --- a/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 | |
190 | +++ b/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 |
|
179 | +++ b/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 | |
191 | @@ -1,2 +1,2 @@ |
|
180 | @@ -1,2 +1,2 @@ | |
192 | -2 s |
|
181 | -2 s | |
193 | +3 s |
|
182 | +3 s | |
194 | 2 subdir/s |
|
183 | 2 subdir/s | |
195 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
184 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
196 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
185 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
197 | @@ -1,1 +1,2 @@ |
|
186 | @@ -1,1 +1,2 @@ | |
198 | a |
|
187 | a | |
199 | +a |
|
188 | +a | |
200 | $ svn revert -q s/externals/other |
|
189 | $ svn revert -q s/externals/other | |
201 |
|
190 | |||
202 | this commit fails because of externals meta changes |
|
191 | this commit fails because of externals meta changes | |
203 |
|
192 | |||
204 | $ svn propset svn:mime-type 'text/html' s/externals/other |
|
193 | $ svn propset svn:mime-type 'text/html' s/externals/other | |
205 | property 'svn:mime-type' set on 's/externals/other' (glob) |
|
194 | property 'svn:mime-type' set on 's/externals/other' (glob) | |
206 | $ hg ci --subrepos -m 'amend externals from hg' |
|
195 | $ hg ci --subrepos -m 'amend externals from hg' | |
207 | committing subrepository s |
|
196 | committing subrepository s | |
208 | abort: cannot commit svn externals (in subrepo s) |
|
197 | abort: cannot commit svn externals (in subrepo s) | |
209 | [255] |
|
198 | [255] | |
210 | $ svn revert -q s/externals/other |
|
199 | $ svn revert -q s/externals/other | |
211 |
|
200 | |||
212 | clone |
|
201 | clone | |
213 |
|
202 | |||
214 | $ cd .. |
|
203 | $ cd .. | |
215 | $ hg clone t tc |
|
204 | $ hg clone t tc | |
216 | updating to branch default |
|
205 | updating to branch default | |
217 | A tc/s/alpha (glob) |
|
206 | A tc/s/alpha (glob) | |
218 | U tc/s (glob) |
|
207 | U tc/s (glob) | |
219 |
|
208 | |||
220 | Fetching external item into 'tc/s/externals'* (glob) |
|
209 | Fetching external item into 'tc/s/externals'* (glob) | |
221 | A tc/s/externals/other (glob) |
|
210 | A tc/s/externals/other (glob) | |
222 | Checked out external at revision 1. |
|
211 | Checked out external at revision 1. | |
223 |
|
212 | |||
224 | Checked out revision 3. |
|
213 | Checked out revision 3. | |
225 | A tc/subdir/s/alpha (glob) |
|
214 | A tc/subdir/s/alpha (glob) | |
226 | U tc/subdir/s (glob) |
|
215 | U tc/subdir/s (glob) | |
227 |
|
216 | |||
228 | Fetching external item into 'tc/subdir/s/externals'* (glob) |
|
217 | Fetching external item into 'tc/subdir/s/externals'* (glob) | |
229 | A tc/subdir/s/externals/other (glob) |
|
218 | A tc/subdir/s/externals/other (glob) | |
230 | Checked out external at revision 1. |
|
219 | Checked out external at revision 1. | |
231 |
|
220 | |||
232 | Checked out revision 2. |
|
221 | Checked out revision 2. | |
233 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
222 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
234 | $ cd tc |
|
223 | $ cd tc | |
235 |
|
224 | |||
236 | debugsub in clone |
|
225 | debugsub in clone | |
237 |
|
226 | |||
238 | $ hg debugsub |
|
227 | $ hg debugsub | |
239 | path s |
|
228 | path s | |
240 | source file://*/svn-repo/src (glob) |
|
229 | source file://*/svn-repo/src (glob) | |
241 | revision 3 |
|
230 | revision 3 | |
242 | path subdir/s |
|
231 | path subdir/s | |
243 | source file://*/svn-repo/src (glob) |
|
232 | source file://*/svn-repo/src (glob) | |
244 | revision 2 |
|
233 | revision 2 | |
245 |
|
234 | |||
246 | verify subrepo is contained within the repo directory |
|
235 | verify subrepo is contained within the repo directory | |
247 |
|
236 | |||
248 | $ $PYTHON -c "import os.path; print os.path.exists('s')" |
|
237 | $ $PYTHON -c "import os.path; print os.path.exists('s')" | |
249 | True |
|
238 | True | |
250 |
|
239 | |||
251 | update to nullrev (must delete the subrepo) |
|
240 | update to nullrev (must delete the subrepo) | |
252 |
|
241 | |||
253 | $ hg up null |
|
242 | $ hg up null | |
254 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
243 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
255 | $ ls |
|
244 | $ ls | |
256 |
|
245 | |||
257 | Check hg update --clean |
|
246 | Check hg update --clean | |
258 | $ cd "$TESTTMP/sub/t" |
|
247 | $ cd "$TESTTMP/sub/t" | |
259 | $ cd s |
|
248 | $ cd s | |
260 | $ echo c0 > alpha |
|
249 | $ echo c0 > alpha | |
261 | $ echo c1 > f1 |
|
250 | $ echo c1 > f1 | |
262 | $ echo c1 > f2 |
|
251 | $ echo c1 > f2 | |
263 | $ svn add f1 -q |
|
252 | $ svn add f1 -q | |
264 | $ svn status | sort |
|
253 | $ svn status | sort | |
265 |
|
254 | |||
266 | ? * a (glob) |
|
255 | ? * a (glob) | |
267 | ? * f2 (glob) |
|
256 | ? * f2 (glob) | |
268 | A * f1 (glob) |
|
257 | A * f1 (glob) | |
269 | M * alpha (glob) |
|
258 | M * alpha (glob) | |
270 | Performing status on external item at 'externals'* (glob) |
|
259 | Performing status on external item at 'externals'* (glob) | |
271 | X * externals (glob) |
|
260 | X * externals (glob) | |
272 | $ cd ../.. |
|
261 | $ cd ../.. | |
273 | $ hg -R t update -C |
|
262 | $ hg -R t update -C | |
274 |
|
263 | |||
275 | Fetching external item into 't/s/externals'* (glob) |
|
264 | Fetching external item into 't/s/externals'* (glob) | |
276 | Checked out external at revision 1. |
|
265 | Checked out external at revision 1. | |
277 |
|
266 | |||
278 | Checked out revision 3. |
|
267 | Checked out revision 3. | |
279 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
268 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
280 | $ cd t/s |
|
269 | $ cd t/s | |
281 | $ svn status | sort |
|
270 | $ svn status | sort | |
282 |
|
271 | |||
283 | ? * a (glob) |
|
272 | ? * a (glob) | |
284 | ? * f1 (glob) |
|
273 | ? * f1 (glob) | |
285 | ? * f2 (glob) |
|
274 | ? * f2 (glob) | |
286 | Performing status on external item at 'externals'* (glob) |
|
275 | Performing status on external item at 'externals'* (glob) | |
287 | X * externals (glob) |
|
276 | X * externals (glob) | |
288 |
|
277 | |||
289 | Sticky subrepositories, no changes |
|
278 | Sticky subrepositories, no changes | |
290 | $ cd "$TESTTMP/sub/t" |
|
279 | $ cd "$TESTTMP/sub/t" | |
291 | $ hg id -n |
|
280 | $ hg id -n | |
292 | 2 |
|
281 | 2 | |
293 | $ cd s |
|
282 | $ cd s | |
294 | $ svnversion |
|
283 | $ svnversion | |
295 | 3 |
|
284 | 3 | |
296 | $ cd .. |
|
285 | $ cd .. | |
297 | $ hg update 1 |
|
286 | $ hg update 1 | |
298 | U *s/alpha (glob) |
|
287 | U *s/alpha (glob) | |
299 |
|
288 | |||
300 | Fetching external item into '*s/externals'* (glob) |
|
289 | Fetching external item into '*s/externals'* (glob) | |
301 | Checked out external at revision 1. |
|
290 | Checked out external at revision 1. | |
302 |
|
291 | |||
303 | Checked out revision 2. |
|
292 | Checked out revision 2. | |
304 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
293 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
305 | $ hg id -n |
|
294 | $ hg id -n | |
306 | 1 |
|
295 | 1 | |
307 | $ cd s |
|
296 | $ cd s | |
308 | $ svnversion |
|
297 | $ svnversion | |
309 | 2 |
|
298 | 2 | |
310 | $ cd .. |
|
299 | $ cd .. | |
311 |
|
300 | |||
312 | Sticky subrepositories, file changes |
|
301 | Sticky subrepositories, file changes | |
313 | $ touch s/f1 |
|
302 | $ touch s/f1 | |
314 | $ cd s |
|
303 | $ cd s | |
315 | $ svn add f1 |
|
304 | $ svn add f1 | |
316 | A f1 |
|
305 | A f1 | |
317 | $ cd .. |
|
306 | $ cd .. | |
318 | $ hg id -n |
|
307 | $ hg id -n | |
319 | 1+ |
|
308 | 1+ | |
320 | $ cd s |
|
309 | $ cd s | |
321 | $ svnversion |
|
310 | $ svnversion | |
322 | 2M |
|
311 | 2M | |
323 | $ cd .. |
|
312 | $ cd .. | |
324 | $ hg update tip |
|
313 | $ hg update tip | |
325 | subrepository s diverged (local revision: 2, remote revision: 3) |
|
314 | subrepository s diverged (local revision: 2, remote revision: 3) | |
326 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
315 | (M)erge, keep (l)ocal or keep (r)emote? m | |
327 | subrepository sources for s differ |
|
316 | subrepository sources for s differ | |
328 | use (l)ocal source (2) or (r)emote source (3)? l |
|
317 | use (l)ocal source (2) or (r)emote source (3)? l | |
329 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
318 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
330 | $ hg id -n |
|
319 | $ hg id -n | |
331 | 2+ |
|
320 | 2+ | |
332 | $ cd s |
|
321 | $ cd s | |
333 | $ svnversion |
|
322 | $ svnversion | |
334 | 2M |
|
323 | 2M | |
335 | $ cd .. |
|
324 | $ cd .. | |
336 | $ hg update --clean tip |
|
325 | $ hg update --clean tip | |
337 | U *s/alpha (glob) |
|
326 | U *s/alpha (glob) | |
338 |
|
327 | |||
339 | Fetching external item into '*s/externals'* (glob) |
|
328 | Fetching external item into '*s/externals'* (glob) | |
340 | Checked out external at revision 1. |
|
329 | Checked out external at revision 1. | |
341 |
|
330 | |||
342 | Checked out revision 3. |
|
331 | Checked out revision 3. | |
343 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
332 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
344 |
|
333 | |||
345 | Sticky subrepository, revision updates |
|
334 | Sticky subrepository, revision updates | |
346 | $ hg id -n |
|
335 | $ hg id -n | |
347 | 2 |
|
336 | 2 | |
348 | $ cd s |
|
337 | $ cd s | |
349 | $ svnversion |
|
338 | $ svnversion | |
350 | 3 |
|
339 | 3 | |
351 | $ cd .. |
|
340 | $ cd .. | |
352 | $ cd s |
|
341 | $ cd s | |
353 | $ svn update -qr 1 |
|
342 | $ svn update -qr 1 | |
354 | $ cd .. |
|
343 | $ cd .. | |
355 | $ hg update 1 |
|
344 | $ hg update 1 | |
356 | subrepository s diverged (local revision: 3, remote revision: 2) |
|
345 | subrepository s diverged (local revision: 3, remote revision: 2) | |
357 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
346 | (M)erge, keep (l)ocal or keep (r)emote? m | |
358 | subrepository sources for s differ (in checked out version) |
|
347 | subrepository sources for s differ (in checked out version) | |
359 | use (l)ocal source (1) or (r)emote source (2)? l |
|
348 | use (l)ocal source (1) or (r)emote source (2)? l | |
360 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
349 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
361 | $ hg id -n |
|
350 | $ hg id -n | |
362 | 1+ |
|
351 | 1+ | |
363 | $ cd s |
|
352 | $ cd s | |
364 | $ svnversion |
|
353 | $ svnversion | |
365 | 1 |
|
354 | 1 | |
366 | $ cd .. |
|
355 | $ cd .. | |
367 |
|
356 | |||
368 | Sticky subrepository, file changes and revision updates |
|
357 | Sticky subrepository, file changes and revision updates | |
369 | $ touch s/f1 |
|
358 | $ touch s/f1 | |
370 | $ cd s |
|
359 | $ cd s | |
371 | $ svn add f1 |
|
360 | $ svn add f1 | |
372 | A f1 |
|
361 | A f1 | |
373 | $ svnversion |
|
362 | $ svnversion | |
374 | 1M |
|
363 | 1M | |
375 | $ cd .. |
|
364 | $ cd .. | |
376 | $ hg id -n |
|
365 | $ hg id -n | |
377 | 1+ |
|
366 | 1+ | |
378 | $ hg update tip |
|
367 | $ hg update tip | |
379 | subrepository s diverged (local revision: 3, remote revision: 3) |
|
368 | subrepository s diverged (local revision: 3, remote revision: 3) | |
380 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
369 | (M)erge, keep (l)ocal or keep (r)emote? m | |
381 | subrepository sources for s differ |
|
370 | subrepository sources for s differ | |
382 | use (l)ocal source (1) or (r)emote source (3)? l |
|
371 | use (l)ocal source (1) or (r)emote source (3)? l | |
383 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
372 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
384 | $ hg id -n |
|
373 | $ hg id -n | |
385 | 2+ |
|
374 | 2+ | |
386 | $ cd s |
|
375 | $ cd s | |
387 | $ svnversion |
|
376 | $ svnversion | |
388 | 1M |
|
377 | 1M | |
389 | $ cd .. |
|
378 | $ cd .. | |
390 |
|
379 | |||
391 | Sticky repository, update --clean |
|
380 | Sticky repository, update --clean | |
392 | $ hg update --clean tip | grep -v 's[/\]externals[/\]other' |
|
381 | $ hg update --clean tip | grep -v 's[/\]externals[/\]other' | |
393 | U *s/alpha (glob) |
|
382 | U *s/alpha (glob) | |
394 | U *s (glob) |
|
383 | U *s (glob) | |
395 |
|
384 | |||
396 | Fetching external item into '*s/externals'* (glob) |
|
385 | Fetching external item into '*s/externals'* (glob) | |
397 | Checked out external at revision 1. |
|
386 | Checked out external at revision 1. | |
398 |
|
387 | |||
399 | Checked out revision 3. |
|
388 | Checked out revision 3. | |
400 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
389 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
401 | $ hg id -n |
|
390 | $ hg id -n | |
402 | 2 |
|
391 | 2 | |
403 | $ cd s |
|
392 | $ cd s | |
404 | $ svnversion |
|
393 | $ svnversion | |
405 | 3 |
|
394 | 3 | |
406 | $ cd .. |
|
395 | $ cd .. | |
407 |
|
396 | |||
408 | Test subrepo already at intended revision: |
|
397 | Test subrepo already at intended revision: | |
409 | $ cd s |
|
398 | $ cd s | |
410 | $ svn update -qr 2 |
|
399 | $ svn update -qr 2 | |
411 | $ cd .. |
|
400 | $ cd .. | |
412 | $ hg update 1 |
|
401 | $ hg update 1 | |
413 | subrepository s diverged (local revision: 3, remote revision: 2) |
|
402 | subrepository s diverged (local revision: 3, remote revision: 2) | |
414 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
403 | (M)erge, keep (l)ocal or keep (r)emote? m | |
415 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
404 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
416 | $ hg id -n |
|
405 | $ hg id -n | |
417 | 1+ |
|
406 | 1+ | |
418 | $ cd s |
|
407 | $ cd s | |
419 | $ svnversion |
|
408 | $ svnversion | |
420 | 2 |
|
409 | 2 | |
421 | $ cd .. |
|
410 | $ cd .. | |
422 |
|
411 | |||
423 | Test case where subversion would fail to update the subrepo because there |
|
412 | Test case where subversion would fail to update the subrepo because there | |
424 | are unknown directories being replaced by tracked ones (happens with rebase). |
|
413 | are unknown directories being replaced by tracked ones (happens with rebase). | |
425 |
|
414 | |||
426 | $ cd "$WCROOT/src" |
|
415 | $ cd "$WCROOT/src" | |
427 | $ mkdir dir |
|
416 | $ mkdir dir | |
428 | $ echo epsilon.py > dir/epsilon.py |
|
417 | $ echo epsilon.py > dir/epsilon.py | |
429 | $ svn add dir |
|
418 | $ svn add dir | |
430 | A dir |
|
419 | A dir | |
431 | A dir/epsilon.py (glob) |
|
420 | A dir/epsilon.py (glob) | |
432 | $ svn ci -m 'Add dir/epsilon.py' |
|
421 | $ svn ci -qm 'Add dir/epsilon.py' | |
433 | Adding *dir (glob) |
|
|||
434 | Adding *dir/epsilon.py (glob) |
|
|||
435 | Transmitting file data . |
|
|||
436 | Committed revision 6. |
|
|||
437 | $ cd ../.. |
|
422 | $ cd ../.. | |
438 | $ hg init rebaserepo |
|
423 | $ hg init rebaserepo | |
439 | $ cd rebaserepo |
|
424 | $ cd rebaserepo | |
440 | $ svn co -r5 --quiet "$SVNREPOURL"/src s |
|
425 | $ svn co -r5 --quiet "$SVNREPOURL"/src s | |
441 | $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub |
|
426 | $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub | |
442 | $ hg add .hgsub |
|
427 | $ hg add .hgsub | |
443 | $ hg ci -m addsub |
|
428 | $ hg ci -m addsub | |
444 | $ echo a > a |
|
429 | $ echo a > a | |
445 | $ hg add . |
|
430 | $ hg add . | |
446 | adding a |
|
431 | adding a | |
447 | $ hg ci -m adda |
|
432 | $ hg ci -m adda | |
448 | $ hg up 0 |
|
433 | $ hg up 0 | |
449 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
434 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
450 | $ svn up -qr6 s |
|
435 | $ svn up -qr6 s | |
451 | $ hg ci -m updatesub |
|
436 | $ hg ci -m updatesub | |
452 | created new head |
|
437 | created new head | |
453 | $ echo pyc > s/dir/epsilon.pyc |
|
438 | $ echo pyc > s/dir/epsilon.pyc | |
454 | $ hg up 1 |
|
439 | $ hg up 1 | |
455 | D *s/dir (glob) |
|
440 | D *s/dir (glob) | |
456 |
|
441 | |||
457 | Fetching external item into '*s/externals'* (glob) |
|
442 | Fetching external item into '*s/externals'* (glob) | |
458 | Checked out external at revision 1. |
|
443 | Checked out external at revision 1. | |
459 |
|
444 | |||
460 | Checked out revision 5. |
|
445 | Checked out revision 5. | |
461 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
446 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
462 | $ hg up -q 2 |
|
447 | $ hg up -q 2 | |
463 |
|
448 | |||
464 | Modify one of the externals to point to a different path so we can |
|
449 | Modify one of the externals to point to a different path so we can | |
465 | test having obstructions when switching branches on checkout: |
|
450 | test having obstructions when switching branches on checkout: | |
466 | $ hg checkout tip |
|
451 | $ hg checkout tip | |
467 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
452 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
468 | $ echo "obstruct = [svn] $SVNREPOURL/externals" >> .hgsub |
|
453 | $ echo "obstruct = [svn] $SVNREPOURL/externals" >> .hgsub | |
469 | $ svn co -r5 --quiet "$SVNREPOURL"/externals obstruct |
|
454 | $ svn co -r5 --quiet "$SVNREPOURL"/externals obstruct | |
470 | $ hg commit -m 'Start making obstructed working copy' |
|
455 | $ hg commit -m 'Start making obstructed working copy' | |
471 | $ hg book other |
|
456 | $ hg book other | |
472 | $ hg co -r 'p1(tip)' |
|
457 | $ hg co -r 'p1(tip)' | |
473 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
458 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
474 | (leaving bookmark other) |
|
459 | (leaving bookmark other) | |
475 | $ echo "obstruct = [svn] $SVNREPOURL/src" >> .hgsub |
|
460 | $ echo "obstruct = [svn] $SVNREPOURL/src" >> .hgsub | |
476 | $ svn co -r5 --quiet "$SVNREPOURL"/src obstruct |
|
461 | $ svn co -r5 --quiet "$SVNREPOURL"/src obstruct | |
477 | $ hg commit -m 'Other branch which will be obstructed' |
|
462 | $ hg commit -m 'Other branch which will be obstructed' | |
478 | created new head |
|
463 | created new head | |
479 |
|
464 | |||
480 | Switching back to the head where we have another path mapped to the |
|
465 | Switching back to the head where we have another path mapped to the | |
481 | same subrepo should work if the subrepo is clean. |
|
466 | same subrepo should work if the subrepo is clean. | |
482 | $ hg co other |
|
467 | $ hg co other | |
483 | A *obstruct/other (glob) |
|
468 | A *obstruct/other (glob) | |
484 | Checked out revision 1. |
|
469 | Checked out revision 1. | |
485 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
470 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
486 | (activating bookmark other) |
|
471 | (activating bookmark other) | |
487 |
|
472 | |||
488 | This is surprising, but is also correct based on the current code: |
|
473 | This is surprising, but is also correct based on the current code: | |
489 | $ echo "updating should (maybe) fail" > obstruct/other |
|
474 | $ echo "updating should (maybe) fail" > obstruct/other | |
490 | $ hg co tip |
|
475 | $ hg co tip | |
491 | abort: uncommitted changes |
|
476 | abort: uncommitted changes | |
492 | (commit or update --clean to discard changes) |
|
477 | (commit or update --clean to discard changes) | |
493 | [255] |
|
478 | [255] | |
494 |
|
479 | |||
495 | Point to a Subversion branch which has since been deleted and recreated |
|
480 | Point to a Subversion branch which has since been deleted and recreated | |
496 | First, create that condition in the repository. |
|
481 | First, create that condition in the repository. | |
497 |
|
482 | |||
498 |
$ hg ci --subrepos -m cleanup | |
|
483 | $ hg ci --subrepos -m cleanup | filter_svn_output | |
499 | committing subrepository obstruct |
|
484 | committing subrepository obstruct | |
500 | Sending obstruct/other (glob) |
|
485 | Sending obstruct/other (glob) | |
501 | Transmitting file data . |
|
|||
502 | Committed revision 7. |
|
486 | Committed revision 7. | |
503 | At revision 7. |
|
487 | At revision 7. | |
504 | $ svn mkdir -m "baseline" $SVNREPOURL/trunk |
|
488 | $ svn mkdir -qm "baseline" $SVNREPOURL/trunk | |
505 |
|
489 | $ svn copy -qm "initial branch" $SVNREPOURL/trunk $SVNREPOURL/branch | ||
506 | Committed revision 8. |
|
|||
507 | $ svn copy -m "initial branch" $SVNREPOURL/trunk $SVNREPOURL/branch |
|
|||
508 |
|
||||
509 | Committed revision 9. |
|
|||
510 | $ svn co --quiet "$SVNREPOURL"/branch tempwc |
|
490 | $ svn co --quiet "$SVNREPOURL"/branch tempwc | |
511 | $ cd tempwc |
|
491 | $ cd tempwc | |
512 | $ echo "something old" > somethingold |
|
492 | $ echo "something old" > somethingold | |
513 | $ svn add somethingold |
|
493 | $ svn add somethingold | |
514 | A somethingold |
|
494 | A somethingold | |
515 | $ svn ci -m 'Something old' |
|
495 | $ svn ci -qm 'Something old' | |
516 | Adding somethingold |
|
496 | $ svn rm -qm "remove branch" $SVNREPOURL/branch | |
517 | Transmitting file data . |
|
497 | $ svn copy -qm "recreate branch" $SVNREPOURL/trunk $SVNREPOURL/branch | |
518 | Committed revision 10. |
|
|||
519 | $ svn rm -m "remove branch" $SVNREPOURL/branch |
|
|||
520 |
|
||||
521 | Committed revision 11. |
|
|||
522 | $ svn copy -m "recreate branch" $SVNREPOURL/trunk $SVNREPOURL/branch |
|
|||
523 |
|
||||
524 | Committed revision 12. |
|
|||
525 | $ svn up -q |
|
498 | $ svn up -q | |
526 | $ echo "something new" > somethingnew |
|
499 | $ echo "something new" > somethingnew | |
527 | $ svn add somethingnew |
|
500 | $ svn add somethingnew | |
528 | A somethingnew |
|
501 | A somethingnew | |
529 | $ svn ci -m 'Something new' |
|
502 | $ svn ci -qm 'Something new' | |
530 | Adding somethingnew |
|
|||
531 | Transmitting file data . |
|
|||
532 | Committed revision 13. |
|
|||
533 | $ cd .. |
|
503 | $ cd .. | |
534 | $ rm -rf tempwc |
|
504 | $ rm -rf tempwc | |
535 | $ svn co "$SVNREPOURL/branch"@10 recreated |
|
505 | $ svn co "$SVNREPOURL/branch"@10 recreated | |
536 | A recreated/somethingold (glob) |
|
506 | A recreated/somethingold (glob) | |
537 | Checked out revision 10. |
|
507 | Checked out revision 10. | |
538 | $ echo "recreated = [svn] $SVNREPOURL/branch" >> .hgsub |
|
508 | $ echo "recreated = [svn] $SVNREPOURL/branch" >> .hgsub | |
539 | $ hg ci -m addsub |
|
509 | $ hg ci -m addsub | |
540 | $ cd recreated |
|
510 | $ cd recreated | |
541 | $ svn up -q |
|
511 | $ svn up -q | |
542 | $ cd .. |
|
512 | $ cd .. | |
543 | $ hg ci -m updatesub |
|
513 | $ hg ci -m updatesub | |
544 | $ hg up -r-2 |
|
514 | $ hg up -r-2 | |
545 | D *recreated/somethingnew (glob) |
|
515 | D *recreated/somethingnew (glob) | |
546 | A *recreated/somethingold (glob) |
|
516 | A *recreated/somethingold (glob) | |
547 | Checked out revision 10. |
|
517 | Checked out revision 10. | |
548 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
518 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
549 | (leaving bookmark other) |
|
519 | (leaving bookmark other) | |
550 | $ test -f recreated/somethingold |
|
520 | $ test -f recreated/somethingold | |
551 |
|
521 | |||
552 | Test archive |
|
522 | Test archive | |
553 |
|
523 | |||
554 | $ hg archive -S ../archive-all --debug --config progress.debug=true |
|
524 | $ hg archive -S ../archive-all --debug --config progress.debug=true | |
555 | archiving: 0/2 files (0.00%) |
|
525 | archiving: 0/2 files (0.00%) | |
556 | archiving: .hgsub 1/2 files (50.00%) |
|
526 | archiving: .hgsub 1/2 files (50.00%) | |
557 | archiving: .hgsubstate 2/2 files (100.00%) |
|
527 | archiving: .hgsubstate 2/2 files (100.00%) | |
558 | archiving (obstruct): 0/1 files (0.00%) |
|
528 | archiving (obstruct): 0/1 files (0.00%) | |
559 | archiving (obstruct): 1/1 files (100.00%) |
|
529 | archiving (obstruct): 1/1 files (100.00%) | |
560 | archiving (recreated): 0/1 files (0.00%) |
|
530 | archiving (recreated): 0/1 files (0.00%) | |
561 | archiving (recreated): 1/1 files (100.00%) |
|
531 | archiving (recreated): 1/1 files (100.00%) | |
562 | archiving (s): 0/2 files (0.00%) |
|
532 | archiving (s): 0/2 files (0.00%) | |
563 | archiving (s): 1/2 files (50.00%) |
|
533 | archiving (s): 1/2 files (50.00%) | |
564 | archiving (s): 2/2 files (100.00%) |
|
534 | archiving (s): 2/2 files (100.00%) | |
565 |
|
535 | |||
566 | $ hg archive -S ../archive-exclude --debug --config progress.debug=true -X **old |
|
536 | $ hg archive -S ../archive-exclude --debug --config progress.debug=true -X **old | |
567 | archiving: 0/2 files (0.00%) |
|
537 | archiving: 0/2 files (0.00%) | |
568 | archiving: .hgsub 1/2 files (50.00%) |
|
538 | archiving: .hgsub 1/2 files (50.00%) | |
569 | archiving: .hgsubstate 2/2 files (100.00%) |
|
539 | archiving: .hgsubstate 2/2 files (100.00%) | |
570 | archiving (obstruct): 0/1 files (0.00%) |
|
540 | archiving (obstruct): 0/1 files (0.00%) | |
571 | archiving (obstruct): 1/1 files (100.00%) |
|
541 | archiving (obstruct): 1/1 files (100.00%) | |
572 | archiving (recreated): 0 files |
|
542 | archiving (recreated): 0 files | |
573 | archiving (s): 0/2 files (0.00%) |
|
543 | archiving (s): 0/2 files (0.00%) | |
574 | archiving (s): 1/2 files (50.00%) |
|
544 | archiving (s): 1/2 files (50.00%) | |
575 | archiving (s): 2/2 files (100.00%) |
|
545 | archiving (s): 2/2 files (100.00%) | |
576 | $ find ../archive-exclude | sort |
|
546 | $ find ../archive-exclude | sort | |
577 | ../archive-exclude |
|
547 | ../archive-exclude | |
578 | ../archive-exclude/.hg_archival.txt |
|
548 | ../archive-exclude/.hg_archival.txt | |
579 | ../archive-exclude/.hgsub |
|
549 | ../archive-exclude/.hgsub | |
580 | ../archive-exclude/.hgsubstate |
|
550 | ../archive-exclude/.hgsubstate | |
581 | ../archive-exclude/obstruct |
|
551 | ../archive-exclude/obstruct | |
582 | ../archive-exclude/obstruct/other |
|
552 | ../archive-exclude/obstruct/other | |
583 | ../archive-exclude/s |
|
553 | ../archive-exclude/s | |
584 | ../archive-exclude/s/alpha |
|
554 | ../archive-exclude/s/alpha | |
585 | ../archive-exclude/s/dir |
|
555 | ../archive-exclude/s/dir | |
586 | ../archive-exclude/s/dir/epsilon.py |
|
556 | ../archive-exclude/s/dir/epsilon.py | |
587 |
|
557 | |||
588 | Test forgetting files, not implemented in svn subrepo, used to |
|
558 | Test forgetting files, not implemented in svn subrepo, used to | |
589 | traceback |
|
559 | traceback | |
590 |
|
560 | |||
591 | #if no-windows |
|
561 | #if no-windows | |
592 | $ hg forget 'notafile*' |
|
562 | $ hg forget 'notafile*' | |
593 | notafile*: No such file or directory |
|
563 | notafile*: No such file or directory | |
594 | [1] |
|
564 | [1] | |
595 | #else |
|
565 | #else | |
596 | $ hg forget 'notafile' |
|
566 | $ hg forget 'notafile' | |
597 | notafile: * (glob) |
|
567 | notafile: * (glob) | |
598 | [1] |
|
568 | [1] | |
599 | #endif |
|
569 | #endif | |
600 |
|
570 | |||
601 | Test a subrepo referencing a just moved svn path. Last commit rev will |
|
571 | Test a subrepo referencing a just moved svn path. Last commit rev will | |
602 | be different from the revision, and the path will be different as |
|
572 | be different from the revision, and the path will be different as | |
603 | well. |
|
573 | well. | |
604 |
|
574 | |||
605 | $ cd "$WCROOT" |
|
575 | $ cd "$WCROOT" | |
606 | $ svn up > /dev/null |
|
576 | $ svn up > /dev/null | |
607 | $ mkdir trunk/subdir branches |
|
577 | $ mkdir trunk/subdir branches | |
608 | $ echo a > trunk/subdir/a |
|
578 | $ echo a > trunk/subdir/a | |
609 | $ svn add trunk/subdir branches |
|
579 | $ svn add trunk/subdir branches | |
610 | A trunk/subdir (glob) |
|
580 | A trunk/subdir (glob) | |
611 | A trunk/subdir/a (glob) |
|
581 | A trunk/subdir/a (glob) | |
612 | A branches |
|
582 | A branches | |
613 | $ svn ci -m addsubdir |
|
583 | $ svn ci -qm addsubdir | |
614 | Adding branches |
|
584 | $ svn cp -qm branchtrunk $SVNREPOURL/trunk $SVNREPOURL/branches/somebranch | |
615 | Adding trunk/subdir (glob) |
|
|||
616 | Adding trunk/subdir/a (glob) |
|
|||
617 | Transmitting file data . |
|
|||
618 | Committed revision 14. |
|
|||
619 | $ svn cp -m branchtrunk $SVNREPOURL/trunk $SVNREPOURL/branches/somebranch |
|
|||
620 |
|
||||
621 | Committed revision 15. |
|
|||
622 | $ cd .. |
|
585 | $ cd .. | |
623 |
|
586 | |||
624 | $ hg init repo2 |
|
587 | $ hg init repo2 | |
625 | $ cd repo2 |
|
588 | $ cd repo2 | |
626 | $ svn co $SVNREPOURL/branches/somebranch/subdir |
|
589 | $ svn co $SVNREPOURL/branches/somebranch/subdir | |
627 | A subdir/a (glob) |
|
590 | A subdir/a (glob) | |
628 | Checked out revision 15. |
|
591 | Checked out revision 15. | |
629 | $ echo "subdir = [svn] $SVNREPOURL/branches/somebranch/subdir" > .hgsub |
|
592 | $ echo "subdir = [svn] $SVNREPOURL/branches/somebranch/subdir" > .hgsub | |
630 | $ hg add .hgsub |
|
593 | $ hg add .hgsub | |
631 | $ hg ci -m addsub |
|
594 | $ hg ci -m addsub | |
632 | $ hg up null |
|
595 | $ hg up null | |
633 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
596 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
634 | $ hg up |
|
597 | $ hg up | |
635 | A *subdir/a (glob) |
|
598 | A *subdir/a (glob) | |
636 | Checked out revision 15. |
|
599 | Checked out revision 15. | |
637 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
600 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
638 | $ cd .. |
|
601 | $ cd .. | |
639 |
|
602 | |||
640 | Test sanitizing ".hg/hgrc" in subrepo |
|
603 | Test sanitizing ".hg/hgrc" in subrepo | |
641 |
|
604 | |||
642 | $ cd sub/t |
|
605 | $ cd sub/t | |
643 | $ hg update -q -C tip |
|
606 | $ hg update -q -C tip | |
644 | $ cd s |
|
607 | $ cd s | |
645 | $ mkdir .hg |
|
608 | $ mkdir .hg | |
646 | $ echo '.hg/hgrc in svn repo' > .hg/hgrc |
|
609 | $ echo '.hg/hgrc in svn repo' > .hg/hgrc | |
647 | $ mkdir -p sub/.hg |
|
610 | $ mkdir -p sub/.hg | |
648 | $ echo 'sub/.hg/hgrc in svn repo' > sub/.hg/hgrc |
|
611 | $ echo 'sub/.hg/hgrc in svn repo' > sub/.hg/hgrc | |
649 | $ svn add .hg sub |
|
612 | $ svn add .hg sub | |
650 | A .hg |
|
613 | A .hg | |
651 | A .hg/hgrc (glob) |
|
614 | A .hg/hgrc (glob) | |
652 | A sub |
|
615 | A sub | |
653 | A sub/.hg (glob) |
|
616 | A sub/.hg (glob) | |
654 | A sub/.hg/hgrc (glob) |
|
617 | A sub/.hg/hgrc (glob) | |
655 | $ svn ci -m 'add .hg/hgrc to be sanitized at hg update' |
|
618 | $ svn ci -qm 'add .hg/hgrc to be sanitized at hg update' | |
656 | Adding .hg |
|
|||
657 | Adding .hg/hgrc (glob) |
|
|||
658 | Adding sub |
|
|||
659 | Adding sub/.hg (glob) |
|
|||
660 | Adding sub/.hg/hgrc (glob) |
|
|||
661 | Transmitting file data .. |
|
|||
662 | Committed revision 16. |
|
|||
663 | $ svn up -q |
|
619 | $ svn up -q | |
664 | $ cd .. |
|
620 | $ cd .. | |
665 | $ hg commit -S -m 'commit with svn revision including .hg/hgrc' |
|
621 | $ hg commit -S -m 'commit with svn revision including .hg/hgrc' | |
666 | $ grep ' s$' .hgsubstate |
|
622 | $ grep ' s$' .hgsubstate | |
667 | 16 s |
|
623 | 16 s | |
668 | $ cd .. |
|
624 | $ cd .. | |
669 |
|
625 | |||
670 | $ hg -R tc pull -u -q 2>&1 | sort |
|
626 | $ hg -R tc pull -u -q 2>&1 | sort | |
671 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/.hg' (glob) |
|
627 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/.hg' (glob) | |
672 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/sub/.hg' (glob) |
|
628 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/sub/tc/s/sub/.hg' (glob) | |
673 | $ cd tc |
|
629 | $ cd tc | |
674 | $ grep ' s$' .hgsubstate |
|
630 | $ grep ' s$' .hgsubstate | |
675 | 16 s |
|
631 | 16 s | |
676 | $ test -f s/.hg/hgrc |
|
632 | $ test -f s/.hg/hgrc | |
677 | [1] |
|
633 | [1] | |
678 | $ test -f s/sub/.hg/hgrc |
|
634 | $ test -f s/sub/.hg/hgrc | |
679 | [1] |
|
635 | [1] | |
680 |
|
636 | |||
681 | Test that sanitizing is omitted in meta data area: |
|
637 | Test that sanitizing is omitted in meta data area: | |
682 |
|
638 | |||
683 | $ mkdir s/.svn/.hg |
|
639 | $ mkdir s/.svn/.hg | |
684 | $ echo '.hg/hgrc in svn metadata area' > s/.svn/.hg/hgrc |
|
640 | $ echo '.hg/hgrc in svn metadata area' > s/.svn/.hg/hgrc | |
685 | $ hg update -q -C '.^1' |
|
641 | $ hg update -q -C '.^1' | |
686 |
|
642 | |||
687 | $ cd ../.. |
|
643 | $ cd ../.. |
General Comments 0
You need to be logged in to leave comments.
Login now