Show More
@@ -1,1989 +1,1996 b'' | |||||
1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: |
|
1 | Let commit recurse into subrepos by default to match pre-2.0 behavior: | |
2 |
|
2 | |||
3 | $ echo "[ui]" >> $HGRCPATH |
|
3 | $ echo "[ui]" >> $HGRCPATH | |
4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH |
|
4 | $ echo "commitsubrepos = Yes" >> $HGRCPATH | |
5 |
|
5 | |||
6 | $ hg init t |
|
6 | $ hg init t | |
7 | $ cd t |
|
7 | $ cd t | |
8 |
|
8 | |||
9 | first revision, no sub |
|
9 | first revision, no sub | |
10 |
|
10 | |||
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ hg ci -Am0 |
|
12 | $ hg ci -Am0 | |
13 | adding a |
|
13 | adding a | |
14 |
|
14 | |||
15 | add first sub |
|
15 | add first sub | |
16 |
|
16 | |||
17 | $ echo s = s > .hgsub |
|
17 | $ echo s = s > .hgsub | |
18 | $ hg add .hgsub |
|
18 | $ hg add .hgsub | |
19 | $ hg init s |
|
19 | $ hg init s | |
20 | $ echo a > s/a |
|
20 | $ echo a > s/a | |
21 |
|
21 | |||
22 | Issue2232: committing a subrepo without .hgsub |
|
22 | Issue2232: committing a subrepo without .hgsub | |
23 |
|
23 | |||
24 | $ hg ci -mbad s |
|
24 | $ hg ci -mbad s | |
25 | abort: can't commit subrepos without .hgsub |
|
25 | abort: can't commit subrepos without .hgsub | |
26 | [255] |
|
26 | [255] | |
27 |
|
27 | |||
28 | $ hg -R s add s/a |
|
28 | $ hg -R s add s/a | |
29 | $ hg files -S |
|
29 | $ hg files -S | |
30 | .hgsub |
|
30 | .hgsub | |
31 | a |
|
31 | a | |
32 | s/a |
|
32 | s/a | |
33 |
|
33 | |||
|
34 | `hg files` respects ui.relative-paths | |||
|
35 | BROKEN: shows subrepo paths relative to the subrepo | |||
|
36 | $ hg files -S --config ui.relative-paths=no | |||
|
37 | .hgsub | |||
|
38 | a | |||
|
39 | a | |||
|
40 | ||||
34 | $ hg -R s ci -Ams0 |
|
41 | $ hg -R s ci -Ams0 | |
35 | $ hg sum |
|
42 | $ hg sum | |
36 | parent: 0:f7b1eb17ad24 tip |
|
43 | parent: 0:f7b1eb17ad24 tip | |
37 | 0 |
|
44 | 0 | |
38 | branch: default |
|
45 | branch: default | |
39 | commit: 1 added, 1 subrepos |
|
46 | commit: 1 added, 1 subrepos | |
40 | update: (current) |
|
47 | update: (current) | |
41 | phases: 1 draft |
|
48 | phases: 1 draft | |
42 | $ hg ci -m1 |
|
49 | $ hg ci -m1 | |
43 |
|
50 | |||
44 | test handling .hgsubstate "added" explicitly. |
|
51 | test handling .hgsubstate "added" explicitly. | |
45 |
|
52 | |||
46 | $ hg parents --template '{node}\n{files}\n' |
|
53 | $ hg parents --template '{node}\n{files}\n' | |
47 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
54 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 | |
48 | .hgsub .hgsubstate |
|
55 | .hgsub .hgsubstate | |
49 | $ hg rollback -q |
|
56 | $ hg rollback -q | |
50 | $ hg add .hgsubstate |
|
57 | $ hg add .hgsubstate | |
51 | $ hg ci -m1 |
|
58 | $ hg ci -m1 | |
52 | $ hg parents --template '{node}\n{files}\n' |
|
59 | $ hg parents --template '{node}\n{files}\n' | |
53 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
60 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 | |
54 | .hgsub .hgsubstate |
|
61 | .hgsub .hgsubstate | |
55 |
|
62 | |||
56 | Subrepopath which overlaps with filepath, does not change warnings in remove() |
|
63 | Subrepopath which overlaps with filepath, does not change warnings in remove() | |
57 |
|
64 | |||
58 | $ mkdir snot |
|
65 | $ mkdir snot | |
59 | $ touch snot/file |
|
66 | $ touch snot/file | |
60 | $ hg remove -S snot/file |
|
67 | $ hg remove -S snot/file | |
61 | not removing snot/file: file is untracked |
|
68 | not removing snot/file: file is untracked | |
62 | [1] |
|
69 | [1] | |
63 | $ hg cat snot/filenot |
|
70 | $ hg cat snot/filenot | |
64 | snot/filenot: no such file in rev 7cf8cfea66e4 |
|
71 | snot/filenot: no such file in rev 7cf8cfea66e4 | |
65 | [1] |
|
72 | [1] | |
66 | $ rm -r snot |
|
73 | $ rm -r snot | |
67 |
|
74 | |||
68 | Revert subrepo and test subrepo fileset keyword: |
|
75 | Revert subrepo and test subrepo fileset keyword: | |
69 |
|
76 | |||
70 | $ echo b > s/a |
|
77 | $ echo b > s/a | |
71 | $ hg revert --dry-run "set:subrepo('glob:s*')" |
|
78 | $ hg revert --dry-run "set:subrepo('glob:s*')" | |
72 | reverting subrepo s |
|
79 | reverting subrepo s | |
73 | reverting s/a |
|
80 | reverting s/a | |
74 | $ cat s/a |
|
81 | $ cat s/a | |
75 | b |
|
82 | b | |
76 | $ hg revert "set:subrepo('glob:s*')" |
|
83 | $ hg revert "set:subrepo('glob:s*')" | |
77 | reverting subrepo s |
|
84 | reverting subrepo s | |
78 | reverting s/a |
|
85 | reverting s/a | |
79 | $ cat s/a |
|
86 | $ cat s/a | |
80 | a |
|
87 | a | |
81 | $ rm s/a.orig |
|
88 | $ rm s/a.orig | |
82 |
|
89 | |||
83 | Revert subrepo with no backup. The "reverting s/a" line is gone since |
|
90 | Revert subrepo with no backup. The "reverting s/a" line is gone since | |
84 | we're really running 'hg update' in the subrepo: |
|
91 | we're really running 'hg update' in the subrepo: | |
85 |
|
92 | |||
86 | $ echo b > s/a |
|
93 | $ echo b > s/a | |
87 | $ hg revert --no-backup s |
|
94 | $ hg revert --no-backup s | |
88 | reverting subrepo s |
|
95 | reverting subrepo s | |
89 |
|
96 | |||
90 | Issue2022: update -C |
|
97 | Issue2022: update -C | |
91 |
|
98 | |||
92 | $ echo b > s/a |
|
99 | $ echo b > s/a | |
93 | $ hg sum |
|
100 | $ hg sum | |
94 | parent: 1:7cf8cfea66e4 tip |
|
101 | parent: 1:7cf8cfea66e4 tip | |
95 | 1 |
|
102 | 1 | |
96 | branch: default |
|
103 | branch: default | |
97 | commit: 1 subrepos |
|
104 | commit: 1 subrepos | |
98 | update: (current) |
|
105 | update: (current) | |
99 | phases: 2 draft |
|
106 | phases: 2 draft | |
100 | $ hg co -C 1 |
|
107 | $ hg co -C 1 | |
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 | $ hg sum |
|
109 | $ hg sum | |
103 | parent: 1:7cf8cfea66e4 tip |
|
110 | parent: 1:7cf8cfea66e4 tip | |
104 | 1 |
|
111 | 1 | |
105 | branch: default |
|
112 | branch: default | |
106 | commit: (clean) |
|
113 | commit: (clean) | |
107 | update: (current) |
|
114 | update: (current) | |
108 | phases: 2 draft |
|
115 | phases: 2 draft | |
109 |
|
116 | |||
110 | commands that require a clean repo should respect subrepos |
|
117 | commands that require a clean repo should respect subrepos | |
111 |
|
118 | |||
112 | $ echo b >> s/a |
|
119 | $ echo b >> s/a | |
113 | $ hg backout tip |
|
120 | $ hg backout tip | |
114 | abort: uncommitted changes in subrepository "s" |
|
121 | abort: uncommitted changes in subrepository "s" | |
115 | [255] |
|
122 | [255] | |
116 | $ hg revert -C -R s s/a |
|
123 | $ hg revert -C -R s s/a | |
117 |
|
124 | |||
118 | add sub sub |
|
125 | add sub sub | |
119 |
|
126 | |||
120 | $ echo ss = ss > s/.hgsub |
|
127 | $ echo ss = ss > s/.hgsub | |
121 | $ hg init s/ss |
|
128 | $ hg init s/ss | |
122 | $ echo a > s/ss/a |
|
129 | $ echo a > s/ss/a | |
123 | $ hg -R s add s/.hgsub |
|
130 | $ hg -R s add s/.hgsub | |
124 | $ hg -R s/ss add s/ss/a |
|
131 | $ hg -R s/ss add s/ss/a | |
125 | $ hg sum |
|
132 | $ hg sum | |
126 | parent: 1:7cf8cfea66e4 tip |
|
133 | parent: 1:7cf8cfea66e4 tip | |
127 | 1 |
|
134 | 1 | |
128 | branch: default |
|
135 | branch: default | |
129 | commit: 1 subrepos |
|
136 | commit: 1 subrepos | |
130 | update: (current) |
|
137 | update: (current) | |
131 | phases: 2 draft |
|
138 | phases: 2 draft | |
132 | $ hg ci -m2 |
|
139 | $ hg ci -m2 | |
133 | committing subrepository s |
|
140 | committing subrepository s | |
134 | committing subrepository s/ss |
|
141 | committing subrepository s/ss | |
135 | $ hg sum |
|
142 | $ hg sum | |
136 | parent: 2:df30734270ae tip |
|
143 | parent: 2:df30734270ae tip | |
137 | 2 |
|
144 | 2 | |
138 | branch: default |
|
145 | branch: default | |
139 | commit: (clean) |
|
146 | commit: (clean) | |
140 | update: (current) |
|
147 | update: (current) | |
141 | phases: 3 draft |
|
148 | phases: 3 draft | |
142 |
|
149 | |||
143 | test handling .hgsubstate "modified" explicitly. |
|
150 | test handling .hgsubstate "modified" explicitly. | |
144 |
|
151 | |||
145 | $ hg parents --template '{node}\n{files}\n' |
|
152 | $ hg parents --template '{node}\n{files}\n' | |
146 | df30734270ae757feb35e643b7018e818e78a9aa |
|
153 | df30734270ae757feb35e643b7018e818e78a9aa | |
147 | .hgsubstate |
|
154 | .hgsubstate | |
148 | $ hg rollback -q |
|
155 | $ hg rollback -q | |
149 | $ hg status -A .hgsubstate |
|
156 | $ hg status -A .hgsubstate | |
150 | M .hgsubstate |
|
157 | M .hgsubstate | |
151 | $ hg ci -m2 |
|
158 | $ hg ci -m2 | |
152 | $ hg parents --template '{node}\n{files}\n' |
|
159 | $ hg parents --template '{node}\n{files}\n' | |
153 | df30734270ae757feb35e643b7018e818e78a9aa |
|
160 | df30734270ae757feb35e643b7018e818e78a9aa | |
154 | .hgsubstate |
|
161 | .hgsubstate | |
155 |
|
162 | |||
156 | bump sub rev (and check it is ignored by ui.commitsubrepos) |
|
163 | bump sub rev (and check it is ignored by ui.commitsubrepos) | |
157 |
|
164 | |||
158 | $ echo b > s/a |
|
165 | $ echo b > s/a | |
159 | $ hg -R s ci -ms1 |
|
166 | $ hg -R s ci -ms1 | |
160 | $ hg --config ui.commitsubrepos=no ci -m3 |
|
167 | $ hg --config ui.commitsubrepos=no ci -m3 | |
161 |
|
168 | |||
162 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) |
|
169 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) | |
163 |
|
170 | |||
164 | $ echo c > s/a |
|
171 | $ echo c > s/a | |
165 | $ hg --config ui.commitsubrepos=no ci -m4 |
|
172 | $ hg --config ui.commitsubrepos=no ci -m4 | |
166 | abort: uncommitted changes in subrepository "s" |
|
173 | abort: uncommitted changes in subrepository "s" | |
167 | (use --subrepos for recursive commit) |
|
174 | (use --subrepos for recursive commit) | |
168 | [255] |
|
175 | [255] | |
169 | $ hg id |
|
176 | $ hg id | |
170 | f6affe3fbfaa+ tip |
|
177 | f6affe3fbfaa+ tip | |
171 | $ hg -R s ci -mc |
|
178 | $ hg -R s ci -mc | |
172 | $ hg id |
|
179 | $ hg id | |
173 | f6affe3fbfaa+ tip |
|
180 | f6affe3fbfaa+ tip | |
174 | $ echo d > s/a |
|
181 | $ echo d > s/a | |
175 | $ hg ci -m4 |
|
182 | $ hg ci -m4 | |
176 | committing subrepository s |
|
183 | committing subrepository s | |
177 | $ hg tip -R s |
|
184 | $ hg tip -R s | |
178 | changeset: 4:02dcf1d70411 |
|
185 | changeset: 4:02dcf1d70411 | |
179 | tag: tip |
|
186 | tag: tip | |
180 | user: test |
|
187 | user: test | |
181 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
188 | date: Thu Jan 01 00:00:00 1970 +0000 | |
182 | summary: 4 |
|
189 | summary: 4 | |
183 |
|
190 | |||
184 |
|
191 | |||
185 | check caching |
|
192 | check caching | |
186 |
|
193 | |||
187 | $ hg co 0 |
|
194 | $ hg co 0 | |
188 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
195 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
189 | $ hg debugsub |
|
196 | $ hg debugsub | |
190 |
|
197 | |||
191 | restore |
|
198 | restore | |
192 |
|
199 | |||
193 | $ hg co |
|
200 | $ hg co | |
194 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
201 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
195 | $ hg debugsub |
|
202 | $ hg debugsub | |
196 | path s |
|
203 | path s | |
197 | source s |
|
204 | source s | |
198 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef |
|
205 | revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef | |
199 |
|
206 | |||
200 | new branch for merge tests |
|
207 | new branch for merge tests | |
201 |
|
208 | |||
202 | $ hg co 1 |
|
209 | $ hg co 1 | |
203 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
210 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
204 | $ echo t = t >> .hgsub |
|
211 | $ echo t = t >> .hgsub | |
205 | $ hg init t |
|
212 | $ hg init t | |
206 | $ echo t > t/t |
|
213 | $ echo t > t/t | |
207 | $ hg -R t add t |
|
214 | $ hg -R t add t | |
208 | adding t/t |
|
215 | adding t/t | |
209 |
|
216 | |||
210 | 5 |
|
217 | 5 | |
211 |
|
218 | |||
212 | $ hg ci -m5 # add sub |
|
219 | $ hg ci -m5 # add sub | |
213 | committing subrepository t |
|
220 | committing subrepository t | |
214 | created new head |
|
221 | created new head | |
215 | $ echo t2 > t/t |
|
222 | $ echo t2 > t/t | |
216 |
|
223 | |||
217 | 6 |
|
224 | 6 | |
218 |
|
225 | |||
219 | $ hg st -R s |
|
226 | $ hg st -R s | |
220 | $ hg ci -m6 # change sub |
|
227 | $ hg ci -m6 # change sub | |
221 | committing subrepository t |
|
228 | committing subrepository t | |
222 | $ hg debugsub |
|
229 | $ hg debugsub | |
223 | path s |
|
230 | path s | |
224 | source s |
|
231 | source s | |
225 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
232 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
226 | path t |
|
233 | path t | |
227 | source t |
|
234 | source t | |
228 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
235 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
229 | $ echo t3 > t/t |
|
236 | $ echo t3 > t/t | |
230 |
|
237 | |||
231 | 7 |
|
238 | 7 | |
232 |
|
239 | |||
233 | $ hg ci -m7 # change sub again for conflict test |
|
240 | $ hg ci -m7 # change sub again for conflict test | |
234 | committing subrepository t |
|
241 | committing subrepository t | |
235 | $ hg rm .hgsub |
|
242 | $ hg rm .hgsub | |
236 |
|
243 | |||
237 | 8 |
|
244 | 8 | |
238 |
|
245 | |||
239 | $ hg ci -m8 # remove sub |
|
246 | $ hg ci -m8 # remove sub | |
240 |
|
247 | |||
241 | test handling .hgsubstate "removed" explicitly. |
|
248 | test handling .hgsubstate "removed" explicitly. | |
242 |
|
249 | |||
243 | $ hg parents --template '{node}\n{files}\n' |
|
250 | $ hg parents --template '{node}\n{files}\n' | |
244 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
251 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e | |
245 | .hgsub .hgsubstate |
|
252 | .hgsub .hgsubstate | |
246 | $ hg rollback -q |
|
253 | $ hg rollback -q | |
247 | $ hg remove .hgsubstate |
|
254 | $ hg remove .hgsubstate | |
248 | $ hg ci -m8 |
|
255 | $ hg ci -m8 | |
249 | $ hg parents --template '{node}\n{files}\n' |
|
256 | $ hg parents --template '{node}\n{files}\n' | |
250 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e |
|
257 | 96615c1dad2dc8e3796d7332c77ce69156f7b78e | |
251 | .hgsub .hgsubstate |
|
258 | .hgsub .hgsubstate | |
252 |
|
259 | |||
253 | merge tests |
|
260 | merge tests | |
254 |
|
261 | |||
255 | $ hg co -C 3 |
|
262 | $ hg co -C 3 | |
256 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
263 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
257 | $ hg merge 5 # test adding |
|
264 | $ hg merge 5 # test adding | |
258 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
265 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
259 | (branch merge, don't forget to commit) |
|
266 | (branch merge, don't forget to commit) | |
260 | $ hg debugsub |
|
267 | $ hg debugsub | |
261 | path s |
|
268 | path s | |
262 | source s |
|
269 | source s | |
263 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
270 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
264 | path t |
|
271 | path t | |
265 | source t |
|
272 | source t | |
266 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 |
|
273 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 | |
267 | $ hg ci -m9 |
|
274 | $ hg ci -m9 | |
268 | created new head |
|
275 | created new head | |
269 | $ hg merge 6 --debug # test change |
|
276 | $ hg merge 6 --debug # test change | |
270 | searching for copies back to rev 2 |
|
277 | searching for copies back to rev 2 | |
271 | resolving manifests |
|
278 | resolving manifests | |
272 | branchmerge: True, force: False, partial: False |
|
279 | branchmerge: True, force: False, partial: False | |
273 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 |
|
280 | ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4 | |
274 | starting 4 threads for background file closing (?) |
|
281 | starting 4 threads for background file closing (?) | |
275 | .hgsubstate: versions differ -> m (premerge) |
|
282 | .hgsubstate: versions differ -> m (premerge) | |
276 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec |
|
283 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec | |
277 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg |
|
284 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg | |
278 | getting subrepo t |
|
285 | getting subrepo t | |
279 | resolving manifests |
|
286 | resolving manifests | |
280 | branchmerge: False, force: False, partial: False |
|
287 | branchmerge: False, force: False, partial: False | |
281 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a |
|
288 | ancestor: 60ca1237c194, local: 60ca1237c194+, remote: 6747d179aa9a | |
282 | t: remote is newer -> g |
|
289 | t: remote is newer -> g | |
283 | getting t |
|
290 | getting t | |
284 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
291 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
285 | (branch merge, don't forget to commit) |
|
292 | (branch merge, don't forget to commit) | |
286 | $ hg debugsub |
|
293 | $ hg debugsub | |
287 | path s |
|
294 | path s | |
288 | source s |
|
295 | source s | |
289 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
296 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
290 | path t |
|
297 | path t | |
291 | source t |
|
298 | source t | |
292 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
299 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
293 | $ echo conflict > t/t |
|
300 | $ echo conflict > t/t | |
294 | $ hg ci -m10 |
|
301 | $ hg ci -m10 | |
295 | committing subrepository t |
|
302 | committing subrepository t | |
296 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict |
|
303 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict | |
297 | searching for copies back to rev 2 |
|
304 | searching for copies back to rev 2 | |
298 | resolving manifests |
|
305 | resolving manifests | |
299 | branchmerge: True, force: False, partial: False |
|
306 | branchmerge: True, force: False, partial: False | |
300 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf |
|
307 | ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf | |
301 | starting 4 threads for background file closing (?) |
|
308 | starting 4 threads for background file closing (?) | |
302 | .hgsubstate: versions differ -> m (premerge) |
|
309 | .hgsubstate: versions differ -> m (premerge) | |
303 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
310 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 | |
304 | subrepo t: both sides changed |
|
311 | subrepo t: both sides changed | |
305 | subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198) |
|
312 | subrepository t diverged (local revision: 20a0db6fbf6c, remote revision: 7af322bc1198) | |
306 | starting 4 threads for background file closing (?) |
|
313 | starting 4 threads for background file closing (?) | |
307 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m |
|
314 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m | |
308 | merging subrepository "t" |
|
315 | merging subrepository "t" | |
309 | searching for copies back to rev 2 |
|
316 | searching for copies back to rev 2 | |
310 | resolving manifests |
|
317 | resolving manifests | |
311 | branchmerge: True, force: False, partial: False |
|
318 | branchmerge: True, force: False, partial: False | |
312 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 |
|
319 | ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198 | |
313 | preserving t for resolve of t |
|
320 | preserving t for resolve of t | |
314 | starting 4 threads for background file closing (?) |
|
321 | starting 4 threads for background file closing (?) | |
315 | t: versions differ -> m (premerge) |
|
322 | t: versions differ -> m (premerge) | |
316 | picked tool ':merge' for t (binary False symlink False changedelete False) |
|
323 | picked tool ':merge' for t (binary False symlink False changedelete False) | |
317 | merging t |
|
324 | merging t | |
318 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
325 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a | |
319 | t: versions differ -> m (merge) |
|
326 | t: versions differ -> m (merge) | |
320 | picked tool ':merge' for t (binary False symlink False changedelete False) |
|
327 | picked tool ':merge' for t (binary False symlink False changedelete False) | |
321 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
328 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a | |
322 | warning: conflicts while merging t! (edit, then use 'hg resolve --mark') |
|
329 | warning: conflicts while merging t! (edit, then use 'hg resolve --mark') | |
323 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
330 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
324 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
331 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
325 | subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg |
|
332 | subrepo t: merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg | |
326 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
333 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
327 | (branch merge, don't forget to commit) |
|
334 | (branch merge, don't forget to commit) | |
328 |
|
335 | |||
329 | should conflict |
|
336 | should conflict | |
330 |
|
337 | |||
331 | $ cat t/t |
|
338 | $ cat t/t | |
332 | <<<<<<< local: 20a0db6fbf6c - test: 10 |
|
339 | <<<<<<< local: 20a0db6fbf6c - test: 10 | |
333 | conflict |
|
340 | conflict | |
334 | ======= |
|
341 | ======= | |
335 | t3 |
|
342 | t3 | |
336 | >>>>>>> other: 7af322bc1198 - test: 7 |
|
343 | >>>>>>> other: 7af322bc1198 - test: 7 | |
337 |
|
344 | |||
338 | 11: remove subrepo t |
|
345 | 11: remove subrepo t | |
339 |
|
346 | |||
340 | $ hg co -C 5 |
|
347 | $ hg co -C 5 | |
341 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
348 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
342 | $ hg revert -r 4 .hgsub # remove t |
|
349 | $ hg revert -r 4 .hgsub # remove t | |
343 | $ hg ci -m11 |
|
350 | $ hg ci -m11 | |
344 | created new head |
|
351 | created new head | |
345 | $ hg debugsub |
|
352 | $ hg debugsub | |
346 | path s |
|
353 | path s | |
347 | source s |
|
354 | source s | |
348 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
355 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
349 |
|
356 | |||
350 | local removed, remote changed, keep changed |
|
357 | local removed, remote changed, keep changed | |
351 |
|
358 | |||
352 | $ hg merge 6 |
|
359 | $ hg merge 6 | |
353 | remote [merge rev] changed subrepository t which local [working copy] removed |
|
360 | remote [merge rev] changed subrepository t which local [working copy] removed | |
354 | use (c)hanged version or (d)elete? c |
|
361 | use (c)hanged version or (d)elete? c | |
355 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
362 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
356 | (branch merge, don't forget to commit) |
|
363 | (branch merge, don't forget to commit) | |
357 | BROKEN: should include subrepo t |
|
364 | BROKEN: should include subrepo t | |
358 | $ hg debugsub |
|
365 | $ hg debugsub | |
359 | path s |
|
366 | path s | |
360 | source s |
|
367 | source s | |
361 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
368 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
362 | $ cat .hgsubstate |
|
369 | $ cat .hgsubstate | |
363 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
370 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
364 | 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t |
|
371 | 6747d179aa9a688023c4b0cad32e4c92bb7f34ad t | |
365 | $ hg ci -m 'local removed, remote changed, keep changed' |
|
372 | $ hg ci -m 'local removed, remote changed, keep changed' | |
366 | BROKEN: should include subrepo t |
|
373 | BROKEN: should include subrepo t | |
367 | $ hg debugsub |
|
374 | $ hg debugsub | |
368 | path s |
|
375 | path s | |
369 | source s |
|
376 | source s | |
370 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
377 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
371 | BROKEN: should include subrepo t |
|
378 | BROKEN: should include subrepo t | |
372 | $ cat .hgsubstate |
|
379 | $ cat .hgsubstate | |
373 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
380 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
374 | $ cat t/t |
|
381 | $ cat t/t | |
375 | t2 |
|
382 | t2 | |
376 |
|
383 | |||
377 | local removed, remote changed, keep removed |
|
384 | local removed, remote changed, keep removed | |
378 |
|
385 | |||
379 | $ hg co -C 11 |
|
386 | $ hg co -C 11 | |
380 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
387 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
381 | $ hg merge --config ui.interactive=true 6 <<EOF |
|
388 | $ hg merge --config ui.interactive=true 6 <<EOF | |
382 | > d |
|
389 | > d | |
383 | > EOF |
|
390 | > EOF | |
384 | remote [merge rev] changed subrepository t which local [working copy] removed |
|
391 | remote [merge rev] changed subrepository t which local [working copy] removed | |
385 | use (c)hanged version or (d)elete? d |
|
392 | use (c)hanged version or (d)elete? d | |
386 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
393 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
387 | (branch merge, don't forget to commit) |
|
394 | (branch merge, don't forget to commit) | |
388 | $ hg debugsub |
|
395 | $ hg debugsub | |
389 | path s |
|
396 | path s | |
390 | source s |
|
397 | source s | |
391 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
398 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
392 | $ cat .hgsubstate |
|
399 | $ cat .hgsubstate | |
393 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
400 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
394 | $ hg ci -m 'local removed, remote changed, keep removed' |
|
401 | $ hg ci -m 'local removed, remote changed, keep removed' | |
395 | created new head |
|
402 | created new head | |
396 | $ hg debugsub |
|
403 | $ hg debugsub | |
397 | path s |
|
404 | path s | |
398 | source s |
|
405 | source s | |
399 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
406 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
400 | $ cat .hgsubstate |
|
407 | $ cat .hgsubstate | |
401 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
408 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
402 |
|
409 | |||
403 | local changed, remote removed, keep changed |
|
410 | local changed, remote removed, keep changed | |
404 |
|
411 | |||
405 | $ hg co -C 6 |
|
412 | $ hg co -C 6 | |
406 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
413 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
407 | $ hg merge 11 |
|
414 | $ hg merge 11 | |
408 | local [working copy] changed subrepository t which remote [merge rev] removed |
|
415 | local [working copy] changed subrepository t which remote [merge rev] removed | |
409 | use (c)hanged version or (d)elete? c |
|
416 | use (c)hanged version or (d)elete? c | |
410 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
417 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
411 | (branch merge, don't forget to commit) |
|
418 | (branch merge, don't forget to commit) | |
412 | BROKEN: should include subrepo t |
|
419 | BROKEN: should include subrepo t | |
413 | $ hg debugsub |
|
420 | $ hg debugsub | |
414 | path s |
|
421 | path s | |
415 | source s |
|
422 | source s | |
416 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
423 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
417 | BROKEN: should include subrepo t |
|
424 | BROKEN: should include subrepo t | |
418 | $ cat .hgsubstate |
|
425 | $ cat .hgsubstate | |
419 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
426 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
420 | $ hg ci -m 'local changed, remote removed, keep changed' |
|
427 | $ hg ci -m 'local changed, remote removed, keep changed' | |
421 | created new head |
|
428 | created new head | |
422 | BROKEN: should include subrepo t |
|
429 | BROKEN: should include subrepo t | |
423 | $ hg debugsub |
|
430 | $ hg debugsub | |
424 | path s |
|
431 | path s | |
425 | source s |
|
432 | source s | |
426 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
433 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
427 | BROKEN: should include subrepo t |
|
434 | BROKEN: should include subrepo t | |
428 | $ cat .hgsubstate |
|
435 | $ cat .hgsubstate | |
429 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
436 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
430 | $ cat t/t |
|
437 | $ cat t/t | |
431 | t2 |
|
438 | t2 | |
432 |
|
439 | |||
433 | local changed, remote removed, keep removed |
|
440 | local changed, remote removed, keep removed | |
434 |
|
441 | |||
435 | $ hg co -C 6 |
|
442 | $ hg co -C 6 | |
436 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
443 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
437 | $ hg merge --config ui.interactive=true 11 <<EOF |
|
444 | $ hg merge --config ui.interactive=true 11 <<EOF | |
438 | > d |
|
445 | > d | |
439 | > EOF |
|
446 | > EOF | |
440 | local [working copy] changed subrepository t which remote [merge rev] removed |
|
447 | local [working copy] changed subrepository t which remote [merge rev] removed | |
441 | use (c)hanged version or (d)elete? d |
|
448 | use (c)hanged version or (d)elete? d | |
442 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
449 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
443 | (branch merge, don't forget to commit) |
|
450 | (branch merge, don't forget to commit) | |
444 | $ hg debugsub |
|
451 | $ hg debugsub | |
445 | path s |
|
452 | path s | |
446 | source s |
|
453 | source s | |
447 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
454 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
448 | $ cat .hgsubstate |
|
455 | $ cat .hgsubstate | |
449 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
456 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
450 | $ hg ci -m 'local changed, remote removed, keep removed' |
|
457 | $ hg ci -m 'local changed, remote removed, keep removed' | |
451 | created new head |
|
458 | created new head | |
452 | $ hg debugsub |
|
459 | $ hg debugsub | |
453 | path s |
|
460 | path s | |
454 | source s |
|
461 | source s | |
455 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
462 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
456 | $ cat .hgsubstate |
|
463 | $ cat .hgsubstate | |
457 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
464 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
458 |
|
465 | |||
459 | clean up to avoid having to fix up the tests below |
|
466 | clean up to avoid having to fix up the tests below | |
460 |
|
467 | |||
461 | $ hg co -C 10 |
|
468 | $ hg co -C 10 | |
462 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
469 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
463 | $ cat >> $HGRCPATH <<EOF |
|
470 | $ cat >> $HGRCPATH <<EOF | |
464 | > [extensions] |
|
471 | > [extensions] | |
465 | > strip= |
|
472 | > strip= | |
466 | > EOF |
|
473 | > EOF | |
467 | $ hg strip -r 11:15 |
|
474 | $ hg strip -r 11:15 | |
468 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob) |
|
475 | saved backup bundle to $TESTTMP/t/.hg/strip-backup/*-backup.hg (glob) | |
469 |
|
476 | |||
470 | clone |
|
477 | clone | |
471 |
|
478 | |||
472 | $ cd .. |
|
479 | $ cd .. | |
473 | $ hg clone t tc |
|
480 | $ hg clone t tc | |
474 | updating to branch default |
|
481 | updating to branch default | |
475 | cloning subrepo s from $TESTTMP/t/s |
|
482 | cloning subrepo s from $TESTTMP/t/s | |
476 | cloning subrepo s/ss from $TESTTMP/t/s/ss |
|
483 | cloning subrepo s/ss from $TESTTMP/t/s/ss | |
477 | cloning subrepo t from $TESTTMP/t/t |
|
484 | cloning subrepo t from $TESTTMP/t/t | |
478 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
485 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
479 | $ cd tc |
|
486 | $ cd tc | |
480 | $ hg debugsub |
|
487 | $ hg debugsub | |
481 | path s |
|
488 | path s | |
482 | source s |
|
489 | source s | |
483 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
490 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
484 | path t |
|
491 | path t | |
485 | source t |
|
492 | source t | |
486 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e |
|
493 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e | |
487 | $ cd .. |
|
494 | $ cd .. | |
488 |
|
495 | |||
489 | clone with subrepo disabled (update should fail) |
|
496 | clone with subrepo disabled (update should fail) | |
490 |
|
497 | |||
491 | $ hg clone t -U tc2 --config subrepos.allowed=false |
|
498 | $ hg clone t -U tc2 --config subrepos.allowed=false | |
492 | $ hg update -R tc2 --config subrepos.allowed=false |
|
499 | $ hg update -R tc2 --config subrepos.allowed=false | |
493 | abort: subrepos not enabled |
|
500 | abort: subrepos not enabled | |
494 | (see 'hg help config.subrepos' for details) |
|
501 | (see 'hg help config.subrepos' for details) | |
495 | [255] |
|
502 | [255] | |
496 | $ ls tc2 |
|
503 | $ ls tc2 | |
497 | a |
|
504 | a | |
498 |
|
505 | |||
499 | $ hg clone t tc3 --config subrepos.allowed=false |
|
506 | $ hg clone t tc3 --config subrepos.allowed=false | |
500 | updating to branch default |
|
507 | updating to branch default | |
501 | abort: subrepos not enabled |
|
508 | abort: subrepos not enabled | |
502 | (see 'hg help config.subrepos' for details) |
|
509 | (see 'hg help config.subrepos' for details) | |
503 | [255] |
|
510 | [255] | |
504 | $ ls tc3 |
|
511 | $ ls tc3 | |
505 | a |
|
512 | a | |
506 |
|
513 | |||
507 | And again with just the hg type disabled |
|
514 | And again with just the hg type disabled | |
508 |
|
515 | |||
509 | $ hg clone t -U tc4 --config subrepos.hg:allowed=false |
|
516 | $ hg clone t -U tc4 --config subrepos.hg:allowed=false | |
510 | $ hg update -R tc4 --config subrepos.hg:allowed=false |
|
517 | $ hg update -R tc4 --config subrepos.hg:allowed=false | |
511 | abort: hg subrepos not allowed |
|
518 | abort: hg subrepos not allowed | |
512 | (see 'hg help config.subrepos' for details) |
|
519 | (see 'hg help config.subrepos' for details) | |
513 | [255] |
|
520 | [255] | |
514 | $ ls tc4 |
|
521 | $ ls tc4 | |
515 | a |
|
522 | a | |
516 |
|
523 | |||
517 | $ hg clone t tc5 --config subrepos.hg:allowed=false |
|
524 | $ hg clone t tc5 --config subrepos.hg:allowed=false | |
518 | updating to branch default |
|
525 | updating to branch default | |
519 | abort: hg subrepos not allowed |
|
526 | abort: hg subrepos not allowed | |
520 | (see 'hg help config.subrepos' for details) |
|
527 | (see 'hg help config.subrepos' for details) | |
521 | [255] |
|
528 | [255] | |
522 | $ ls tc5 |
|
529 | $ ls tc5 | |
523 | a |
|
530 | a | |
524 |
|
531 | |||
525 | push |
|
532 | push | |
526 |
|
533 | |||
527 | $ cd tc |
|
534 | $ cd tc | |
528 | $ echo bah > t/t |
|
535 | $ echo bah > t/t | |
529 | $ hg ci -m11 |
|
536 | $ hg ci -m11 | |
530 | committing subrepository t |
|
537 | committing subrepository t | |
531 | $ hg push |
|
538 | $ hg push | |
532 | pushing to $TESTTMP/t |
|
539 | pushing to $TESTTMP/t | |
533 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss |
|
540 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss | |
534 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
541 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
535 | pushing subrepo t to $TESTTMP/t/t |
|
542 | pushing subrepo t to $TESTTMP/t/t | |
536 | searching for changes |
|
543 | searching for changes | |
537 | adding changesets |
|
544 | adding changesets | |
538 | adding manifests |
|
545 | adding manifests | |
539 | adding file changes |
|
546 | adding file changes | |
540 | added 1 changesets with 1 changes to 1 files |
|
547 | added 1 changesets with 1 changes to 1 files | |
541 | searching for changes |
|
548 | searching for changes | |
542 | adding changesets |
|
549 | adding changesets | |
543 | adding manifests |
|
550 | adding manifests | |
544 | adding file changes |
|
551 | adding file changes | |
545 | added 1 changesets with 1 changes to 1 files |
|
552 | added 1 changesets with 1 changes to 1 files | |
546 |
|
553 | |||
547 | push -f |
|
554 | push -f | |
548 |
|
555 | |||
549 | $ echo bah > s/a |
|
556 | $ echo bah > s/a | |
550 | $ hg ci -m12 |
|
557 | $ hg ci -m12 | |
551 | committing subrepository s |
|
558 | committing subrepository s | |
552 | $ hg push |
|
559 | $ hg push | |
553 | pushing to $TESTTMP/t |
|
560 | pushing to $TESTTMP/t | |
554 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss |
|
561 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss | |
555 | pushing subrepo s to $TESTTMP/t/s |
|
562 | pushing subrepo s to $TESTTMP/t/s | |
556 | searching for changes |
|
563 | searching for changes | |
557 | abort: push creates new remote head 12a213df6fa9! (in subrepository "s") |
|
564 | abort: push creates new remote head 12a213df6fa9! (in subrepository "s") | |
558 | (merge or see 'hg help push' for details about pushing new heads) |
|
565 | (merge or see 'hg help push' for details about pushing new heads) | |
559 | [255] |
|
566 | [255] | |
560 | $ hg push -f |
|
567 | $ hg push -f | |
561 | pushing to $TESTTMP/t |
|
568 | pushing to $TESTTMP/t | |
562 | pushing subrepo s/ss to $TESTTMP/t/s/ss |
|
569 | pushing subrepo s/ss to $TESTTMP/t/s/ss | |
563 | searching for changes |
|
570 | searching for changes | |
564 | no changes found |
|
571 | no changes found | |
565 | pushing subrepo s to $TESTTMP/t/s |
|
572 | pushing subrepo s to $TESTTMP/t/s | |
566 | searching for changes |
|
573 | searching for changes | |
567 | adding changesets |
|
574 | adding changesets | |
568 | adding manifests |
|
575 | adding manifests | |
569 | adding file changes |
|
576 | adding file changes | |
570 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
577 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
571 | pushing subrepo t to $TESTTMP/t/t |
|
578 | pushing subrepo t to $TESTTMP/t/t | |
572 | searching for changes |
|
579 | searching for changes | |
573 | no changes found |
|
580 | no changes found | |
574 | searching for changes |
|
581 | searching for changes | |
575 | adding changesets |
|
582 | adding changesets | |
576 | adding manifests |
|
583 | adding manifests | |
577 | adding file changes |
|
584 | adding file changes | |
578 | added 1 changesets with 1 changes to 1 files |
|
585 | added 1 changesets with 1 changes to 1 files | |
579 |
|
586 | |||
580 | check that unmodified subrepos are not pushed |
|
587 | check that unmodified subrepos are not pushed | |
581 |
|
588 | |||
582 | $ hg clone . ../tcc |
|
589 | $ hg clone . ../tcc | |
583 | updating to branch default |
|
590 | updating to branch default | |
584 | cloning subrepo s from $TESTTMP/tc/s |
|
591 | cloning subrepo s from $TESTTMP/tc/s | |
585 | cloning subrepo s/ss from $TESTTMP/tc/s/ss |
|
592 | cloning subrepo s/ss from $TESTTMP/tc/s/ss | |
586 | cloning subrepo t from $TESTTMP/tc/t |
|
593 | cloning subrepo t from $TESTTMP/tc/t | |
587 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
594 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
588 |
|
595 | |||
589 | the subrepos on the new clone have nothing to push to its source |
|
596 | the subrepos on the new clone have nothing to push to its source | |
590 |
|
597 | |||
591 | $ hg push -R ../tcc . |
|
598 | $ hg push -R ../tcc . | |
592 | pushing to . |
|
599 | pushing to . | |
593 | no changes made to subrepo s/ss since last push to s/ss |
|
600 | no changes made to subrepo s/ss since last push to s/ss | |
594 | no changes made to subrepo s since last push to s |
|
601 | no changes made to subrepo s since last push to s | |
595 | no changes made to subrepo t since last push to t |
|
602 | no changes made to subrepo t since last push to t | |
596 | searching for changes |
|
603 | searching for changes | |
597 | no changes found |
|
604 | no changes found | |
598 | [1] |
|
605 | [1] | |
599 |
|
606 | |||
600 | the subrepos on the source do not have a clean store versus the clone target |
|
607 | the subrepos on the source do not have a clean store versus the clone target | |
601 | because they were never explicitly pushed to the source |
|
608 | because they were never explicitly pushed to the source | |
602 |
|
609 | |||
603 | $ hg push ../tcc |
|
610 | $ hg push ../tcc | |
604 | pushing to ../tcc |
|
611 | pushing to ../tcc | |
605 | pushing subrepo s/ss to ../tcc/s/ss |
|
612 | pushing subrepo s/ss to ../tcc/s/ss | |
606 | searching for changes |
|
613 | searching for changes | |
607 | no changes found |
|
614 | no changes found | |
608 | pushing subrepo s to ../tcc/s |
|
615 | pushing subrepo s to ../tcc/s | |
609 | searching for changes |
|
616 | searching for changes | |
610 | no changes found |
|
617 | no changes found | |
611 | pushing subrepo t to ../tcc/t |
|
618 | pushing subrepo t to ../tcc/t | |
612 | searching for changes |
|
619 | searching for changes | |
613 | no changes found |
|
620 | no changes found | |
614 | searching for changes |
|
621 | searching for changes | |
615 | no changes found |
|
622 | no changes found | |
616 | [1] |
|
623 | [1] | |
617 |
|
624 | |||
618 | after push their stores become clean |
|
625 | after push their stores become clean | |
619 |
|
626 | |||
620 | $ hg push ../tcc |
|
627 | $ hg push ../tcc | |
621 | pushing to ../tcc |
|
628 | pushing to ../tcc | |
622 | no changes made to subrepo s/ss since last push to ../tcc/s/ss |
|
629 | no changes made to subrepo s/ss since last push to ../tcc/s/ss | |
623 | no changes made to subrepo s since last push to ../tcc/s |
|
630 | no changes made to subrepo s since last push to ../tcc/s | |
624 | no changes made to subrepo t since last push to ../tcc/t |
|
631 | no changes made to subrepo t since last push to ../tcc/t | |
625 | searching for changes |
|
632 | searching for changes | |
626 | no changes found |
|
633 | no changes found | |
627 | [1] |
|
634 | [1] | |
628 |
|
635 | |||
629 | updating a subrepo to a different revision or changing |
|
636 | updating a subrepo to a different revision or changing | |
630 | its working directory does not make its store dirty |
|
637 | its working directory does not make its store dirty | |
631 |
|
638 | |||
632 | $ hg -R s update '.^' |
|
639 | $ hg -R s update '.^' | |
633 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
640 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
634 | $ hg push |
|
641 | $ hg push | |
635 | pushing to $TESTTMP/t |
|
642 | pushing to $TESTTMP/t | |
636 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss |
|
643 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss | |
637 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
644 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
638 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
645 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
639 | searching for changes |
|
646 | searching for changes | |
640 | no changes found |
|
647 | no changes found | |
641 | [1] |
|
648 | [1] | |
642 | $ echo foo >> s/a |
|
649 | $ echo foo >> s/a | |
643 | $ hg push |
|
650 | $ hg push | |
644 | pushing to $TESTTMP/t |
|
651 | pushing to $TESTTMP/t | |
645 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss |
|
652 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss | |
646 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
653 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
647 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
654 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
648 | searching for changes |
|
655 | searching for changes | |
649 | no changes found |
|
656 | no changes found | |
650 | [1] |
|
657 | [1] | |
651 | $ hg -R s update -C tip |
|
658 | $ hg -R s update -C tip | |
652 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
659 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
653 |
|
660 | |||
654 | committing into a subrepo makes its store (but not its parent's store) dirty |
|
661 | committing into a subrepo makes its store (but not its parent's store) dirty | |
655 |
|
662 | |||
656 | $ echo foo >> s/ss/a |
|
663 | $ echo foo >> s/ss/a | |
657 | $ hg -R s/ss commit -m 'test dirty store detection' |
|
664 | $ hg -R s/ss commit -m 'test dirty store detection' | |
658 |
|
665 | |||
659 | $ hg out -S -r `hg log -r tip -T "{node|short}"` |
|
666 | $ hg out -S -r `hg log -r tip -T "{node|short}"` | |
660 | comparing with $TESTTMP/t |
|
667 | comparing with $TESTTMP/t | |
661 | searching for changes |
|
668 | searching for changes | |
662 | no changes found |
|
669 | no changes found | |
663 | comparing with $TESTTMP/t/s |
|
670 | comparing with $TESTTMP/t/s | |
664 | searching for changes |
|
671 | searching for changes | |
665 | no changes found |
|
672 | no changes found | |
666 | comparing with $TESTTMP/t/s/ss |
|
673 | comparing with $TESTTMP/t/s/ss | |
667 | searching for changes |
|
674 | searching for changes | |
668 | changeset: 1:79ea5566a333 |
|
675 | changeset: 1:79ea5566a333 | |
669 | tag: tip |
|
676 | tag: tip | |
670 | user: test |
|
677 | user: test | |
671 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
678 | date: Thu Jan 01 00:00:00 1970 +0000 | |
672 | summary: test dirty store detection |
|
679 | summary: test dirty store detection | |
673 |
|
680 | |||
674 | comparing with $TESTTMP/t/t |
|
681 | comparing with $TESTTMP/t/t | |
675 | searching for changes |
|
682 | searching for changes | |
676 | no changes found |
|
683 | no changes found | |
677 |
|
684 | |||
678 | $ hg push |
|
685 | $ hg push | |
679 | pushing to $TESTTMP/t |
|
686 | pushing to $TESTTMP/t | |
680 | pushing subrepo s/ss to $TESTTMP/t/s/ss |
|
687 | pushing subrepo s/ss to $TESTTMP/t/s/ss | |
681 | searching for changes |
|
688 | searching for changes | |
682 | adding changesets |
|
689 | adding changesets | |
683 | adding manifests |
|
690 | adding manifests | |
684 | adding file changes |
|
691 | adding file changes | |
685 | added 1 changesets with 1 changes to 1 files |
|
692 | added 1 changesets with 1 changes to 1 files | |
686 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
693 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
687 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
694 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
688 | searching for changes |
|
695 | searching for changes | |
689 | no changes found |
|
696 | no changes found | |
690 | [1] |
|
697 | [1] | |
691 |
|
698 | |||
692 | a subrepo store may be clean versus one repo but not versus another |
|
699 | a subrepo store may be clean versus one repo but not versus another | |
693 |
|
700 | |||
694 | $ hg push |
|
701 | $ hg push | |
695 | pushing to $TESTTMP/t |
|
702 | pushing to $TESTTMP/t | |
696 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss |
|
703 | no changes made to subrepo s/ss since last push to $TESTTMP/t/s/ss | |
697 | no changes made to subrepo s since last push to $TESTTMP/t/s |
|
704 | no changes made to subrepo s since last push to $TESTTMP/t/s | |
698 | no changes made to subrepo t since last push to $TESTTMP/t/t |
|
705 | no changes made to subrepo t since last push to $TESTTMP/t/t | |
699 | searching for changes |
|
706 | searching for changes | |
700 | no changes found |
|
707 | no changes found | |
701 | [1] |
|
708 | [1] | |
702 | $ hg push ../tcc |
|
709 | $ hg push ../tcc | |
703 | pushing to ../tcc |
|
710 | pushing to ../tcc | |
704 | pushing subrepo s/ss to ../tcc/s/ss |
|
711 | pushing subrepo s/ss to ../tcc/s/ss | |
705 | searching for changes |
|
712 | searching for changes | |
706 | adding changesets |
|
713 | adding changesets | |
707 | adding manifests |
|
714 | adding manifests | |
708 | adding file changes |
|
715 | adding file changes | |
709 | added 1 changesets with 1 changes to 1 files |
|
716 | added 1 changesets with 1 changes to 1 files | |
710 | no changes made to subrepo s since last push to ../tcc/s |
|
717 | no changes made to subrepo s since last push to ../tcc/s | |
711 | no changes made to subrepo t since last push to ../tcc/t |
|
718 | no changes made to subrepo t since last push to ../tcc/t | |
712 | searching for changes |
|
719 | searching for changes | |
713 | no changes found |
|
720 | no changes found | |
714 | [1] |
|
721 | [1] | |
715 |
|
722 | |||
716 | update |
|
723 | update | |
717 |
|
724 | |||
718 | $ cd ../t |
|
725 | $ cd ../t | |
719 | $ hg up -C # discard our earlier merge |
|
726 | $ hg up -C # discard our earlier merge | |
720 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
727 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
721 | updated to "c373c8102e68: 12" |
|
728 | updated to "c373c8102e68: 12" | |
722 | 2 other heads for branch "default" |
|
729 | 2 other heads for branch "default" | |
723 | $ echo blah > t/t |
|
730 | $ echo blah > t/t | |
724 | $ hg ci -m13 |
|
731 | $ hg ci -m13 | |
725 | committing subrepository t |
|
732 | committing subrepository t | |
726 |
|
733 | |||
727 | backout calls revert internally with minimal opts, which should not raise |
|
734 | backout calls revert internally with minimal opts, which should not raise | |
728 | KeyError |
|
735 | KeyError | |
729 |
|
736 | |||
730 | $ hg backout ".^" --no-commit |
|
737 | $ hg backout ".^" --no-commit | |
731 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
738 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
732 | changeset c373c8102e68 backed out, don't forget to commit. |
|
739 | changeset c373c8102e68 backed out, don't forget to commit. | |
733 |
|
740 | |||
734 | $ hg up -C # discard changes |
|
741 | $ hg up -C # discard changes | |
735 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
742 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
736 | updated to "925c17564ef8: 13" |
|
743 | updated to "925c17564ef8: 13" | |
737 | 2 other heads for branch "default" |
|
744 | 2 other heads for branch "default" | |
738 |
|
745 | |||
739 | pull |
|
746 | pull | |
740 |
|
747 | |||
741 | $ cd ../tc |
|
748 | $ cd ../tc | |
742 | $ hg pull |
|
749 | $ hg pull | |
743 | pulling from $TESTTMP/t |
|
750 | pulling from $TESTTMP/t | |
744 | searching for changes |
|
751 | searching for changes | |
745 | adding changesets |
|
752 | adding changesets | |
746 | adding manifests |
|
753 | adding manifests | |
747 | adding file changes |
|
754 | adding file changes | |
748 | added 1 changesets with 1 changes to 1 files |
|
755 | added 1 changesets with 1 changes to 1 files | |
749 | new changesets 925c17564ef8 |
|
756 | new changesets 925c17564ef8 | |
750 | (run 'hg update' to get a working copy) |
|
757 | (run 'hg update' to get a working copy) | |
751 |
|
758 | |||
752 | should pull t |
|
759 | should pull t | |
753 |
|
760 | |||
754 | $ hg incoming -S -r `hg log -r tip -T "{node|short}"` |
|
761 | $ hg incoming -S -r `hg log -r tip -T "{node|short}"` | |
755 | comparing with $TESTTMP/t |
|
762 | comparing with $TESTTMP/t | |
756 | no changes found |
|
763 | no changes found | |
757 | comparing with $TESTTMP/t/s |
|
764 | comparing with $TESTTMP/t/s | |
758 | searching for changes |
|
765 | searching for changes | |
759 | no changes found |
|
766 | no changes found | |
760 | comparing with $TESTTMP/t/s/ss |
|
767 | comparing with $TESTTMP/t/s/ss | |
761 | searching for changes |
|
768 | searching for changes | |
762 | no changes found |
|
769 | no changes found | |
763 | comparing with $TESTTMP/t/t |
|
770 | comparing with $TESTTMP/t/t | |
764 | searching for changes |
|
771 | searching for changes | |
765 | changeset: 5:52c0adc0515a |
|
772 | changeset: 5:52c0adc0515a | |
766 | tag: tip |
|
773 | tag: tip | |
767 | user: test |
|
774 | user: test | |
768 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
775 | date: Thu Jan 01 00:00:00 1970 +0000 | |
769 | summary: 13 |
|
776 | summary: 13 | |
770 |
|
777 | |||
771 |
|
778 | |||
772 | $ hg up |
|
779 | $ hg up | |
773 | pulling subrepo t from $TESTTMP/t/t |
|
780 | pulling subrepo t from $TESTTMP/t/t | |
774 | searching for changes |
|
781 | searching for changes | |
775 | adding changesets |
|
782 | adding changesets | |
776 | adding manifests |
|
783 | adding manifests | |
777 | adding file changes |
|
784 | adding file changes | |
778 | added 1 changesets with 1 changes to 1 files |
|
785 | added 1 changesets with 1 changes to 1 files | |
779 | new changesets 52c0adc0515a |
|
786 | new changesets 52c0adc0515a | |
780 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
787 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
781 | updated to "925c17564ef8: 13" |
|
788 | updated to "925c17564ef8: 13" | |
782 | 2 other heads for branch "default" |
|
789 | 2 other heads for branch "default" | |
783 | $ cat t/t |
|
790 | $ cat t/t | |
784 | blah |
|
791 | blah | |
785 |
|
792 | |||
786 | bogus subrepo path aborts |
|
793 | bogus subrepo path aborts | |
787 |
|
794 | |||
788 | $ echo 'bogus=[boguspath' >> .hgsub |
|
795 | $ echo 'bogus=[boguspath' >> .hgsub | |
789 | $ hg ci -m 'bogus subrepo path' |
|
796 | $ hg ci -m 'bogus subrepo path' | |
790 | abort: missing ] in subrepository source |
|
797 | abort: missing ] in subrepository source | |
791 | [255] |
|
798 | [255] | |
792 |
|
799 | |||
793 | Issue1986: merge aborts when trying to merge a subrepo that |
|
800 | Issue1986: merge aborts when trying to merge a subrepo that | |
794 | shouldn't need merging |
|
801 | shouldn't need merging | |
795 |
|
802 | |||
796 | # subrepo layout |
|
803 | # subrepo layout | |
797 | # |
|
804 | # | |
798 | # o 5 br |
|
805 | # o 5 br | |
799 | # /| |
|
806 | # /| | |
800 | # o | 4 default |
|
807 | # o | 4 default | |
801 | # | | |
|
808 | # | | | |
802 | # | o 3 br |
|
809 | # | o 3 br | |
803 | # |/| |
|
810 | # |/| | |
804 | # o | 2 default |
|
811 | # o | 2 default | |
805 | # | | |
|
812 | # | | | |
806 | # | o 1 br |
|
813 | # | o 1 br | |
807 | # |/ |
|
814 | # |/ | |
808 | # o 0 default |
|
815 | # o 0 default | |
809 |
|
816 | |||
810 | $ cd .. |
|
817 | $ cd .. | |
811 | $ rm -rf sub |
|
818 | $ rm -rf sub | |
812 | $ hg init main |
|
819 | $ hg init main | |
813 | $ cd main |
|
820 | $ cd main | |
814 | $ hg init s |
|
821 | $ hg init s | |
815 | $ cd s |
|
822 | $ cd s | |
816 | $ echo a > a |
|
823 | $ echo a > a | |
817 | $ hg ci -Am1 |
|
824 | $ hg ci -Am1 | |
818 | adding a |
|
825 | adding a | |
819 | $ hg branch br |
|
826 | $ hg branch br | |
820 | marked working directory as branch br |
|
827 | marked working directory as branch br | |
821 | (branches are permanent and global, did you want a bookmark?) |
|
828 | (branches are permanent and global, did you want a bookmark?) | |
822 | $ echo a >> a |
|
829 | $ echo a >> a | |
823 | $ hg ci -m1 |
|
830 | $ hg ci -m1 | |
824 | $ hg up default |
|
831 | $ hg up default | |
825 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
832 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
826 | $ echo b > b |
|
833 | $ echo b > b | |
827 | $ hg ci -Am1 |
|
834 | $ hg ci -Am1 | |
828 | adding b |
|
835 | adding b | |
829 | $ hg up br |
|
836 | $ hg up br | |
830 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
837 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
831 | $ hg merge tip |
|
838 | $ hg merge tip | |
832 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
839 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
833 | (branch merge, don't forget to commit) |
|
840 | (branch merge, don't forget to commit) | |
834 | $ hg ci -m1 |
|
841 | $ hg ci -m1 | |
835 | $ hg up 2 |
|
842 | $ hg up 2 | |
836 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
843 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
837 | $ echo c > c |
|
844 | $ echo c > c | |
838 | $ hg ci -Am1 |
|
845 | $ hg ci -Am1 | |
839 | adding c |
|
846 | adding c | |
840 | $ hg up 3 |
|
847 | $ hg up 3 | |
841 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
848 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
842 | $ hg merge 4 |
|
849 | $ hg merge 4 | |
843 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
850 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
844 | (branch merge, don't forget to commit) |
|
851 | (branch merge, don't forget to commit) | |
845 | $ hg ci -m1 |
|
852 | $ hg ci -m1 | |
846 |
|
853 | |||
847 | # main repo layout: |
|
854 | # main repo layout: | |
848 | # |
|
855 | # | |
849 | # * <-- try to merge default into br again |
|
856 | # * <-- try to merge default into br again | |
850 | # .`| |
|
857 | # .`| | |
851 | # . o 5 br --> substate = 5 |
|
858 | # . o 5 br --> substate = 5 | |
852 | # . | |
|
859 | # . | | |
853 | # o | 4 default --> substate = 4 |
|
860 | # o | 4 default --> substate = 4 | |
854 | # | | |
|
861 | # | | | |
855 | # | o 3 br --> substate = 2 |
|
862 | # | o 3 br --> substate = 2 | |
856 | # |/| |
|
863 | # |/| | |
857 | # o | 2 default --> substate = 2 |
|
864 | # o | 2 default --> substate = 2 | |
858 | # | | |
|
865 | # | | | |
859 | # | o 1 br --> substate = 3 |
|
866 | # | o 1 br --> substate = 3 | |
860 | # |/ |
|
867 | # |/ | |
861 | # o 0 default --> substate = 2 |
|
868 | # o 0 default --> substate = 2 | |
862 |
|
869 | |||
863 | $ cd .. |
|
870 | $ cd .. | |
864 | $ echo 's = s' > .hgsub |
|
871 | $ echo 's = s' > .hgsub | |
865 | $ hg -R s up 2 |
|
872 | $ hg -R s up 2 | |
866 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
873 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
867 | $ hg ci -Am1 |
|
874 | $ hg ci -Am1 | |
868 | adding .hgsub |
|
875 | adding .hgsub | |
869 | $ hg branch br |
|
876 | $ hg branch br | |
870 | marked working directory as branch br |
|
877 | marked working directory as branch br | |
871 | (branches are permanent and global, did you want a bookmark?) |
|
878 | (branches are permanent and global, did you want a bookmark?) | |
872 | $ echo b > b |
|
879 | $ echo b > b | |
873 | $ hg -R s up 3 |
|
880 | $ hg -R s up 3 | |
874 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
881 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
875 | $ hg ci -Am1 |
|
882 | $ hg ci -Am1 | |
876 | adding b |
|
883 | adding b | |
877 | $ hg up default |
|
884 | $ hg up default | |
878 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
885 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
879 | $ echo c > c |
|
886 | $ echo c > c | |
880 | $ hg ci -Am1 |
|
887 | $ hg ci -Am1 | |
881 | adding c |
|
888 | adding c | |
882 | $ hg up 1 |
|
889 | $ hg up 1 | |
883 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
890 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
884 | $ hg merge 2 |
|
891 | $ hg merge 2 | |
885 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
892 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
886 | (branch merge, don't forget to commit) |
|
893 | (branch merge, don't forget to commit) | |
887 | $ hg ci -m1 |
|
894 | $ hg ci -m1 | |
888 | $ hg up 2 |
|
895 | $ hg up 2 | |
889 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
896 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
890 | $ hg -R s up 4 |
|
897 | $ hg -R s up 4 | |
891 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
898 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
892 | $ echo d > d |
|
899 | $ echo d > d | |
893 | $ hg ci -Am1 |
|
900 | $ hg ci -Am1 | |
894 | adding d |
|
901 | adding d | |
895 | $ hg up 3 |
|
902 | $ hg up 3 | |
896 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
903 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
897 | $ hg -R s up 5 |
|
904 | $ hg -R s up 5 | |
898 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
905 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
899 | $ echo e > e |
|
906 | $ echo e > e | |
900 | $ hg ci -Am1 |
|
907 | $ hg ci -Am1 | |
901 | adding e |
|
908 | adding e | |
902 |
|
909 | |||
903 | $ hg up 5 |
|
910 | $ hg up 5 | |
904 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
911 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
905 | $ hg merge 4 # try to merge default into br again |
|
912 | $ hg merge 4 # try to merge default into br again | |
906 | subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88) |
|
913 | subrepository s diverged (local revision: f8f13b33206e, remote revision: a3f9062a4f88) | |
907 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m |
|
914 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [merge rev]? m | |
908 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
915 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
909 | (branch merge, don't forget to commit) |
|
916 | (branch merge, don't forget to commit) | |
910 | $ cd .. |
|
917 | $ cd .. | |
911 |
|
918 | |||
912 | test subrepo delete from .hgsubstate |
|
919 | test subrepo delete from .hgsubstate | |
913 |
|
920 | |||
914 | $ hg init testdelete |
|
921 | $ hg init testdelete | |
915 | $ mkdir testdelete/nested testdelete/nested2 |
|
922 | $ mkdir testdelete/nested testdelete/nested2 | |
916 | $ hg init testdelete/nested |
|
923 | $ hg init testdelete/nested | |
917 | $ hg init testdelete/nested2 |
|
924 | $ hg init testdelete/nested2 | |
918 | $ echo test > testdelete/nested/foo |
|
925 | $ echo test > testdelete/nested/foo | |
919 | $ echo test > testdelete/nested2/foo |
|
926 | $ echo test > testdelete/nested2/foo | |
920 | $ hg -R testdelete/nested add |
|
927 | $ hg -R testdelete/nested add | |
921 | adding testdelete/nested/foo |
|
928 | adding testdelete/nested/foo | |
922 | $ hg -R testdelete/nested2 add |
|
929 | $ hg -R testdelete/nested2 add | |
923 | adding testdelete/nested2/foo |
|
930 | adding testdelete/nested2/foo | |
924 | $ hg -R testdelete/nested ci -m test |
|
931 | $ hg -R testdelete/nested ci -m test | |
925 | $ hg -R testdelete/nested2 ci -m test |
|
932 | $ hg -R testdelete/nested2 ci -m test | |
926 | $ echo nested = nested > testdelete/.hgsub |
|
933 | $ echo nested = nested > testdelete/.hgsub | |
927 | $ echo nested2 = nested2 >> testdelete/.hgsub |
|
934 | $ echo nested2 = nested2 >> testdelete/.hgsub | |
928 | $ hg -R testdelete add |
|
935 | $ hg -R testdelete add | |
929 | adding testdelete/.hgsub |
|
936 | adding testdelete/.hgsub | |
930 | $ hg -R testdelete ci -m "nested 1 & 2 added" |
|
937 | $ hg -R testdelete ci -m "nested 1 & 2 added" | |
931 | $ echo nested = nested > testdelete/.hgsub |
|
938 | $ echo nested = nested > testdelete/.hgsub | |
932 | $ hg -R testdelete ci -m "nested 2 deleted" |
|
939 | $ hg -R testdelete ci -m "nested 2 deleted" | |
933 | $ cat testdelete/.hgsubstate |
|
940 | $ cat testdelete/.hgsubstate | |
934 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
941 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
935 | $ hg -R testdelete remove testdelete/.hgsub |
|
942 | $ hg -R testdelete remove testdelete/.hgsub | |
936 | $ hg -R testdelete ci -m ".hgsub deleted" |
|
943 | $ hg -R testdelete ci -m ".hgsub deleted" | |
937 | $ cat testdelete/.hgsubstate |
|
944 | $ cat testdelete/.hgsubstate | |
938 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
945 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
939 |
|
946 | |||
940 | test repository cloning |
|
947 | test repository cloning | |
941 |
|
948 | |||
942 | $ mkdir mercurial mercurial2 |
|
949 | $ mkdir mercurial mercurial2 | |
943 | $ hg init nested_absolute |
|
950 | $ hg init nested_absolute | |
944 | $ echo test > nested_absolute/foo |
|
951 | $ echo test > nested_absolute/foo | |
945 | $ hg -R nested_absolute add |
|
952 | $ hg -R nested_absolute add | |
946 | adding nested_absolute/foo |
|
953 | adding nested_absolute/foo | |
947 | $ hg -R nested_absolute ci -mtest |
|
954 | $ hg -R nested_absolute ci -mtest | |
948 | $ cd mercurial |
|
955 | $ cd mercurial | |
949 | $ hg init nested_relative |
|
956 | $ hg init nested_relative | |
950 | $ echo test2 > nested_relative/foo2 |
|
957 | $ echo test2 > nested_relative/foo2 | |
951 | $ hg -R nested_relative add |
|
958 | $ hg -R nested_relative add | |
952 | adding nested_relative/foo2 |
|
959 | adding nested_relative/foo2 | |
953 | $ hg -R nested_relative ci -mtest2 |
|
960 | $ hg -R nested_relative ci -mtest2 | |
954 | $ hg init main |
|
961 | $ hg init main | |
955 | $ echo "nested_relative = ../nested_relative" > main/.hgsub |
|
962 | $ echo "nested_relative = ../nested_relative" > main/.hgsub | |
956 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
|
963 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub | |
957 | $ hg -R main add |
|
964 | $ hg -R main add | |
958 | adding main/.hgsub |
|
965 | adding main/.hgsub | |
959 | $ hg -R main ci -m "add subrepos" |
|
966 | $ hg -R main ci -m "add subrepos" | |
960 | $ cd .. |
|
967 | $ cd .. | |
961 | $ hg clone mercurial/main mercurial2/main |
|
968 | $ hg clone mercurial/main mercurial2/main | |
962 | updating to branch default |
|
969 | updating to branch default | |
963 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
970 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
964 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ |
|
971 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ | |
965 | > mercurial2/main/nested_relative/.hg/hgrc |
|
972 | > mercurial2/main/nested_relative/.hg/hgrc | |
966 | [paths] |
|
973 | [paths] | |
967 | default = $TESTTMP/mercurial/nested_absolute |
|
974 | default = $TESTTMP/mercurial/nested_absolute | |
968 | [paths] |
|
975 | [paths] | |
969 | default = $TESTTMP/mercurial/nested_relative |
|
976 | default = $TESTTMP/mercurial/nested_relative | |
970 | $ rm -rf mercurial mercurial2 |
|
977 | $ rm -rf mercurial mercurial2 | |
971 |
|
978 | |||
972 | Issue1977: multirepo push should fail if subrepo push fails |
|
979 | Issue1977: multirepo push should fail if subrepo push fails | |
973 |
|
980 | |||
974 | $ hg init repo |
|
981 | $ hg init repo | |
975 | $ hg init repo/s |
|
982 | $ hg init repo/s | |
976 | $ echo a > repo/s/a |
|
983 | $ echo a > repo/s/a | |
977 | $ hg -R repo/s ci -Am0 |
|
984 | $ hg -R repo/s ci -Am0 | |
978 | adding a |
|
985 | adding a | |
979 | $ echo s = s > repo/.hgsub |
|
986 | $ echo s = s > repo/.hgsub | |
980 | $ hg -R repo ci -Am1 |
|
987 | $ hg -R repo ci -Am1 | |
981 | adding .hgsub |
|
988 | adding .hgsub | |
982 | $ hg clone repo repo2 |
|
989 | $ hg clone repo repo2 | |
983 | updating to branch default |
|
990 | updating to branch default | |
984 | cloning subrepo s from $TESTTMP/repo/s |
|
991 | cloning subrepo s from $TESTTMP/repo/s | |
985 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
992 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
986 | $ hg -q -R repo2 pull -u |
|
993 | $ hg -q -R repo2 pull -u | |
987 | $ echo 1 > repo2/s/a |
|
994 | $ echo 1 > repo2/s/a | |
988 | $ hg -R repo2/s ci -m2 |
|
995 | $ hg -R repo2/s ci -m2 | |
989 | $ hg -q -R repo2/s push |
|
996 | $ hg -q -R repo2/s push | |
990 | $ hg -R repo2/s up -C 0 |
|
997 | $ hg -R repo2/s up -C 0 | |
991 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
998 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
992 | $ echo 2 > repo2/s/b |
|
999 | $ echo 2 > repo2/s/b | |
993 | $ hg -R repo2/s ci -m3 -A |
|
1000 | $ hg -R repo2/s ci -m3 -A | |
994 | adding b |
|
1001 | adding b | |
995 | created new head |
|
1002 | created new head | |
996 | $ hg -R repo2 ci -m3 |
|
1003 | $ hg -R repo2 ci -m3 | |
997 | $ hg -q -R repo2 push |
|
1004 | $ hg -q -R repo2 push | |
998 | abort: push creates new remote head cc505f09a8b2! (in subrepository "s") |
|
1005 | abort: push creates new remote head cc505f09a8b2! (in subrepository "s") | |
999 | (merge or see 'hg help push' for details about pushing new heads) |
|
1006 | (merge or see 'hg help push' for details about pushing new heads) | |
1000 | [255] |
|
1007 | [255] | |
1001 | $ hg -R repo update |
|
1008 | $ hg -R repo update | |
1002 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1009 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1003 |
|
1010 | |||
1004 | test if untracked file is not overwritten |
|
1011 | test if untracked file is not overwritten | |
1005 |
|
1012 | |||
1006 | (this also tests that updated .hgsubstate is treated as "modified", |
|
1013 | (this also tests that updated .hgsubstate is treated as "modified", | |
1007 | when 'merge.update()' is aborted before 'merge.recordupdates()', even |
|
1014 | when 'merge.update()' is aborted before 'merge.recordupdates()', even | |
1008 | if none of mode, size and timestamp of it isn't changed on the |
|
1015 | if none of mode, size and timestamp of it isn't changed on the | |
1009 | filesystem (see also issue4583)) |
|
1016 | filesystem (see also issue4583)) | |
1010 |
|
1017 | |||
1011 | $ echo issue3276_ok > repo/s/b |
|
1018 | $ echo issue3276_ok > repo/s/b | |
1012 | $ hg -R repo2 push -f -q |
|
1019 | $ hg -R repo2 push -f -q | |
1013 | $ touch -t 200001010000 repo/.hgsubstate |
|
1020 | $ touch -t 200001010000 repo/.hgsubstate | |
1014 |
|
1021 | |||
1015 | $ cat >> repo/.hg/hgrc <<EOF |
|
1022 | $ cat >> repo/.hg/hgrc <<EOF | |
1016 | > [fakedirstatewritetime] |
|
1023 | > [fakedirstatewritetime] | |
1017 | > # emulate invoking dirstate.write() via repo.status() |
|
1024 | > # emulate invoking dirstate.write() via repo.status() | |
1018 | > # at 2000-01-01 00:00 |
|
1025 | > # at 2000-01-01 00:00 | |
1019 | > fakenow = 200001010000 |
|
1026 | > fakenow = 200001010000 | |
1020 | > |
|
1027 | > | |
1021 | > [extensions] |
|
1028 | > [extensions] | |
1022 | > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py |
|
1029 | > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py | |
1023 | > EOF |
|
1030 | > EOF | |
1024 | $ hg -R repo update |
|
1031 | $ hg -R repo update | |
1025 | b: untracked file differs |
|
1032 | b: untracked file differs | |
1026 | abort: untracked files in working directory differ from files in requested revision (in subrepository "s") |
|
1033 | abort: untracked files in working directory differ from files in requested revision (in subrepository "s") | |
1027 | [255] |
|
1034 | [255] | |
1028 | $ cat >> repo/.hg/hgrc <<EOF |
|
1035 | $ cat >> repo/.hg/hgrc <<EOF | |
1029 | > [extensions] |
|
1036 | > [extensions] | |
1030 | > fakedirstatewritetime = ! |
|
1037 | > fakedirstatewritetime = ! | |
1031 | > EOF |
|
1038 | > EOF | |
1032 |
|
1039 | |||
1033 | $ cat repo/s/b |
|
1040 | $ cat repo/s/b | |
1034 | issue3276_ok |
|
1041 | issue3276_ok | |
1035 | $ rm repo/s/b |
|
1042 | $ rm repo/s/b | |
1036 | $ touch -t 200001010000 repo/.hgsubstate |
|
1043 | $ touch -t 200001010000 repo/.hgsubstate | |
1037 | $ hg -R repo revert --all |
|
1044 | $ hg -R repo revert --all | |
1038 | reverting repo/.hgsubstate |
|
1045 | reverting repo/.hgsubstate | |
1039 | reverting subrepo s |
|
1046 | reverting subrepo s | |
1040 | $ hg -R repo update |
|
1047 | $ hg -R repo update | |
1041 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1048 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1042 | $ cat repo/s/b |
|
1049 | $ cat repo/s/b | |
1043 | 2 |
|
1050 | 2 | |
1044 | $ rm -rf repo2 repo |
|
1051 | $ rm -rf repo2 repo | |
1045 |
|
1052 | |||
1046 |
|
1053 | |||
1047 | Issue1852 subrepos with relative paths always push/pull relative to default |
|
1054 | Issue1852 subrepos with relative paths always push/pull relative to default | |
1048 |
|
1055 | |||
1049 | Prepare a repo with subrepo |
|
1056 | Prepare a repo with subrepo | |
1050 |
|
1057 | |||
1051 | $ hg init issue1852a |
|
1058 | $ hg init issue1852a | |
1052 | $ cd issue1852a |
|
1059 | $ cd issue1852a | |
1053 | $ hg init sub/repo |
|
1060 | $ hg init sub/repo | |
1054 | $ echo test > sub/repo/foo |
|
1061 | $ echo test > sub/repo/foo | |
1055 | $ hg -R sub/repo add sub/repo/foo |
|
1062 | $ hg -R sub/repo add sub/repo/foo | |
1056 | $ echo sub/repo = sub/repo > .hgsub |
|
1063 | $ echo sub/repo = sub/repo > .hgsub | |
1057 | $ hg add .hgsub |
|
1064 | $ hg add .hgsub | |
1058 | $ hg ci -mtest |
|
1065 | $ hg ci -mtest | |
1059 | committing subrepository sub/repo |
|
1066 | committing subrepository sub/repo | |
1060 | $ echo test >> sub/repo/foo |
|
1067 | $ echo test >> sub/repo/foo | |
1061 | $ hg ci -mtest |
|
1068 | $ hg ci -mtest | |
1062 | committing subrepository sub/repo |
|
1069 | committing subrepository sub/repo | |
1063 | $ hg cat sub/repo/foo |
|
1070 | $ hg cat sub/repo/foo | |
1064 | test |
|
1071 | test | |
1065 | test |
|
1072 | test | |
1066 | $ hg cat sub/repo/foo -Tjson | sed 's|\\\\|/|g' |
|
1073 | $ hg cat sub/repo/foo -Tjson | sed 's|\\\\|/|g' | |
1067 | [ |
|
1074 | [ | |
1068 | { |
|
1075 | { | |
1069 | "data": "test\ntest\n", |
|
1076 | "data": "test\ntest\n", | |
1070 | "path": "foo" |
|
1077 | "path": "foo" | |
1071 | } |
|
1078 | } | |
1072 | ] |
|
1079 | ] | |
1073 |
|
1080 | |||
1074 | non-exact match: |
|
1081 | non-exact match: | |
1075 |
|
1082 | |||
1076 | $ hg cat -T '{path|relpath}\n' 'glob:**' |
|
1083 | $ hg cat -T '{path|relpath}\n' 'glob:**' | |
1077 | .hgsub |
|
1084 | .hgsub | |
1078 | .hgsubstate |
|
1085 | .hgsubstate | |
1079 | sub/repo/foo |
|
1086 | sub/repo/foo | |
1080 | $ hg cat -T '{path|relpath}\n' 're:^sub' |
|
1087 | $ hg cat -T '{path|relpath}\n' 're:^sub' | |
1081 | sub/repo/foo |
|
1088 | sub/repo/foo | |
1082 |
|
1089 | |||
1083 | missing subrepos in working directory: |
|
1090 | missing subrepos in working directory: | |
1084 |
|
1091 | |||
1085 | $ mkdir -p tmp/sub/repo |
|
1092 | $ mkdir -p tmp/sub/repo | |
1086 | $ hg cat -r 0 --output tmp/%p_p sub/repo/foo |
|
1093 | $ hg cat -r 0 --output tmp/%p_p sub/repo/foo | |
1087 | $ cat tmp/sub/repo/foo_p |
|
1094 | $ cat tmp/sub/repo/foo_p | |
1088 | test |
|
1095 | test | |
1089 | $ mv sub/repo sub_ |
|
1096 | $ mv sub/repo sub_ | |
1090 | $ hg cat sub/repo/baz |
|
1097 | $ hg cat sub/repo/baz | |
1091 | skipping missing subrepository: sub/repo |
|
1098 | skipping missing subrepository: sub/repo | |
1092 | [1] |
|
1099 | [1] | |
1093 | $ rm -rf sub/repo |
|
1100 | $ rm -rf sub/repo | |
1094 | $ mv sub_ sub/repo |
|
1101 | $ mv sub_ sub/repo | |
1095 | $ cd .. |
|
1102 | $ cd .. | |
1096 |
|
1103 | |||
1097 | Create repo without default path, pull top repo, and see what happens on update |
|
1104 | Create repo without default path, pull top repo, and see what happens on update | |
1098 |
|
1105 | |||
1099 | $ hg init issue1852b |
|
1106 | $ hg init issue1852b | |
1100 | $ hg -R issue1852b pull issue1852a |
|
1107 | $ hg -R issue1852b pull issue1852a | |
1101 | pulling from issue1852a |
|
1108 | pulling from issue1852a | |
1102 | requesting all changes |
|
1109 | requesting all changes | |
1103 | adding changesets |
|
1110 | adding changesets | |
1104 | adding manifests |
|
1111 | adding manifests | |
1105 | adding file changes |
|
1112 | adding file changes | |
1106 | added 2 changesets with 3 changes to 2 files |
|
1113 | added 2 changesets with 3 changes to 2 files | |
1107 | new changesets 19487b456929:be5eb94e7215 |
|
1114 | new changesets 19487b456929:be5eb94e7215 | |
1108 | (run 'hg update' to get a working copy) |
|
1115 | (run 'hg update' to get a working copy) | |
1109 | $ hg -R issue1852b update |
|
1116 | $ hg -R issue1852b update | |
1110 | abort: default path for subrepository not found (in subrepository "sub/repo") |
|
1117 | abort: default path for subrepository not found (in subrepository "sub/repo") | |
1111 | [255] |
|
1118 | [255] | |
1112 |
|
1119 | |||
1113 | Ensure a full traceback, not just the SubrepoAbort part |
|
1120 | Ensure a full traceback, not just the SubrepoAbort part | |
1114 |
|
1121 | |||
1115 | $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort' |
|
1122 | $ hg -R issue1852b update --traceback 2>&1 | grep 'raise error\.Abort' | |
1116 | raise error.Abort(_("default path for subrepository not found")) |
|
1123 | raise error.Abort(_("default path for subrepository not found")) | |
1117 |
|
1124 | |||
1118 | Pull -u now doesn't help |
|
1125 | Pull -u now doesn't help | |
1119 |
|
1126 | |||
1120 | $ hg -R issue1852b pull -u issue1852a |
|
1127 | $ hg -R issue1852b pull -u issue1852a | |
1121 | pulling from issue1852a |
|
1128 | pulling from issue1852a | |
1122 | searching for changes |
|
1129 | searching for changes | |
1123 | no changes found |
|
1130 | no changes found | |
1124 |
|
1131 | |||
1125 | Try the same, but with pull -u |
|
1132 | Try the same, but with pull -u | |
1126 |
|
1133 | |||
1127 | $ hg init issue1852c |
|
1134 | $ hg init issue1852c | |
1128 | $ hg -R issue1852c pull -r0 -u issue1852a |
|
1135 | $ hg -R issue1852c pull -r0 -u issue1852a | |
1129 | pulling from issue1852a |
|
1136 | pulling from issue1852a | |
1130 | adding changesets |
|
1137 | adding changesets | |
1131 | adding manifests |
|
1138 | adding manifests | |
1132 | adding file changes |
|
1139 | adding file changes | |
1133 | added 1 changesets with 2 changes to 2 files |
|
1140 | added 1 changesets with 2 changes to 2 files | |
1134 | new changesets 19487b456929 |
|
1141 | new changesets 19487b456929 | |
1135 | cloning subrepo sub/repo from issue1852a/sub/repo |
|
1142 | cloning subrepo sub/repo from issue1852a/sub/repo | |
1136 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1143 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1137 |
|
1144 | |||
1138 | Try to push from the other side |
|
1145 | Try to push from the other side | |
1139 |
|
1146 | |||
1140 | $ hg -R issue1852a push `pwd`/issue1852c |
|
1147 | $ hg -R issue1852a push `pwd`/issue1852c | |
1141 | pushing to $TESTTMP/issue1852c |
|
1148 | pushing to $TESTTMP/issue1852c | |
1142 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo |
|
1149 | pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo | |
1143 | searching for changes |
|
1150 | searching for changes | |
1144 | no changes found |
|
1151 | no changes found | |
1145 | searching for changes |
|
1152 | searching for changes | |
1146 | adding changesets |
|
1153 | adding changesets | |
1147 | adding manifests |
|
1154 | adding manifests | |
1148 | adding file changes |
|
1155 | adding file changes | |
1149 | added 1 changesets with 1 changes to 1 files |
|
1156 | added 1 changesets with 1 changes to 1 files | |
1150 |
|
1157 | |||
1151 | Incoming and outgoing should not use the default path: |
|
1158 | Incoming and outgoing should not use the default path: | |
1152 |
|
1159 | |||
1153 | $ hg clone -q issue1852a issue1852d |
|
1160 | $ hg clone -q issue1852a issue1852d | |
1154 | $ hg -R issue1852d outgoing --subrepos issue1852c |
|
1161 | $ hg -R issue1852d outgoing --subrepos issue1852c | |
1155 | comparing with issue1852c |
|
1162 | comparing with issue1852c | |
1156 | searching for changes |
|
1163 | searching for changes | |
1157 | no changes found |
|
1164 | no changes found | |
1158 | comparing with issue1852c/sub/repo |
|
1165 | comparing with issue1852c/sub/repo | |
1159 | searching for changes |
|
1166 | searching for changes | |
1160 | no changes found |
|
1167 | no changes found | |
1161 | [1] |
|
1168 | [1] | |
1162 | $ hg -R issue1852d incoming --subrepos issue1852c |
|
1169 | $ hg -R issue1852d incoming --subrepos issue1852c | |
1163 | comparing with issue1852c |
|
1170 | comparing with issue1852c | |
1164 | searching for changes |
|
1171 | searching for changes | |
1165 | no changes found |
|
1172 | no changes found | |
1166 | comparing with issue1852c/sub/repo |
|
1173 | comparing with issue1852c/sub/repo | |
1167 | searching for changes |
|
1174 | searching for changes | |
1168 | no changes found |
|
1175 | no changes found | |
1169 | [1] |
|
1176 | [1] | |
1170 |
|
1177 | |||
1171 | Check that merge of a new subrepo doesn't write the uncommitted state to |
|
1178 | Check that merge of a new subrepo doesn't write the uncommitted state to | |
1172 | .hgsubstate (issue4622) |
|
1179 | .hgsubstate (issue4622) | |
1173 |
|
1180 | |||
1174 | $ hg init issue1852a/addedsub |
|
1181 | $ hg init issue1852a/addedsub | |
1175 | $ echo zzz > issue1852a/addedsub/zz.txt |
|
1182 | $ echo zzz > issue1852a/addedsub/zz.txt | |
1176 | $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ" |
|
1183 | $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ" | |
1177 |
|
1184 | |||
1178 | $ hg clone issue1852a/addedsub issue1852d/addedsub |
|
1185 | $ hg clone issue1852a/addedsub issue1852d/addedsub | |
1179 | updating to branch default |
|
1186 | updating to branch default | |
1180 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1187 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1181 |
|
1188 | |||
1182 | $ echo def > issue1852a/sub/repo/foo |
|
1189 | $ echo def > issue1852a/sub/repo/foo | |
1183 | $ hg -R issue1852a ci -SAm 'tweaked subrepo' |
|
1190 | $ hg -R issue1852a ci -SAm 'tweaked subrepo' | |
1184 | adding tmp/sub/repo/foo_p |
|
1191 | adding tmp/sub/repo/foo_p | |
1185 | committing subrepository sub/repo |
|
1192 | committing subrepository sub/repo | |
1186 |
|
1193 | |||
1187 | $ echo 'addedsub = addedsub' >> issue1852d/.hgsub |
|
1194 | $ echo 'addedsub = addedsub' >> issue1852d/.hgsub | |
1188 | $ echo xyz > issue1852d/sub/repo/foo |
|
1195 | $ echo xyz > issue1852d/sub/repo/foo | |
1189 | $ hg -R issue1852d pull -u |
|
1196 | $ hg -R issue1852d pull -u | |
1190 | pulling from $TESTTMP/issue1852a |
|
1197 | pulling from $TESTTMP/issue1852a | |
1191 | searching for changes |
|
1198 | searching for changes | |
1192 | adding changesets |
|
1199 | adding changesets | |
1193 | adding manifests |
|
1200 | adding manifests | |
1194 | adding file changes |
|
1201 | adding file changes | |
1195 | added 1 changesets with 2 changes to 2 files |
|
1202 | added 1 changesets with 2 changes to 2 files | |
1196 | new changesets c82b79fdcc5b |
|
1203 | new changesets c82b79fdcc5b | |
1197 | subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c) |
|
1204 | subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c) | |
1198 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1205 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1199 | pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo |
|
1206 | pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo | |
1200 | searching for changes |
|
1207 | searching for changes | |
1201 | adding changesets |
|
1208 | adding changesets | |
1202 | adding manifests |
|
1209 | adding manifests | |
1203 | adding file changes |
|
1210 | adding file changes | |
1204 | added 1 changesets with 1 changes to 1 files |
|
1211 | added 1 changesets with 1 changes to 1 files | |
1205 | new changesets 46cd4aac504c |
|
1212 | new changesets 46cd4aac504c | |
1206 | subrepository sources for sub/repo differ |
|
1213 | subrepository sources for sub/repo differ | |
1207 | use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l |
|
1214 | use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l | |
1208 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1215 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1209 | $ cat issue1852d/.hgsubstate |
|
1216 | $ cat issue1852d/.hgsubstate | |
1210 | f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo |
|
1217 | f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo | |
1211 |
|
1218 | |||
1212 | Check status of files when none of them belong to the first |
|
1219 | Check status of files when none of them belong to the first | |
1213 | subrepository: |
|
1220 | subrepository: | |
1214 |
|
1221 | |||
1215 | $ hg init subrepo-status |
|
1222 | $ hg init subrepo-status | |
1216 | $ cd subrepo-status |
|
1223 | $ cd subrepo-status | |
1217 | $ hg init subrepo-1 |
|
1224 | $ hg init subrepo-1 | |
1218 | $ hg init subrepo-2 |
|
1225 | $ hg init subrepo-2 | |
1219 | $ cd subrepo-2 |
|
1226 | $ cd subrepo-2 | |
1220 | $ touch file |
|
1227 | $ touch file | |
1221 | $ hg add file |
|
1228 | $ hg add file | |
1222 | $ cd .. |
|
1229 | $ cd .. | |
1223 | $ echo subrepo-1 = subrepo-1 > .hgsub |
|
1230 | $ echo subrepo-1 = subrepo-1 > .hgsub | |
1224 | $ echo subrepo-2 = subrepo-2 >> .hgsub |
|
1231 | $ echo subrepo-2 = subrepo-2 >> .hgsub | |
1225 | $ hg add .hgsub |
|
1232 | $ hg add .hgsub | |
1226 | $ hg ci -m 'Added subrepos' |
|
1233 | $ hg ci -m 'Added subrepos' | |
1227 | committing subrepository subrepo-2 |
|
1234 | committing subrepository subrepo-2 | |
1228 | $ hg st subrepo-2/file |
|
1235 | $ hg st subrepo-2/file | |
1229 |
|
1236 | |||
1230 | Check that share works with subrepo |
|
1237 | Check that share works with subrepo | |
1231 | $ hg --config extensions.share= share . ../shared |
|
1238 | $ hg --config extensions.share= share . ../shared | |
1232 | updating working directory |
|
1239 | updating working directory | |
1233 | sharing subrepo subrepo-1 from $TESTTMP/subrepo-status/subrepo-1 |
|
1240 | sharing subrepo subrepo-1 from $TESTTMP/subrepo-status/subrepo-1 | |
1234 | sharing subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 |
|
1241 | sharing subrepo subrepo-2 from $TESTTMP/subrepo-status/subrepo-2 | |
1235 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1242 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1236 | $ find ../shared/* | sort |
|
1243 | $ find ../shared/* | sort | |
1237 | ../shared/subrepo-1 |
|
1244 | ../shared/subrepo-1 | |
1238 | ../shared/subrepo-1/.hg |
|
1245 | ../shared/subrepo-1/.hg | |
1239 | ../shared/subrepo-1/.hg/cache |
|
1246 | ../shared/subrepo-1/.hg/cache | |
1240 | ../shared/subrepo-1/.hg/cache/storehash |
|
1247 | ../shared/subrepo-1/.hg/cache/storehash | |
1241 | ../shared/subrepo-1/.hg/cache/storehash/* (glob) |
|
1248 | ../shared/subrepo-1/.hg/cache/storehash/* (glob) | |
1242 | ../shared/subrepo-1/.hg/hgrc |
|
1249 | ../shared/subrepo-1/.hg/hgrc | |
1243 | ../shared/subrepo-1/.hg/requires |
|
1250 | ../shared/subrepo-1/.hg/requires | |
1244 | ../shared/subrepo-1/.hg/sharedpath |
|
1251 | ../shared/subrepo-1/.hg/sharedpath | |
1245 | ../shared/subrepo-1/.hg/wcache |
|
1252 | ../shared/subrepo-1/.hg/wcache | |
1246 | ../shared/subrepo-2 |
|
1253 | ../shared/subrepo-2 | |
1247 | ../shared/subrepo-2/.hg |
|
1254 | ../shared/subrepo-2/.hg | |
1248 | ../shared/subrepo-2/.hg/branch |
|
1255 | ../shared/subrepo-2/.hg/branch | |
1249 | ../shared/subrepo-2/.hg/cache |
|
1256 | ../shared/subrepo-2/.hg/cache | |
1250 | ../shared/subrepo-2/.hg/cache/storehash |
|
1257 | ../shared/subrepo-2/.hg/cache/storehash | |
1251 | ../shared/subrepo-2/.hg/cache/storehash/* (glob) |
|
1258 | ../shared/subrepo-2/.hg/cache/storehash/* (glob) | |
1252 | ../shared/subrepo-2/.hg/dirstate |
|
1259 | ../shared/subrepo-2/.hg/dirstate | |
1253 | ../shared/subrepo-2/.hg/hgrc |
|
1260 | ../shared/subrepo-2/.hg/hgrc | |
1254 | ../shared/subrepo-2/.hg/requires |
|
1261 | ../shared/subrepo-2/.hg/requires | |
1255 | ../shared/subrepo-2/.hg/sharedpath |
|
1262 | ../shared/subrepo-2/.hg/sharedpath | |
1256 | ../shared/subrepo-2/.hg/wcache |
|
1263 | ../shared/subrepo-2/.hg/wcache | |
1257 | ../shared/subrepo-2/.hg/wcache/checkisexec (execbit !) |
|
1264 | ../shared/subrepo-2/.hg/wcache/checkisexec (execbit !) | |
1258 | ../shared/subrepo-2/.hg/wcache/checklink (symlink !) |
|
1265 | ../shared/subrepo-2/.hg/wcache/checklink (symlink !) | |
1259 | ../shared/subrepo-2/.hg/wcache/checklink-target (symlink !) |
|
1266 | ../shared/subrepo-2/.hg/wcache/checklink-target (symlink !) | |
1260 | ../shared/subrepo-2/file |
|
1267 | ../shared/subrepo-2/file | |
1261 | $ hg -R ../shared in |
|
1268 | $ hg -R ../shared in | |
1262 | abort: repository default not found! |
|
1269 | abort: repository default not found! | |
1263 | [255] |
|
1270 | [255] | |
1264 | $ hg -R ../shared/subrepo-2 showconfig paths |
|
1271 | $ hg -R ../shared/subrepo-2 showconfig paths | |
1265 | paths.default=$TESTTMP/subrepo-status/subrepo-2 |
|
1272 | paths.default=$TESTTMP/subrepo-status/subrepo-2 | |
1266 | $ hg -R ../shared/subrepo-1 sum --remote |
|
1273 | $ hg -R ../shared/subrepo-1 sum --remote | |
1267 | parent: -1:000000000000 tip (empty repository) |
|
1274 | parent: -1:000000000000 tip (empty repository) | |
1268 | branch: default |
|
1275 | branch: default | |
1269 | commit: (clean) |
|
1276 | commit: (clean) | |
1270 | update: (current) |
|
1277 | update: (current) | |
1271 | remote: (synced) |
|
1278 | remote: (synced) | |
1272 |
|
1279 | |||
1273 | Check hg update --clean |
|
1280 | Check hg update --clean | |
1274 | $ cd $TESTTMP/t |
|
1281 | $ cd $TESTTMP/t | |
1275 | $ rm -r t/t.orig |
|
1282 | $ rm -r t/t.orig | |
1276 | $ hg status -S --all |
|
1283 | $ hg status -S --all | |
1277 | C .hgsub |
|
1284 | C .hgsub | |
1278 | C .hgsubstate |
|
1285 | C .hgsubstate | |
1279 | C a |
|
1286 | C a | |
1280 | C s/.hgsub |
|
1287 | C s/.hgsub | |
1281 | C s/.hgsubstate |
|
1288 | C s/.hgsubstate | |
1282 | C s/a |
|
1289 | C s/a | |
1283 | C s/ss/a |
|
1290 | C s/ss/a | |
1284 | C t/t |
|
1291 | C t/t | |
1285 | $ echo c1 > s/a |
|
1292 | $ echo c1 > s/a | |
1286 | $ cd s |
|
1293 | $ cd s | |
1287 | $ echo c1 > b |
|
1294 | $ echo c1 > b | |
1288 | $ echo c1 > c |
|
1295 | $ echo c1 > c | |
1289 | $ hg add b |
|
1296 | $ hg add b | |
1290 | $ cd .. |
|
1297 | $ cd .. | |
1291 | $ hg status -S |
|
1298 | $ hg status -S | |
1292 | M s/a |
|
1299 | M s/a | |
1293 | A s/b |
|
1300 | A s/b | |
1294 | ? s/c |
|
1301 | ? s/c | |
1295 | $ hg update -C |
|
1302 | $ hg update -C | |
1296 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1303 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1297 | updated to "925c17564ef8: 13" |
|
1304 | updated to "925c17564ef8: 13" | |
1298 | 2 other heads for branch "default" |
|
1305 | 2 other heads for branch "default" | |
1299 | $ hg status -S |
|
1306 | $ hg status -S | |
1300 | ? s/b |
|
1307 | ? s/b | |
1301 | ? s/c |
|
1308 | ? s/c | |
1302 |
|
1309 | |||
1303 | Sticky subrepositories, no changes |
|
1310 | Sticky subrepositories, no changes | |
1304 | $ cd $TESTTMP/t |
|
1311 | $ cd $TESTTMP/t | |
1305 | $ hg id |
|
1312 | $ hg id | |
1306 | 925c17564ef8 tip |
|
1313 | 925c17564ef8 tip | |
1307 | $ hg -R s id |
|
1314 | $ hg -R s id | |
1308 | 12a213df6fa9 tip |
|
1315 | 12a213df6fa9 tip | |
1309 | $ hg -R t id |
|
1316 | $ hg -R t id | |
1310 | 52c0adc0515a tip |
|
1317 | 52c0adc0515a tip | |
1311 | $ hg update 11 |
|
1318 | $ hg update 11 | |
1312 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1319 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1313 | $ hg id |
|
1320 | $ hg id | |
1314 | 365661e5936a |
|
1321 | 365661e5936a | |
1315 | $ hg -R s id |
|
1322 | $ hg -R s id | |
1316 | fc627a69481f |
|
1323 | fc627a69481f | |
1317 | $ hg -R t id |
|
1324 | $ hg -R t id | |
1318 | e95bcfa18a35 |
|
1325 | e95bcfa18a35 | |
1319 |
|
1326 | |||
1320 | Sticky subrepositories, file changes |
|
1327 | Sticky subrepositories, file changes | |
1321 | $ touch s/f1 |
|
1328 | $ touch s/f1 | |
1322 | $ touch t/f1 |
|
1329 | $ touch t/f1 | |
1323 | $ hg add -S s/f1 |
|
1330 | $ hg add -S s/f1 | |
1324 | $ hg add -S t/f1 |
|
1331 | $ hg add -S t/f1 | |
1325 | $ hg id |
|
1332 | $ hg id | |
1326 | 365661e5936a+ |
|
1333 | 365661e5936a+ | |
1327 | $ hg -R s id |
|
1334 | $ hg -R s id | |
1328 | fc627a69481f+ |
|
1335 | fc627a69481f+ | |
1329 | $ hg -R t id |
|
1336 | $ hg -R t id | |
1330 | e95bcfa18a35+ |
|
1337 | e95bcfa18a35+ | |
1331 | $ hg update tip |
|
1338 | $ hg update tip | |
1332 | subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9) |
|
1339 | subrepository s diverged (local revision: fc627a69481f, remote revision: 12a213df6fa9) | |
1333 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1340 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1334 | subrepository sources for s differ |
|
1341 | subrepository sources for s differ | |
1335 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l |
|
1342 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? l | |
1336 | subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a) |
|
1343 | subrepository t diverged (local revision: e95bcfa18a35, remote revision: 52c0adc0515a) | |
1337 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1344 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1338 | subrepository sources for t differ |
|
1345 | subrepository sources for t differ | |
1339 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l |
|
1346 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? l | |
1340 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1347 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1341 | $ hg id |
|
1348 | $ hg id | |
1342 | 925c17564ef8+ tip |
|
1349 | 925c17564ef8+ tip | |
1343 | $ hg -R s id |
|
1350 | $ hg -R s id | |
1344 | fc627a69481f+ |
|
1351 | fc627a69481f+ | |
1345 | $ hg -R t id |
|
1352 | $ hg -R t id | |
1346 | e95bcfa18a35+ |
|
1353 | e95bcfa18a35+ | |
1347 | $ hg update --clean tip |
|
1354 | $ hg update --clean tip | |
1348 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1355 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1349 |
|
1356 | |||
1350 | Sticky subrepository, revision updates |
|
1357 | Sticky subrepository, revision updates | |
1351 | $ hg id |
|
1358 | $ hg id | |
1352 | 925c17564ef8 tip |
|
1359 | 925c17564ef8 tip | |
1353 | $ hg -R s id |
|
1360 | $ hg -R s id | |
1354 | 12a213df6fa9 tip |
|
1361 | 12a213df6fa9 tip | |
1355 | $ hg -R t id |
|
1362 | $ hg -R t id | |
1356 | 52c0adc0515a tip |
|
1363 | 52c0adc0515a tip | |
1357 | $ cd s |
|
1364 | $ cd s | |
1358 | $ hg update -r -2 |
|
1365 | $ hg update -r -2 | |
1359 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1366 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1360 | $ cd ../t |
|
1367 | $ cd ../t | |
1361 | $ hg update -r 2 |
|
1368 | $ hg update -r 2 | |
1362 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1369 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1363 | $ cd .. |
|
1370 | $ cd .. | |
1364 | $ hg update 10 |
|
1371 | $ hg update 10 | |
1365 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1372 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) | |
1366 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1373 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1367 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c) |
|
1374 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 20a0db6fbf6c) | |
1368 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1375 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1369 | subrepository sources for t differ (in checked out version) |
|
1376 | subrepository sources for t differ (in checked out version) | |
1370 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l |
|
1377 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? l | |
1371 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1378 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1372 | $ hg id |
|
1379 | $ hg id | |
1373 | e45c8b14af55+ |
|
1380 | e45c8b14af55+ | |
1374 | $ hg -R s id |
|
1381 | $ hg -R s id | |
1375 | 02dcf1d70411 |
|
1382 | 02dcf1d70411 | |
1376 | $ hg -R t id |
|
1383 | $ hg -R t id | |
1377 | 7af322bc1198 |
|
1384 | 7af322bc1198 | |
1378 |
|
1385 | |||
1379 | Sticky subrepository, file changes and revision updates |
|
1386 | Sticky subrepository, file changes and revision updates | |
1380 | $ touch s/f1 |
|
1387 | $ touch s/f1 | |
1381 | $ touch t/f1 |
|
1388 | $ touch t/f1 | |
1382 | $ hg add -S s/f1 |
|
1389 | $ hg add -S s/f1 | |
1383 | $ hg add -S t/f1 |
|
1390 | $ hg add -S t/f1 | |
1384 | $ hg id |
|
1391 | $ hg id | |
1385 | e45c8b14af55+ |
|
1392 | e45c8b14af55+ | |
1386 | $ hg -R s id |
|
1393 | $ hg -R s id | |
1387 | 02dcf1d70411+ |
|
1394 | 02dcf1d70411+ | |
1388 | $ hg -R t id |
|
1395 | $ hg -R t id | |
1389 | 7af322bc1198+ |
|
1396 | 7af322bc1198+ | |
1390 | $ hg update tip |
|
1397 | $ hg update tip | |
1391 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9) |
|
1398 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: 12a213df6fa9) | |
1392 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1399 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1393 | subrepository sources for s differ |
|
1400 | subrepository sources for s differ | |
1394 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l |
|
1401 | use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)? l | |
1395 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a) |
|
1402 | subrepository t diverged (local revision: 52c0adc0515a, remote revision: 52c0adc0515a) | |
1396 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1403 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1397 | subrepository sources for t differ |
|
1404 | subrepository sources for t differ | |
1398 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l |
|
1405 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? l | |
1399 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1406 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1400 | $ hg id |
|
1407 | $ hg id | |
1401 | 925c17564ef8+ tip |
|
1408 | 925c17564ef8+ tip | |
1402 | $ hg -R s id |
|
1409 | $ hg -R s id | |
1403 | 02dcf1d70411+ |
|
1410 | 02dcf1d70411+ | |
1404 | $ hg -R t id |
|
1411 | $ hg -R t id | |
1405 | 7af322bc1198+ |
|
1412 | 7af322bc1198+ | |
1406 |
|
1413 | |||
1407 | Sticky repository, update --clean |
|
1414 | Sticky repository, update --clean | |
1408 | $ hg update --clean tip |
|
1415 | $ hg update --clean tip | |
1409 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1416 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1410 | $ hg id |
|
1417 | $ hg id | |
1411 | 925c17564ef8 tip |
|
1418 | 925c17564ef8 tip | |
1412 | $ hg -R s id |
|
1419 | $ hg -R s id | |
1413 | 12a213df6fa9 tip |
|
1420 | 12a213df6fa9 tip | |
1414 | $ hg -R t id |
|
1421 | $ hg -R t id | |
1415 | 52c0adc0515a tip |
|
1422 | 52c0adc0515a tip | |
1416 |
|
1423 | |||
1417 | Test subrepo already at intended revision: |
|
1424 | Test subrepo already at intended revision: | |
1418 | $ cd s |
|
1425 | $ cd s | |
1419 | $ hg update fc627a69481f |
|
1426 | $ hg update fc627a69481f | |
1420 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1427 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1421 | $ cd .. |
|
1428 | $ cd .. | |
1422 | $ hg update 11 |
|
1429 | $ hg update 11 | |
1423 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) |
|
1430 | subrepository s diverged (local revision: 12a213df6fa9, remote revision: fc627a69481f) | |
1424 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m |
|
1431 | (M)erge, keep (l)ocal [working copy] or keep (r)emote [destination]? m | |
1425 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1432 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1426 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1433 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1427 | $ hg id -n |
|
1434 | $ hg id -n | |
1428 | 11+ |
|
1435 | 11+ | |
1429 | $ hg -R s id |
|
1436 | $ hg -R s id | |
1430 | fc627a69481f |
|
1437 | fc627a69481f | |
1431 | $ hg -R t id |
|
1438 | $ hg -R t id | |
1432 | e95bcfa18a35 |
|
1439 | e95bcfa18a35 | |
1433 |
|
1440 | |||
1434 | Test that removing .hgsubstate doesn't break anything: |
|
1441 | Test that removing .hgsubstate doesn't break anything: | |
1435 |
|
1442 | |||
1436 | $ hg rm -f .hgsubstate |
|
1443 | $ hg rm -f .hgsubstate | |
1437 | $ hg ci -mrm |
|
1444 | $ hg ci -mrm | |
1438 | nothing changed |
|
1445 | nothing changed | |
1439 | [1] |
|
1446 | [1] | |
1440 | $ hg log -vr tip |
|
1447 | $ hg log -vr tip | |
1441 | changeset: 13:925c17564ef8 |
|
1448 | changeset: 13:925c17564ef8 | |
1442 | tag: tip |
|
1449 | tag: tip | |
1443 | user: test |
|
1450 | user: test | |
1444 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1451 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1445 | files: .hgsubstate |
|
1452 | files: .hgsubstate | |
1446 | description: |
|
1453 | description: | |
1447 | 13 |
|
1454 | 13 | |
1448 |
|
1455 | |||
1449 |
|
1456 | |||
1450 |
|
1457 | |||
1451 | Test that removing .hgsub removes .hgsubstate: |
|
1458 | Test that removing .hgsub removes .hgsubstate: | |
1452 |
|
1459 | |||
1453 | $ hg rm .hgsub |
|
1460 | $ hg rm .hgsub | |
1454 | $ hg ci -mrm2 |
|
1461 | $ hg ci -mrm2 | |
1455 | created new head |
|
1462 | created new head | |
1456 | $ hg log -vr tip |
|
1463 | $ hg log -vr tip | |
1457 | changeset: 14:2400bccd50af |
|
1464 | changeset: 14:2400bccd50af | |
1458 | tag: tip |
|
1465 | tag: tip | |
1459 | parent: 11:365661e5936a |
|
1466 | parent: 11:365661e5936a | |
1460 | user: test |
|
1467 | user: test | |
1461 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1468 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1462 | files: .hgsub .hgsubstate |
|
1469 | files: .hgsub .hgsubstate | |
1463 | description: |
|
1470 | description: | |
1464 | rm2 |
|
1471 | rm2 | |
1465 |
|
1472 | |||
1466 |
|
1473 | |||
1467 | Test issue3153: diff -S with deleted subrepos |
|
1474 | Test issue3153: diff -S with deleted subrepos | |
1468 |
|
1475 | |||
1469 | $ hg diff --nodates -S -c . |
|
1476 | $ hg diff --nodates -S -c . | |
1470 | diff -r 365661e5936a -r 2400bccd50af .hgsub |
|
1477 | diff -r 365661e5936a -r 2400bccd50af .hgsub | |
1471 | --- a/.hgsub |
|
1478 | --- a/.hgsub | |
1472 | +++ /dev/null |
|
1479 | +++ /dev/null | |
1473 | @@ -1,2 +0,0 @@ |
|
1480 | @@ -1,2 +0,0 @@ | |
1474 | -s = s |
|
1481 | -s = s | |
1475 | -t = t |
|
1482 | -t = t | |
1476 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate |
|
1483 | diff -r 365661e5936a -r 2400bccd50af .hgsubstate | |
1477 | --- a/.hgsubstate |
|
1484 | --- a/.hgsubstate | |
1478 | +++ /dev/null |
|
1485 | +++ /dev/null | |
1479 | @@ -1,2 +0,0 @@ |
|
1486 | @@ -1,2 +0,0 @@ | |
1480 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1487 | -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s | |
1481 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t |
|
1488 | -e95bcfa18a358dc4936da981ebf4147b4cad1362 t | |
1482 |
|
1489 | |||
1483 | Test behavior of add for explicit path in subrepo: |
|
1490 | Test behavior of add for explicit path in subrepo: | |
1484 | $ cd .. |
|
1491 | $ cd .. | |
1485 | $ hg init explicit |
|
1492 | $ hg init explicit | |
1486 | $ cd explicit |
|
1493 | $ cd explicit | |
1487 | $ echo s = s > .hgsub |
|
1494 | $ echo s = s > .hgsub | |
1488 | $ hg add .hgsub |
|
1495 | $ hg add .hgsub | |
1489 | $ hg init s |
|
1496 | $ hg init s | |
1490 | $ hg ci -m0 |
|
1497 | $ hg ci -m0 | |
1491 | Adding with an explicit path in a subrepo adds the file |
|
1498 | Adding with an explicit path in a subrepo adds the file | |
1492 | $ echo c1 > f1 |
|
1499 | $ echo c1 > f1 | |
1493 | $ echo c2 > s/f2 |
|
1500 | $ echo c2 > s/f2 | |
1494 | $ hg st -S |
|
1501 | $ hg st -S | |
1495 | ? f1 |
|
1502 | ? f1 | |
1496 | ? s/f2 |
|
1503 | ? s/f2 | |
1497 | $ hg add s/f2 |
|
1504 | $ hg add s/f2 | |
1498 | $ hg st -S |
|
1505 | $ hg st -S | |
1499 | A s/f2 |
|
1506 | A s/f2 | |
1500 | ? f1 |
|
1507 | ? f1 | |
1501 | $ hg ci -R s -m0 |
|
1508 | $ hg ci -R s -m0 | |
1502 | $ hg ci -Am1 |
|
1509 | $ hg ci -Am1 | |
1503 | adding f1 |
|
1510 | adding f1 | |
1504 | Adding with an explicit path in a subrepo with -S has the same behavior |
|
1511 | Adding with an explicit path in a subrepo with -S has the same behavior | |
1505 | $ echo c3 > f3 |
|
1512 | $ echo c3 > f3 | |
1506 | $ echo c4 > s/f4 |
|
1513 | $ echo c4 > s/f4 | |
1507 | $ hg st -S |
|
1514 | $ hg st -S | |
1508 | ? f3 |
|
1515 | ? f3 | |
1509 | ? s/f4 |
|
1516 | ? s/f4 | |
1510 | $ hg add -S s/f4 |
|
1517 | $ hg add -S s/f4 | |
1511 | $ hg st -S |
|
1518 | $ hg st -S | |
1512 | A s/f4 |
|
1519 | A s/f4 | |
1513 | ? f3 |
|
1520 | ? f3 | |
1514 | $ hg ci -R s -m1 |
|
1521 | $ hg ci -R s -m1 | |
1515 | $ hg ci -Ama2 |
|
1522 | $ hg ci -Ama2 | |
1516 | adding f3 |
|
1523 | adding f3 | |
1517 | Adding without a path or pattern silently ignores subrepos |
|
1524 | Adding without a path or pattern silently ignores subrepos | |
1518 | $ echo c5 > f5 |
|
1525 | $ echo c5 > f5 | |
1519 | $ echo c6 > s/f6 |
|
1526 | $ echo c6 > s/f6 | |
1520 | $ echo c7 > s/f7 |
|
1527 | $ echo c7 > s/f7 | |
1521 | $ hg st -S |
|
1528 | $ hg st -S | |
1522 | ? f5 |
|
1529 | ? f5 | |
1523 | ? s/f6 |
|
1530 | ? s/f6 | |
1524 | ? s/f7 |
|
1531 | ? s/f7 | |
1525 | $ hg add |
|
1532 | $ hg add | |
1526 | adding f5 |
|
1533 | adding f5 | |
1527 | $ hg st -S |
|
1534 | $ hg st -S | |
1528 | A f5 |
|
1535 | A f5 | |
1529 | ? s/f6 |
|
1536 | ? s/f6 | |
1530 | ? s/f7 |
|
1537 | ? s/f7 | |
1531 | $ hg ci -R s -Am2 |
|
1538 | $ hg ci -R s -Am2 | |
1532 | adding f6 |
|
1539 | adding f6 | |
1533 | adding f7 |
|
1540 | adding f7 | |
1534 | $ hg ci -m3 |
|
1541 | $ hg ci -m3 | |
1535 | Adding without a path or pattern with -S also adds files in subrepos |
|
1542 | Adding without a path or pattern with -S also adds files in subrepos | |
1536 | $ echo c8 > f8 |
|
1543 | $ echo c8 > f8 | |
1537 | $ echo c9 > s/f9 |
|
1544 | $ echo c9 > s/f9 | |
1538 | $ echo c10 > s/f10 |
|
1545 | $ echo c10 > s/f10 | |
1539 | $ hg st -S |
|
1546 | $ hg st -S | |
1540 | ? f8 |
|
1547 | ? f8 | |
1541 | ? s/f10 |
|
1548 | ? s/f10 | |
1542 | ? s/f9 |
|
1549 | ? s/f9 | |
1543 | $ hg add -S |
|
1550 | $ hg add -S | |
1544 | adding f8 |
|
1551 | adding f8 | |
1545 | adding s/f10 |
|
1552 | adding s/f10 | |
1546 | adding s/f9 |
|
1553 | adding s/f9 | |
1547 | $ hg st -S |
|
1554 | $ hg st -S | |
1548 | A f8 |
|
1555 | A f8 | |
1549 | A s/f10 |
|
1556 | A s/f10 | |
1550 | A s/f9 |
|
1557 | A s/f9 | |
1551 | $ hg ci -R s -m3 |
|
1558 | $ hg ci -R s -m3 | |
1552 | $ hg ci -m4 |
|
1559 | $ hg ci -m4 | |
1553 | Adding with a pattern silently ignores subrepos |
|
1560 | Adding with a pattern silently ignores subrepos | |
1554 | $ echo c11 > fm11 |
|
1561 | $ echo c11 > fm11 | |
1555 | $ echo c12 > fn12 |
|
1562 | $ echo c12 > fn12 | |
1556 | $ echo c13 > s/fm13 |
|
1563 | $ echo c13 > s/fm13 | |
1557 | $ echo c14 > s/fn14 |
|
1564 | $ echo c14 > s/fn14 | |
1558 | $ hg st -S |
|
1565 | $ hg st -S | |
1559 | ? fm11 |
|
1566 | ? fm11 | |
1560 | ? fn12 |
|
1567 | ? fn12 | |
1561 | ? s/fm13 |
|
1568 | ? s/fm13 | |
1562 | ? s/fn14 |
|
1569 | ? s/fn14 | |
1563 | $ hg add 'glob:**fm*' |
|
1570 | $ hg add 'glob:**fm*' | |
1564 | adding fm11 |
|
1571 | adding fm11 | |
1565 | $ hg st -S |
|
1572 | $ hg st -S | |
1566 | A fm11 |
|
1573 | A fm11 | |
1567 | ? fn12 |
|
1574 | ? fn12 | |
1568 | ? s/fm13 |
|
1575 | ? s/fm13 | |
1569 | ? s/fn14 |
|
1576 | ? s/fn14 | |
1570 | $ hg ci -R s -Am4 |
|
1577 | $ hg ci -R s -Am4 | |
1571 | adding fm13 |
|
1578 | adding fm13 | |
1572 | adding fn14 |
|
1579 | adding fn14 | |
1573 | $ hg ci -Am5 |
|
1580 | $ hg ci -Am5 | |
1574 | adding fn12 |
|
1581 | adding fn12 | |
1575 | Adding with a pattern with -S also adds matches in subrepos |
|
1582 | Adding with a pattern with -S also adds matches in subrepos | |
1576 | $ echo c15 > fm15 |
|
1583 | $ echo c15 > fm15 | |
1577 | $ echo c16 > fn16 |
|
1584 | $ echo c16 > fn16 | |
1578 | $ echo c17 > s/fm17 |
|
1585 | $ echo c17 > s/fm17 | |
1579 | $ echo c18 > s/fn18 |
|
1586 | $ echo c18 > s/fn18 | |
1580 | $ hg st -S |
|
1587 | $ hg st -S | |
1581 | ? fm15 |
|
1588 | ? fm15 | |
1582 | ? fn16 |
|
1589 | ? fn16 | |
1583 | ? s/fm17 |
|
1590 | ? s/fm17 | |
1584 | ? s/fn18 |
|
1591 | ? s/fn18 | |
1585 | $ hg add -S 'glob:**fm*' |
|
1592 | $ hg add -S 'glob:**fm*' | |
1586 | adding fm15 |
|
1593 | adding fm15 | |
1587 | adding s/fm17 |
|
1594 | adding s/fm17 | |
1588 | $ hg st -S |
|
1595 | $ hg st -S | |
1589 | A fm15 |
|
1596 | A fm15 | |
1590 | A s/fm17 |
|
1597 | A s/fm17 | |
1591 | ? fn16 |
|
1598 | ? fn16 | |
1592 | ? s/fn18 |
|
1599 | ? s/fn18 | |
1593 | $ hg ci -R s -Am5 |
|
1600 | $ hg ci -R s -Am5 | |
1594 | adding fn18 |
|
1601 | adding fn18 | |
1595 | $ hg ci -Am6 |
|
1602 | $ hg ci -Am6 | |
1596 | adding fn16 |
|
1603 | adding fn16 | |
1597 |
|
1604 | |||
1598 | Test behavior of forget for explicit path in subrepo: |
|
1605 | Test behavior of forget for explicit path in subrepo: | |
1599 | Forgetting an explicit path in a subrepo untracks the file |
|
1606 | Forgetting an explicit path in a subrepo untracks the file | |
1600 | $ echo c19 > s/f19 |
|
1607 | $ echo c19 > s/f19 | |
1601 | $ hg add s/f19 |
|
1608 | $ hg add s/f19 | |
1602 | $ hg st -S |
|
1609 | $ hg st -S | |
1603 | A s/f19 |
|
1610 | A s/f19 | |
1604 | $ hg forget s/f19 |
|
1611 | $ hg forget s/f19 | |
1605 | $ hg st -S |
|
1612 | $ hg st -S | |
1606 | ? s/f19 |
|
1613 | ? s/f19 | |
1607 | $ rm s/f19 |
|
1614 | $ rm s/f19 | |
1608 | $ cd .. |
|
1615 | $ cd .. | |
1609 |
|
1616 | |||
1610 | Courtesy phases synchronisation to publishing server does not block the push |
|
1617 | Courtesy phases synchronisation to publishing server does not block the push | |
1611 | (issue3781) |
|
1618 | (issue3781) | |
1612 |
|
1619 | |||
1613 | $ cp -R main issue3781 |
|
1620 | $ cp -R main issue3781 | |
1614 | $ cp -R main issue3781-dest |
|
1621 | $ cp -R main issue3781-dest | |
1615 | $ cd issue3781-dest/s |
|
1622 | $ cd issue3781-dest/s | |
1616 | $ hg phase tip # show we have draft changeset |
|
1623 | $ hg phase tip # show we have draft changeset | |
1617 | 5: draft |
|
1624 | 5: draft | |
1618 | $ chmod a-w .hg/store/phaseroots # prevent phase push |
|
1625 | $ chmod a-w .hg/store/phaseroots # prevent phase push | |
1619 | $ cd ../../issue3781 |
|
1626 | $ cd ../../issue3781 | |
1620 | $ cat >> .hg/hgrc << EOF |
|
1627 | $ cat >> .hg/hgrc << EOF | |
1621 | > [paths] |
|
1628 | > [paths] | |
1622 | > default=../issue3781-dest/ |
|
1629 | > default=../issue3781-dest/ | |
1623 | > EOF |
|
1630 | > EOF | |
1624 | $ hg push --config devel.legacy.exchange=bundle1 |
|
1631 | $ hg push --config devel.legacy.exchange=bundle1 | |
1625 | pushing to $TESTTMP/issue3781-dest |
|
1632 | pushing to $TESTTMP/issue3781-dest | |
1626 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1633 | pushing subrepo s to $TESTTMP/issue3781-dest/s | |
1627 | searching for changes |
|
1634 | searching for changes | |
1628 | no changes found |
|
1635 | no changes found | |
1629 | searching for changes |
|
1636 | searching for changes | |
1630 | no changes found |
|
1637 | no changes found | |
1631 | [1] |
|
1638 | [1] | |
1632 | # clean the push cache |
|
1639 | # clean the push cache | |
1633 | $ rm s/.hg/cache/storehash/* |
|
1640 | $ rm s/.hg/cache/storehash/* | |
1634 | $ hg push # bundle2+ |
|
1641 | $ hg push # bundle2+ | |
1635 | pushing to $TESTTMP/issue3781-dest |
|
1642 | pushing to $TESTTMP/issue3781-dest | |
1636 | pushing subrepo s to $TESTTMP/issue3781-dest/s |
|
1643 | pushing subrepo s to $TESTTMP/issue3781-dest/s | |
1637 | searching for changes |
|
1644 | searching for changes | |
1638 | no changes found |
|
1645 | no changes found | |
1639 | searching for changes |
|
1646 | searching for changes | |
1640 | no changes found |
|
1647 | no changes found | |
1641 | [1] |
|
1648 | [1] | |
1642 | $ cd .. |
|
1649 | $ cd .. | |
1643 |
|
1650 | |||
1644 | Test phase choice for newly created commit with "phases.subrepochecks" |
|
1651 | Test phase choice for newly created commit with "phases.subrepochecks" | |
1645 | configuration |
|
1652 | configuration | |
1646 |
|
1653 | |||
1647 | $ cd t |
|
1654 | $ cd t | |
1648 | $ hg update -q -r 12 |
|
1655 | $ hg update -q -r 12 | |
1649 |
|
1656 | |||
1650 | $ cat >> s/ss/.hg/hgrc <<EOF |
|
1657 | $ cat >> s/ss/.hg/hgrc <<EOF | |
1651 | > [phases] |
|
1658 | > [phases] | |
1652 | > new-commit = secret |
|
1659 | > new-commit = secret | |
1653 | > EOF |
|
1660 | > EOF | |
1654 | $ cat >> s/.hg/hgrc <<EOF |
|
1661 | $ cat >> s/.hg/hgrc <<EOF | |
1655 | > [phases] |
|
1662 | > [phases] | |
1656 | > new-commit = draft |
|
1663 | > new-commit = draft | |
1657 | > EOF |
|
1664 | > EOF | |
1658 | $ echo phasecheck1 >> s/ss/a |
|
1665 | $ echo phasecheck1 >> s/ss/a | |
1659 | $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1 |
|
1666 | $ hg -R s commit -S --config phases.checksubrepos=abort -m phasecheck1 | |
1660 | committing subrepository ss |
|
1667 | committing subrepository ss | |
1661 | transaction abort! |
|
1668 | transaction abort! | |
1662 | rollback completed |
|
1669 | rollback completed | |
1663 | abort: can't commit in draft phase conflicting secret from subrepository ss |
|
1670 | abort: can't commit in draft phase conflicting secret from subrepository ss | |
1664 | [255] |
|
1671 | [255] | |
1665 | $ echo phasecheck2 >> s/ss/a |
|
1672 | $ echo phasecheck2 >> s/ss/a | |
1666 | $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2 |
|
1673 | $ hg -R s commit -S --config phases.checksubrepos=ignore -m phasecheck2 | |
1667 | committing subrepository ss |
|
1674 | committing subrepository ss | |
1668 | $ hg -R s/ss phase tip |
|
1675 | $ hg -R s/ss phase tip | |
1669 | 3: secret |
|
1676 | 3: secret | |
1670 | $ hg -R s phase tip |
|
1677 | $ hg -R s phase tip | |
1671 | 6: draft |
|
1678 | 6: draft | |
1672 | $ echo phasecheck3 >> s/ss/a |
|
1679 | $ echo phasecheck3 >> s/ss/a | |
1673 | $ hg -R s commit -S -m phasecheck3 |
|
1680 | $ hg -R s commit -S -m phasecheck3 | |
1674 | committing subrepository ss |
|
1681 | committing subrepository ss | |
1675 | warning: changes are committed in secret phase from subrepository ss |
|
1682 | warning: changes are committed in secret phase from subrepository ss | |
1676 | $ hg -R s/ss phase tip |
|
1683 | $ hg -R s/ss phase tip | |
1677 | 4: secret |
|
1684 | 4: secret | |
1678 | $ hg -R s phase tip |
|
1685 | $ hg -R s phase tip | |
1679 | 7: secret |
|
1686 | 7: secret | |
1680 |
|
1687 | |||
1681 | $ cat >> t/.hg/hgrc <<EOF |
|
1688 | $ cat >> t/.hg/hgrc <<EOF | |
1682 | > [phases] |
|
1689 | > [phases] | |
1683 | > new-commit = draft |
|
1690 | > new-commit = draft | |
1684 | > EOF |
|
1691 | > EOF | |
1685 | $ cat >> .hg/hgrc <<EOF |
|
1692 | $ cat >> .hg/hgrc <<EOF | |
1686 | > [phases] |
|
1693 | > [phases] | |
1687 | > new-commit = public |
|
1694 | > new-commit = public | |
1688 | > EOF |
|
1695 | > EOF | |
1689 | $ echo phasecheck4 >> s/ss/a |
|
1696 | $ echo phasecheck4 >> s/ss/a | |
1690 | $ echo phasecheck4 >> t/t |
|
1697 | $ echo phasecheck4 >> t/t | |
1691 | $ hg commit -S -m phasecheck4 |
|
1698 | $ hg commit -S -m phasecheck4 | |
1692 | committing subrepository s |
|
1699 | committing subrepository s | |
1693 | committing subrepository s/ss |
|
1700 | committing subrepository s/ss | |
1694 | warning: changes are committed in secret phase from subrepository ss |
|
1701 | warning: changes are committed in secret phase from subrepository ss | |
1695 | committing subrepository t |
|
1702 | committing subrepository t | |
1696 | warning: changes are committed in secret phase from subrepository s |
|
1703 | warning: changes are committed in secret phase from subrepository s | |
1697 | created new head |
|
1704 | created new head | |
1698 | $ hg -R s/ss phase tip |
|
1705 | $ hg -R s/ss phase tip | |
1699 | 5: secret |
|
1706 | 5: secret | |
1700 | $ hg -R s phase tip |
|
1707 | $ hg -R s phase tip | |
1701 | 8: secret |
|
1708 | 8: secret | |
1702 | $ hg -R t phase tip |
|
1709 | $ hg -R t phase tip | |
1703 | 6: draft |
|
1710 | 6: draft | |
1704 | $ hg phase tip |
|
1711 | $ hg phase tip | |
1705 | 15: secret |
|
1712 | 15: secret | |
1706 |
|
1713 | |||
1707 | $ cd .. |
|
1714 | $ cd .. | |
1708 |
|
1715 | |||
1709 |
|
1716 | |||
1710 | Test that commit --secret works on both repo and subrepo (issue4182) |
|
1717 | Test that commit --secret works on both repo and subrepo (issue4182) | |
1711 |
|
1718 | |||
1712 | $ cd main |
|
1719 | $ cd main | |
1713 | $ echo secret >> b |
|
1720 | $ echo secret >> b | |
1714 | $ echo secret >> s/b |
|
1721 | $ echo secret >> s/b | |
1715 | $ hg commit --secret --subrepo -m "secret" |
|
1722 | $ hg commit --secret --subrepo -m "secret" | |
1716 | committing subrepository s |
|
1723 | committing subrepository s | |
1717 | $ hg phase -r . |
|
1724 | $ hg phase -r . | |
1718 | 6: secret |
|
1725 | 6: secret | |
1719 | $ cd s |
|
1726 | $ cd s | |
1720 | $ hg phase -r . |
|
1727 | $ hg phase -r . | |
1721 | 6: secret |
|
1728 | 6: secret | |
1722 | $ cd ../../ |
|
1729 | $ cd ../../ | |
1723 |
|
1730 | |||
1724 | Test "subrepos" template keyword |
|
1731 | Test "subrepos" template keyword | |
1725 |
|
1732 | |||
1726 | $ cd t |
|
1733 | $ cd t | |
1727 | $ hg update -q 15 |
|
1734 | $ hg update -q 15 | |
1728 | $ cat > .hgsub <<EOF |
|
1735 | $ cat > .hgsub <<EOF | |
1729 | > s = s |
|
1736 | > s = s | |
1730 | > EOF |
|
1737 | > EOF | |
1731 | $ hg commit -m "16" |
|
1738 | $ hg commit -m "16" | |
1732 | warning: changes are committed in secret phase from subrepository s |
|
1739 | warning: changes are committed in secret phase from subrepository s | |
1733 |
|
1740 | |||
1734 | (addition of ".hgsub" itself) |
|
1741 | (addition of ".hgsub" itself) | |
1735 |
|
1742 | |||
1736 | $ hg diff --nodates -c 1 .hgsubstate |
|
1743 | $ hg diff --nodates -c 1 .hgsubstate | |
1737 | diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate |
|
1744 | diff -r f7b1eb17ad24 -r 7cf8cfea66e4 .hgsubstate | |
1738 | --- /dev/null |
|
1745 | --- /dev/null | |
1739 | +++ b/.hgsubstate |
|
1746 | +++ b/.hgsubstate | |
1740 | @@ -0,0 +1,1 @@ |
|
1747 | @@ -0,0 +1,1 @@ | |
1741 | +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1748 | +e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1742 | $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1749 | $ hg log -r 1 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1743 | f7b1eb17ad24 000000000000 |
|
1750 | f7b1eb17ad24 000000000000 | |
1744 | s |
|
1751 | s | |
1745 |
|
1752 | |||
1746 | (modification of existing entry) |
|
1753 | (modification of existing entry) | |
1747 |
|
1754 | |||
1748 | $ hg diff --nodates -c 2 .hgsubstate |
|
1755 | $ hg diff --nodates -c 2 .hgsubstate | |
1749 | diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate |
|
1756 | diff -r 7cf8cfea66e4 -r df30734270ae .hgsubstate | |
1750 | --- a/.hgsubstate |
|
1757 | --- a/.hgsubstate | |
1751 | +++ b/.hgsubstate |
|
1758 | +++ b/.hgsubstate | |
1752 | @@ -1,1 +1,1 @@ |
|
1759 | @@ -1,1 +1,1 @@ | |
1753 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1760 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1754 | +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s |
|
1761 | +dc73e2e6d2675eb2e41e33c205f4bdab4ea5111d s | |
1755 | $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1762 | $ hg log -r 2 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1756 | 7cf8cfea66e4 000000000000 |
|
1763 | 7cf8cfea66e4 000000000000 | |
1757 | s |
|
1764 | s | |
1758 |
|
1765 | |||
1759 | (addition of entry) |
|
1766 | (addition of entry) | |
1760 |
|
1767 | |||
1761 | $ hg diff --nodates -c 5 .hgsubstate |
|
1768 | $ hg diff --nodates -c 5 .hgsubstate | |
1762 | diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate |
|
1769 | diff -r 7cf8cfea66e4 -r 1f14a2e2d3ec .hgsubstate | |
1763 | --- a/.hgsubstate |
|
1770 | --- a/.hgsubstate | |
1764 | +++ b/.hgsubstate |
|
1771 | +++ b/.hgsubstate | |
1765 | @@ -1,1 +1,2 @@ |
|
1772 | @@ -1,1 +1,2 @@ | |
1766 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1773 | e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1767 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1774 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t | |
1768 | $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1775 | $ hg log -r 5 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1769 | 7cf8cfea66e4 000000000000 |
|
1776 | 7cf8cfea66e4 000000000000 | |
1770 | t |
|
1777 | t | |
1771 |
|
1778 | |||
1772 | (removal of existing entry) |
|
1779 | (removal of existing entry) | |
1773 |
|
1780 | |||
1774 | $ hg diff --nodates -c 16 .hgsubstate |
|
1781 | $ hg diff --nodates -c 16 .hgsubstate | |
1775 | diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate |
|
1782 | diff -r 8bec38d2bd0b -r f2f70bc3d3c9 .hgsubstate | |
1776 | --- a/.hgsubstate |
|
1783 | --- a/.hgsubstate | |
1777 | +++ b/.hgsubstate |
|
1784 | +++ b/.hgsubstate | |
1778 | @@ -1,2 +1,1 @@ |
|
1785 | @@ -1,2 +1,1 @@ | |
1779 | 0731af8ca9423976d3743119d0865097c07bdc1b s |
|
1786 | 0731af8ca9423976d3743119d0865097c07bdc1b s | |
1780 | -e202dc79b04c88a636ea8913d9182a1346d9b3dc t |
|
1787 | -e202dc79b04c88a636ea8913d9182a1346d9b3dc t | |
1781 | $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1788 | $ hg log -r 16 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1782 | 8bec38d2bd0b 000000000000 |
|
1789 | 8bec38d2bd0b 000000000000 | |
1783 | t |
|
1790 | t | |
1784 |
|
1791 | |||
1785 | (merging) |
|
1792 | (merging) | |
1786 |
|
1793 | |||
1787 | $ hg diff --nodates -c 9 .hgsubstate |
|
1794 | $ hg diff --nodates -c 9 .hgsubstate | |
1788 | diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate |
|
1795 | diff -r f6affe3fbfaa -r f0d2028bf86d .hgsubstate | |
1789 | --- a/.hgsubstate |
|
1796 | --- a/.hgsubstate | |
1790 | +++ b/.hgsubstate |
|
1797 | +++ b/.hgsubstate | |
1791 | @@ -1,1 +1,2 @@ |
|
1798 | @@ -1,1 +1,2 @@ | |
1792 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1799 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s | |
1793 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1800 | +60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t | |
1794 | $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1801 | $ hg log -r 9 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1795 | f6affe3fbfaa 1f14a2e2d3ec |
|
1802 | f6affe3fbfaa 1f14a2e2d3ec | |
1796 | t |
|
1803 | t | |
1797 |
|
1804 | |||
1798 | (removal of ".hgsub" itself) |
|
1805 | (removal of ".hgsub" itself) | |
1799 |
|
1806 | |||
1800 | $ hg diff --nodates -c 8 .hgsubstate |
|
1807 | $ hg diff --nodates -c 8 .hgsubstate | |
1801 | diff -r f94576341bcf -r 96615c1dad2d .hgsubstate |
|
1808 | diff -r f94576341bcf -r 96615c1dad2d .hgsubstate | |
1802 | --- a/.hgsubstate |
|
1809 | --- a/.hgsubstate | |
1803 | +++ /dev/null |
|
1810 | +++ /dev/null | |
1804 | @@ -1,2 +0,0 @@ |
|
1811 | @@ -1,2 +0,0 @@ | |
1805 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s |
|
1812 | -e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 s | |
1806 | -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t |
|
1813 | -7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4 t | |
1807 | $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" |
|
1814 | $ hg log -r 8 --template "{p1node|short} {p2node|short}\n{subrepos % '{subrepo}\n'}" | |
1808 | f94576341bcf 000000000000 |
|
1815 | f94576341bcf 000000000000 | |
1809 |
|
1816 | |||
1810 | Test that '[paths]' is configured correctly at subrepo creation |
|
1817 | Test that '[paths]' is configured correctly at subrepo creation | |
1811 |
|
1818 | |||
1812 | $ cd $TESTTMP/tc |
|
1819 | $ cd $TESTTMP/tc | |
1813 | $ cat > .hgsub <<EOF |
|
1820 | $ cat > .hgsub <<EOF | |
1814 | > # to clear bogus subrepo path 'bogus=[boguspath' |
|
1821 | > # to clear bogus subrepo path 'bogus=[boguspath' | |
1815 | > s = s |
|
1822 | > s = s | |
1816 | > t = t |
|
1823 | > t = t | |
1817 | > EOF |
|
1824 | > EOF | |
1818 | $ hg update -q --clean null |
|
1825 | $ hg update -q --clean null | |
1819 | $ rm -rf s t |
|
1826 | $ rm -rf s t | |
1820 | $ cat >> .hg/hgrc <<EOF |
|
1827 | $ cat >> .hg/hgrc <<EOF | |
1821 | > [paths] |
|
1828 | > [paths] | |
1822 | > default-push = /foo/bar |
|
1829 | > default-push = /foo/bar | |
1823 | > EOF |
|
1830 | > EOF | |
1824 | $ hg update -q |
|
1831 | $ hg update -q | |
1825 | $ cat s/.hg/hgrc |
|
1832 | $ cat s/.hg/hgrc | |
1826 | [paths] |
|
1833 | [paths] | |
1827 | default = $TESTTMP/t/s |
|
1834 | default = $TESTTMP/t/s | |
1828 | default-push = /foo/bar/s |
|
1835 | default-push = /foo/bar/s | |
1829 | $ cat s/ss/.hg/hgrc |
|
1836 | $ cat s/ss/.hg/hgrc | |
1830 | [paths] |
|
1837 | [paths] | |
1831 | default = $TESTTMP/t/s/ss |
|
1838 | default = $TESTTMP/t/s/ss | |
1832 | default-push = /foo/bar/s/ss |
|
1839 | default-push = /foo/bar/s/ss | |
1833 | $ cat t/.hg/hgrc |
|
1840 | $ cat t/.hg/hgrc | |
1834 | [paths] |
|
1841 | [paths] | |
1835 | default = $TESTTMP/t/t |
|
1842 | default = $TESTTMP/t/t | |
1836 | default-push = /foo/bar/t |
|
1843 | default-push = /foo/bar/t | |
1837 |
|
1844 | |||
1838 | $ cd $TESTTMP/t |
|
1845 | $ cd $TESTTMP/t | |
1839 | $ hg up -qC 0 |
|
1846 | $ hg up -qC 0 | |
1840 | $ echo 'bar' > bar.txt |
|
1847 | $ echo 'bar' > bar.txt | |
1841 | $ hg ci -Am 'branch before subrepo add' |
|
1848 | $ hg ci -Am 'branch before subrepo add' | |
1842 | adding bar.txt |
|
1849 | adding bar.txt | |
1843 | created new head |
|
1850 | created new head | |
1844 | $ hg merge -r "first(subrepo('s'))" |
|
1851 | $ hg merge -r "first(subrepo('s'))" | |
1845 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1852 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1846 | (branch merge, don't forget to commit) |
|
1853 | (branch merge, don't forget to commit) | |
1847 | $ hg status -S -X '.hgsub*' |
|
1854 | $ hg status -S -X '.hgsub*' | |
1848 | A s/a |
|
1855 | A s/a | |
1849 | ? s/b |
|
1856 | ? s/b | |
1850 | ? s/c |
|
1857 | ? s/c | |
1851 | ? s/f1 |
|
1858 | ? s/f1 | |
1852 | $ hg status -S --rev 'p2()' |
|
1859 | $ hg status -S --rev 'p2()' | |
1853 | A bar.txt |
|
1860 | A bar.txt | |
1854 | ? s/b |
|
1861 | ? s/b | |
1855 | ? s/c |
|
1862 | ? s/c | |
1856 | ? s/f1 |
|
1863 | ? s/f1 | |
1857 | $ hg diff -S -X '.hgsub*' --nodates |
|
1864 | $ hg diff -S -X '.hgsub*' --nodates | |
1858 | diff -r 000000000000 s/a |
|
1865 | diff -r 000000000000 s/a | |
1859 | --- /dev/null |
|
1866 | --- /dev/null | |
1860 | +++ b/s/a |
|
1867 | +++ b/s/a | |
1861 | @@ -0,0 +1,1 @@ |
|
1868 | @@ -0,0 +1,1 @@ | |
1862 | +a |
|
1869 | +a | |
1863 | $ hg diff -S --rev 'p2()' --nodates |
|
1870 | $ hg diff -S --rev 'p2()' --nodates | |
1864 | diff -r 7cf8cfea66e4 bar.txt |
|
1871 | diff -r 7cf8cfea66e4 bar.txt | |
1865 | --- /dev/null |
|
1872 | --- /dev/null | |
1866 | +++ b/bar.txt |
|
1873 | +++ b/bar.txt | |
1867 | @@ -0,0 +1,1 @@ |
|
1874 | @@ -0,0 +1,1 @@ | |
1868 | +bar |
|
1875 | +bar | |
1869 |
|
1876 | |||
1870 | $ cd .. |
|
1877 | $ cd .. | |
1871 |
|
1878 | |||
1872 | test for ssh exploit 2017-07-25 |
|
1879 | test for ssh exploit 2017-07-25 | |
1873 |
|
1880 | |||
1874 | $ cat >> $HGRCPATH << EOF |
|
1881 | $ cat >> $HGRCPATH << EOF | |
1875 | > [ui] |
|
1882 | > [ui] | |
1876 | > ssh = sh -c "read l; read l; read l" |
|
1883 | > ssh = sh -c "read l; read l; read l" | |
1877 | > EOF |
|
1884 | > EOF | |
1878 |
|
1885 | |||
1879 | $ hg init malicious-proxycommand |
|
1886 | $ hg init malicious-proxycommand | |
1880 | $ cd malicious-proxycommand |
|
1887 | $ cd malicious-proxycommand | |
1881 | $ echo 's = [hg]ssh://-oProxyCommand=touch${IFS}owned/path' > .hgsub |
|
1888 | $ echo 's = [hg]ssh://-oProxyCommand=touch${IFS}owned/path' > .hgsub | |
1882 | $ hg init s |
|
1889 | $ hg init s | |
1883 | $ cd s |
|
1890 | $ cd s | |
1884 | $ echo init > init |
|
1891 | $ echo init > init | |
1885 | $ hg add |
|
1892 | $ hg add | |
1886 | adding init |
|
1893 | adding init | |
1887 | $ hg commit -m init |
|
1894 | $ hg commit -m init | |
1888 | $ cd .. |
|
1895 | $ cd .. | |
1889 | $ hg add .hgsub |
|
1896 | $ hg add .hgsub | |
1890 | $ hg ci -m 'add subrepo' |
|
1897 | $ hg ci -m 'add subrepo' | |
1891 | $ cd .. |
|
1898 | $ cd .. | |
1892 | $ hg clone malicious-proxycommand malicious-proxycommand-clone |
|
1899 | $ hg clone malicious-proxycommand malicious-proxycommand-clone | |
1893 | updating to branch default |
|
1900 | updating to branch default | |
1894 | cloning subrepo s from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
|
1901 | cloning subrepo s from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path | |
1895 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' (in subrepository "s") |
|
1902 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' (in subrepository "s") | |
1896 | [255] |
|
1903 | [255] | |
1897 |
|
1904 | |||
1898 | also check that a percent encoded '-' (%2D) doesn't work |
|
1905 | also check that a percent encoded '-' (%2D) doesn't work | |
1899 |
|
1906 | |||
1900 | $ cd malicious-proxycommand |
|
1907 | $ cd malicious-proxycommand | |
1901 | $ echo 's = [hg]ssh://%2DoProxyCommand=touch${IFS}owned/path' > .hgsub |
|
1908 | $ echo 's = [hg]ssh://%2DoProxyCommand=touch${IFS}owned/path' > .hgsub | |
1902 | $ hg ci -m 'change url to percent encoded' |
|
1909 | $ hg ci -m 'change url to percent encoded' | |
1903 | $ cd .. |
|
1910 | $ cd .. | |
1904 | $ rm -r malicious-proxycommand-clone |
|
1911 | $ rm -r malicious-proxycommand-clone | |
1905 | $ hg clone malicious-proxycommand malicious-proxycommand-clone |
|
1912 | $ hg clone malicious-proxycommand malicious-proxycommand-clone | |
1906 | updating to branch default |
|
1913 | updating to branch default | |
1907 | cloning subrepo s from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
|
1914 | cloning subrepo s from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path | |
1908 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' (in subrepository "s") |
|
1915 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' (in subrepository "s") | |
1909 | [255] |
|
1916 | [255] | |
1910 |
|
1917 | |||
1911 | also check for a pipe |
|
1918 | also check for a pipe | |
1912 |
|
1919 | |||
1913 | $ cd malicious-proxycommand |
|
1920 | $ cd malicious-proxycommand | |
1914 | $ echo 's = [hg]ssh://fakehost|touch${IFS}owned/path' > .hgsub |
|
1921 | $ echo 's = [hg]ssh://fakehost|touch${IFS}owned/path' > .hgsub | |
1915 | $ hg ci -m 'change url to pipe' |
|
1922 | $ hg ci -m 'change url to pipe' | |
1916 | $ cd .. |
|
1923 | $ cd .. | |
1917 | $ rm -r malicious-proxycommand-clone |
|
1924 | $ rm -r malicious-proxycommand-clone | |
1918 | $ hg clone malicious-proxycommand malicious-proxycommand-clone |
|
1925 | $ hg clone malicious-proxycommand malicious-proxycommand-clone | |
1919 | updating to branch default |
|
1926 | updating to branch default | |
1920 | cloning subrepo s from ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path |
|
1927 | cloning subrepo s from ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path | |
1921 | abort: no suitable response from remote hg! |
|
1928 | abort: no suitable response from remote hg! | |
1922 | [255] |
|
1929 | [255] | |
1923 | $ [ ! -f owned ] || echo 'you got owned' |
|
1930 | $ [ ! -f owned ] || echo 'you got owned' | |
1924 |
|
1931 | |||
1925 | also check that a percent encoded '|' (%7C) doesn't work |
|
1932 | also check that a percent encoded '|' (%7C) doesn't work | |
1926 |
|
1933 | |||
1927 | $ cd malicious-proxycommand |
|
1934 | $ cd malicious-proxycommand | |
1928 | $ echo 's = [hg]ssh://fakehost%7Ctouch%20owned/path' > .hgsub |
|
1935 | $ echo 's = [hg]ssh://fakehost%7Ctouch%20owned/path' > .hgsub | |
1929 | $ hg ci -m 'change url to percent encoded pipe' |
|
1936 | $ hg ci -m 'change url to percent encoded pipe' | |
1930 | $ cd .. |
|
1937 | $ cd .. | |
1931 | $ rm -r malicious-proxycommand-clone |
|
1938 | $ rm -r malicious-proxycommand-clone | |
1932 | $ hg clone malicious-proxycommand malicious-proxycommand-clone |
|
1939 | $ hg clone malicious-proxycommand malicious-proxycommand-clone | |
1933 | updating to branch default |
|
1940 | updating to branch default | |
1934 | cloning subrepo s from ssh://fakehost%7Ctouch%20owned/path |
|
1941 | cloning subrepo s from ssh://fakehost%7Ctouch%20owned/path | |
1935 | abort: no suitable response from remote hg! |
|
1942 | abort: no suitable response from remote hg! | |
1936 | [255] |
|
1943 | [255] | |
1937 | $ [ ! -f owned ] || echo 'you got owned' |
|
1944 | $ [ ! -f owned ] || echo 'you got owned' | |
1938 |
|
1945 | |||
1939 | and bad usernames: |
|
1946 | and bad usernames: | |
1940 | $ cd malicious-proxycommand |
|
1947 | $ cd malicious-proxycommand | |
1941 | $ echo 's = [hg]ssh://-oProxyCommand=touch owned@example.com/path' > .hgsub |
|
1948 | $ echo 's = [hg]ssh://-oProxyCommand=touch owned@example.com/path' > .hgsub | |
1942 | $ hg ci -m 'owned username' |
|
1949 | $ hg ci -m 'owned username' | |
1943 | $ cd .. |
|
1950 | $ cd .. | |
1944 | $ rm -r malicious-proxycommand-clone |
|
1951 | $ rm -r malicious-proxycommand-clone | |
1945 | $ hg clone malicious-proxycommand malicious-proxycommand-clone |
|
1952 | $ hg clone malicious-proxycommand malicious-proxycommand-clone | |
1946 | updating to branch default |
|
1953 | updating to branch default | |
1947 | cloning subrepo s from ssh://-oProxyCommand%3Dtouch%20owned@example.com/path |
|
1954 | cloning subrepo s from ssh://-oProxyCommand%3Dtouch%20owned@example.com/path | |
1948 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned@example.com/path' (in subrepository "s") |
|
1955 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch owned@example.com/path' (in subrepository "s") | |
1949 | [255] |
|
1956 | [255] | |
1950 |
|
1957 | |||
1951 | Test convert subrepositories including merge (issue5526): |
|
1958 | Test convert subrepositories including merge (issue5526): | |
1952 |
|
1959 | |||
1953 | $ hg init tconv |
|
1960 | $ hg init tconv | |
1954 | $ hg convert --config extensions.convert= -q t/s tconv/s |
|
1961 | $ hg convert --config extensions.convert= -q t/s tconv/s | |
1955 | $ hg convert --config extensions.convert= -q t/s/ss tconv/s/ss |
|
1962 | $ hg convert --config extensions.convert= -q t/s/ss tconv/s/ss | |
1956 | $ hg convert --config extensions.convert= -q t/t tconv/t |
|
1963 | $ hg convert --config extensions.convert= -q t/t tconv/t | |
1957 |
|
1964 | |||
1958 | convert shouldn't fail because of pseudo filenode: |
|
1965 | convert shouldn't fail because of pseudo filenode: | |
1959 |
|
1966 | |||
1960 | $ hg convert --config extensions.convert= t tconv |
|
1967 | $ hg convert --config extensions.convert= t tconv | |
1961 | scanning source... |
|
1968 | scanning source... | |
1962 | sorting... |
|
1969 | sorting... | |
1963 | converting... |
|
1970 | converting... | |
1964 | 17 0 |
|
1971 | 17 0 | |
1965 | 16 1 |
|
1972 | 16 1 | |
1966 | 15 2 |
|
1973 | 15 2 | |
1967 | 14 3 |
|
1974 | 14 3 | |
1968 | 13 4 |
|
1975 | 13 4 | |
1969 | 12 5 |
|
1976 | 12 5 | |
1970 | 11 6 |
|
1977 | 11 6 | |
1971 | 10 7 |
|
1978 | 10 7 | |
1972 | 9 8 |
|
1979 | 9 8 | |
1973 | 8 9 |
|
1980 | 8 9 | |
1974 | 7 10 |
|
1981 | 7 10 | |
1975 | 6 11 |
|
1982 | 6 11 | |
1976 | 5 12 |
|
1983 | 5 12 | |
1977 | 4 13 |
|
1984 | 4 13 | |
1978 | 3 rm2 |
|
1985 | 3 rm2 | |
1979 | 2 phasecheck4 |
|
1986 | 2 phasecheck4 | |
1980 | 1 16 |
|
1987 | 1 16 | |
1981 | 0 branch before subrepo add |
|
1988 | 0 branch before subrepo add | |
1982 |
|
1989 | |||
1983 | converted .hgsubstate should point to valid nodes: |
|
1990 | converted .hgsubstate should point to valid nodes: | |
1984 |
|
1991 | |||
1985 | $ hg up -R tconv 9 |
|
1992 | $ hg up -R tconv 9 | |
1986 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1993 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1987 | $ cat tconv/.hgsubstate |
|
1994 | $ cat tconv/.hgsubstate | |
1988 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s |
|
1995 | fc627a69481fcbe5f1135069e8a3881c023e4cf5 s | |
1989 | 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
|
1996 | 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 t |
General Comments 0
You need to be logged in to leave comments.
Login now