Show More
@@ -1,459 +1,459 b'' | |||||
1 | Prepare repo a: |
|
1 | Prepare repo a: | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg add a |
|
6 | $ hg add a | |
7 | $ hg commit -m test |
|
7 | $ hg commit -m test | |
8 | $ echo first line > b |
|
8 | $ echo first line > b | |
9 | $ hg add b |
|
9 | $ hg add b | |
10 |
|
10 | |||
11 | Create a non-inlined filelog: |
|
11 | Create a non-inlined filelog: | |
12 |
|
12 | |||
13 | $ python -c 'for x in range(10000): print x' >> data1 |
|
13 | $ python -c 'for x in range(10000): print x' >> data1 | |
14 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
14 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
15 | > cat data1 >> b |
|
15 | > cat data1 >> b | |
16 | > hg commit -m test |
|
16 | > hg commit -m test | |
17 | > done |
|
17 | > done | |
18 |
|
18 | |||
19 | List files in store/data (should show a 'b.d'): |
|
19 | List files in store/data (should show a 'b.d'): | |
20 |
|
20 | |||
21 | $ for i in .hg/store/data/*; do |
|
21 | $ for i in .hg/store/data/*; do | |
22 | > echo $i |
|
22 | > echo $i | |
23 | > done |
|
23 | > done | |
24 | .hg/store/data/a.i |
|
24 | .hg/store/data/a.i | |
25 | .hg/store/data/b.d |
|
25 | .hg/store/data/b.d | |
26 | .hg/store/data/b.i |
|
26 | .hg/store/data/b.i | |
27 |
|
27 | |||
28 | Default operation: |
|
28 | Default operation: | |
29 |
|
29 | |||
30 | $ hg clone . ../b |
|
30 | $ hg clone . ../b | |
31 | updating to branch default |
|
31 | updating to branch default | |
32 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
32 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
33 | $ cd ../b |
|
33 | $ cd ../b | |
34 | $ cat a |
|
34 | $ cat a | |
35 | a |
|
35 | a | |
36 | $ hg verify |
|
36 | $ hg verify | |
37 | checking changesets |
|
37 | checking changesets | |
38 | checking manifests |
|
38 | checking manifests | |
39 | crosschecking files in changesets and manifests |
|
39 | crosschecking files in changesets and manifests | |
40 | checking files |
|
40 | checking files | |
41 | 2 files, 11 changesets, 11 total revisions |
|
41 | 2 files, 11 changesets, 11 total revisions | |
42 |
|
42 | |||
43 | Invalid dest '' must abort: |
|
43 | Invalid dest '' must abort: | |
44 |
|
44 | |||
45 | $ hg clone . '' |
|
45 | $ hg clone . '' | |
46 | abort: No such file or directory |
|
46 | abort: No such file or directory | |
47 | [255] |
|
47 | [255] | |
48 |
|
48 | |||
49 | No update, with debug option: |
|
49 | No update, with debug option: | |
50 |
|
50 | |||
51 | $ hg --debug clone -U . ../c |
|
51 | $ hg --debug clone -U . ../c | |
52 | linked 8 files |
|
52 | linked 8 files | |
53 | $ cd ../c |
|
53 | $ cd ../c | |
54 | $ cat a 2>/dev/null || echo "a not present" |
|
54 | $ cat a 2>/dev/null || echo "a not present" | |
55 | a not present |
|
55 | a not present | |
56 | $ hg verify |
|
56 | $ hg verify | |
57 | checking changesets |
|
57 | checking changesets | |
58 | checking manifests |
|
58 | checking manifests | |
59 | crosschecking files in changesets and manifests |
|
59 | crosschecking files in changesets and manifests | |
60 | checking files |
|
60 | checking files | |
61 | 2 files, 11 changesets, 11 total revisions |
|
61 | 2 files, 11 changesets, 11 total revisions | |
62 |
|
62 | |||
63 | Default destination: |
|
63 | Default destination: | |
64 |
|
64 | |||
65 | $ mkdir ../d |
|
65 | $ mkdir ../d | |
66 | $ cd ../d |
|
66 | $ cd ../d | |
67 | $ hg clone ../a |
|
67 | $ hg clone ../a | |
68 | destination directory: a |
|
68 | destination directory: a | |
69 | updating to branch default |
|
69 | updating to branch default | |
70 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
70 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
71 | $ cd a |
|
71 | $ cd a | |
72 | $ hg cat a |
|
72 | $ hg cat a | |
73 | a |
|
73 | a | |
74 | $ cd ../.. |
|
74 | $ cd ../.. | |
75 |
|
75 | |||
76 | Check that we drop the 'file:' from the path before writing the .hgrc: |
|
76 | Check that we drop the 'file:' from the path before writing the .hgrc: | |
77 |
|
77 | |||
78 | $ hg clone file:a e |
|
78 | $ hg clone file:a e | |
79 | updating to branch default |
|
79 | updating to branch default | |
80 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
80 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
81 | $ grep 'file:' e/.hg/hgrc |
|
81 | $ grep 'file:' e/.hg/hgrc | |
82 | [1] |
|
82 | [1] | |
83 |
|
83 | |||
84 | Check that path aliases are expanded: |
|
84 | Check that path aliases are expanded: | |
85 |
|
85 | |||
86 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f |
|
86 | $ hg clone -q -U --config 'paths.foobar=a#0' foobar f | |
87 | $ hg -R f showconfig paths.default |
|
87 | $ hg -R f showconfig paths.default | |
88 | $TESTTMP/a#0 |
|
88 | $TESTTMP/a#0 (glob) | |
89 |
|
89 | |||
90 | Use --pull: |
|
90 | Use --pull: | |
91 |
|
91 | |||
92 | $ hg clone --pull a g |
|
92 | $ hg clone --pull a g | |
93 | requesting all changes |
|
93 | requesting all changes | |
94 | adding changesets |
|
94 | adding changesets | |
95 | adding manifests |
|
95 | adding manifests | |
96 | adding file changes |
|
96 | adding file changes | |
97 | added 11 changesets with 11 changes to 2 files |
|
97 | added 11 changesets with 11 changes to 2 files | |
98 | updating to branch default |
|
98 | updating to branch default | |
99 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
99 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 | $ hg -R g verify |
|
100 | $ hg -R g verify | |
101 | checking changesets |
|
101 | checking changesets | |
102 | checking manifests |
|
102 | checking manifests | |
103 | crosschecking files in changesets and manifests |
|
103 | crosschecking files in changesets and manifests | |
104 | checking files |
|
104 | checking files | |
105 | 2 files, 11 changesets, 11 total revisions |
|
105 | 2 files, 11 changesets, 11 total revisions | |
106 |
|
106 | |||
107 | Invalid dest '' with --pull must abort (issue2528): |
|
107 | Invalid dest '' with --pull must abort (issue2528): | |
108 |
|
108 | |||
109 | $ hg clone --pull a '' |
|
109 | $ hg clone --pull a '' | |
110 | abort: No such file or directory |
|
110 | abort: No such file or directory | |
111 | [255] |
|
111 | [255] | |
112 |
|
112 | |||
113 | Clone to '.': |
|
113 | Clone to '.': | |
114 |
|
114 | |||
115 | $ mkdir h |
|
115 | $ mkdir h | |
116 | $ cd h |
|
116 | $ cd h | |
117 | $ hg clone ../a . |
|
117 | $ hg clone ../a . | |
118 | updating to branch default |
|
118 | updating to branch default | |
119 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 | $ cd .. |
|
120 | $ cd .. | |
121 |
|
121 | |||
122 |
|
122 | |||
123 | *** Tests for option -u *** |
|
123 | *** Tests for option -u *** | |
124 |
|
124 | |||
125 | Adding some more history to repo a: |
|
125 | Adding some more history to repo a: | |
126 |
|
126 | |||
127 | $ cd a |
|
127 | $ cd a | |
128 | $ hg tag ref1 |
|
128 | $ hg tag ref1 | |
129 | $ echo the quick brown fox >a |
|
129 | $ echo the quick brown fox >a | |
130 | $ hg ci -m "hacked default" |
|
130 | $ hg ci -m "hacked default" | |
131 | $ hg up ref1 |
|
131 | $ hg up ref1 | |
132 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
132 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
133 | $ hg branch stable |
|
133 | $ hg branch stable | |
134 | marked working directory as branch stable |
|
134 | marked working directory as branch stable | |
135 | $ echo some text >a |
|
135 | $ echo some text >a | |
136 | $ hg ci -m "starting branch stable" |
|
136 | $ hg ci -m "starting branch stable" | |
137 | $ hg tag ref2 |
|
137 | $ hg tag ref2 | |
138 | $ echo some more text >a |
|
138 | $ echo some more text >a | |
139 | $ hg ci -m "another change for branch stable" |
|
139 | $ hg ci -m "another change for branch stable" | |
140 | $ hg up ref2 |
|
140 | $ hg up ref2 | |
141 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
141 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
142 | $ hg parents |
|
142 | $ hg parents | |
143 | changeset: 13:e8ece76546a6 |
|
143 | changeset: 13:e8ece76546a6 | |
144 | branch: stable |
|
144 | branch: stable | |
145 | tag: ref2 |
|
145 | tag: ref2 | |
146 | parent: 10:a7949464abda |
|
146 | parent: 10:a7949464abda | |
147 | user: test |
|
147 | user: test | |
148 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
148 | date: Thu Jan 01 00:00:00 1970 +0000 | |
149 | summary: starting branch stable |
|
149 | summary: starting branch stable | |
150 |
|
150 | |||
151 |
|
151 | |||
152 | Repo a has two heads: |
|
152 | Repo a has two heads: | |
153 |
|
153 | |||
154 | $ hg heads |
|
154 | $ hg heads | |
155 | changeset: 15:0aae7cf88f0d |
|
155 | changeset: 15:0aae7cf88f0d | |
156 | branch: stable |
|
156 | branch: stable | |
157 | tag: tip |
|
157 | tag: tip | |
158 | user: test |
|
158 | user: test | |
159 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
159 | date: Thu Jan 01 00:00:00 1970 +0000 | |
160 | summary: another change for branch stable |
|
160 | summary: another change for branch stable | |
161 |
|
161 | |||
162 | changeset: 12:f21241060d6a |
|
162 | changeset: 12:f21241060d6a | |
163 | user: test |
|
163 | user: test | |
164 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
164 | date: Thu Jan 01 00:00:00 1970 +0000 | |
165 | summary: hacked default |
|
165 | summary: hacked default | |
166 |
|
166 | |||
167 |
|
167 | |||
168 | $ cd .. |
|
168 | $ cd .. | |
169 |
|
169 | |||
170 |
|
170 | |||
171 | Testing --noupdate with --updaterev (must abort): |
|
171 | Testing --noupdate with --updaterev (must abort): | |
172 |
|
172 | |||
173 | $ hg clone --noupdate --updaterev 1 a ua |
|
173 | $ hg clone --noupdate --updaterev 1 a ua | |
174 | abort: cannot specify both --noupdate and --updaterev |
|
174 | abort: cannot specify both --noupdate and --updaterev | |
175 | [255] |
|
175 | [255] | |
176 |
|
176 | |||
177 |
|
177 | |||
178 | Testing clone -u: |
|
178 | Testing clone -u: | |
179 |
|
179 | |||
180 | $ hg clone -u . a ua |
|
180 | $ hg clone -u . a ua | |
181 | updating to branch stable |
|
181 | updating to branch stable | |
182 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
182 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
183 |
|
183 | |||
184 | Repo ua has both heads: |
|
184 | Repo ua has both heads: | |
185 |
|
185 | |||
186 | $ hg -R ua heads |
|
186 | $ hg -R ua heads | |
187 | changeset: 15:0aae7cf88f0d |
|
187 | changeset: 15:0aae7cf88f0d | |
188 | branch: stable |
|
188 | branch: stable | |
189 | tag: tip |
|
189 | tag: tip | |
190 | user: test |
|
190 | user: test | |
191 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
191 | date: Thu Jan 01 00:00:00 1970 +0000 | |
192 | summary: another change for branch stable |
|
192 | summary: another change for branch stable | |
193 |
|
193 | |||
194 | changeset: 12:f21241060d6a |
|
194 | changeset: 12:f21241060d6a | |
195 | user: test |
|
195 | user: test | |
196 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
196 | date: Thu Jan 01 00:00:00 1970 +0000 | |
197 | summary: hacked default |
|
197 | summary: hacked default | |
198 |
|
198 | |||
199 |
|
199 | |||
200 | Same revision checked out in repo a and ua: |
|
200 | Same revision checked out in repo a and ua: | |
201 |
|
201 | |||
202 | $ hg -R a parents --template "{node|short}\n" |
|
202 | $ hg -R a parents --template "{node|short}\n" | |
203 | e8ece76546a6 |
|
203 | e8ece76546a6 | |
204 | $ hg -R ua parents --template "{node|short}\n" |
|
204 | $ hg -R ua parents --template "{node|short}\n" | |
205 | e8ece76546a6 |
|
205 | e8ece76546a6 | |
206 |
|
206 | |||
207 | $ rm -r ua |
|
207 | $ rm -r ua | |
208 |
|
208 | |||
209 |
|
209 | |||
210 | Testing clone --pull -u: |
|
210 | Testing clone --pull -u: | |
211 |
|
211 | |||
212 | $ hg clone --pull -u . a ua |
|
212 | $ hg clone --pull -u . a ua | |
213 | requesting all changes |
|
213 | requesting all changes | |
214 | adding changesets |
|
214 | adding changesets | |
215 | adding manifests |
|
215 | adding manifests | |
216 | adding file changes |
|
216 | adding file changes | |
217 | added 16 changesets with 16 changes to 3 files (+1 heads) |
|
217 | added 16 changesets with 16 changes to 3 files (+1 heads) | |
218 | updating to branch stable |
|
218 | updating to branch stable | |
219 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
219 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
220 |
|
220 | |||
221 | Repo ua has both heads: |
|
221 | Repo ua has both heads: | |
222 |
|
222 | |||
223 | $ hg -R ua heads |
|
223 | $ hg -R ua heads | |
224 | changeset: 15:0aae7cf88f0d |
|
224 | changeset: 15:0aae7cf88f0d | |
225 | branch: stable |
|
225 | branch: stable | |
226 | tag: tip |
|
226 | tag: tip | |
227 | user: test |
|
227 | user: test | |
228 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
228 | date: Thu Jan 01 00:00:00 1970 +0000 | |
229 | summary: another change for branch stable |
|
229 | summary: another change for branch stable | |
230 |
|
230 | |||
231 | changeset: 12:f21241060d6a |
|
231 | changeset: 12:f21241060d6a | |
232 | user: test |
|
232 | user: test | |
233 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
233 | date: Thu Jan 01 00:00:00 1970 +0000 | |
234 | summary: hacked default |
|
234 | summary: hacked default | |
235 |
|
235 | |||
236 |
|
236 | |||
237 | Same revision checked out in repo a and ua: |
|
237 | Same revision checked out in repo a and ua: | |
238 |
|
238 | |||
239 | $ hg -R a parents --template "{node|short}\n" |
|
239 | $ hg -R a parents --template "{node|short}\n" | |
240 | e8ece76546a6 |
|
240 | e8ece76546a6 | |
241 | $ hg -R ua parents --template "{node|short}\n" |
|
241 | $ hg -R ua parents --template "{node|short}\n" | |
242 | e8ece76546a6 |
|
242 | e8ece76546a6 | |
243 |
|
243 | |||
244 | $ rm -r ua |
|
244 | $ rm -r ua | |
245 |
|
245 | |||
246 |
|
246 | |||
247 | Testing clone -u <branch>: |
|
247 | Testing clone -u <branch>: | |
248 |
|
248 | |||
249 | $ hg clone -u stable a ua |
|
249 | $ hg clone -u stable a ua | |
250 | updating to branch stable |
|
250 | updating to branch stable | |
251 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
251 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
252 |
|
252 | |||
253 | Repo ua has both heads: |
|
253 | Repo ua has both heads: | |
254 |
|
254 | |||
255 | $ hg -R ua heads |
|
255 | $ hg -R ua heads | |
256 | changeset: 15:0aae7cf88f0d |
|
256 | changeset: 15:0aae7cf88f0d | |
257 | branch: stable |
|
257 | branch: stable | |
258 | tag: tip |
|
258 | tag: tip | |
259 | user: test |
|
259 | user: test | |
260 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
260 | date: Thu Jan 01 00:00:00 1970 +0000 | |
261 | summary: another change for branch stable |
|
261 | summary: another change for branch stable | |
262 |
|
262 | |||
263 | changeset: 12:f21241060d6a |
|
263 | changeset: 12:f21241060d6a | |
264 | user: test |
|
264 | user: test | |
265 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
265 | date: Thu Jan 01 00:00:00 1970 +0000 | |
266 | summary: hacked default |
|
266 | summary: hacked default | |
267 |
|
267 | |||
268 |
|
268 | |||
269 | Branch 'stable' is checked out: |
|
269 | Branch 'stable' is checked out: | |
270 |
|
270 | |||
271 | $ hg -R ua parents |
|
271 | $ hg -R ua parents | |
272 | changeset: 15:0aae7cf88f0d |
|
272 | changeset: 15:0aae7cf88f0d | |
273 | branch: stable |
|
273 | branch: stable | |
274 | tag: tip |
|
274 | tag: tip | |
275 | user: test |
|
275 | user: test | |
276 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
276 | date: Thu Jan 01 00:00:00 1970 +0000 | |
277 | summary: another change for branch stable |
|
277 | summary: another change for branch stable | |
278 |
|
278 | |||
279 |
|
279 | |||
280 | $ rm -r ua |
|
280 | $ rm -r ua | |
281 |
|
281 | |||
282 |
|
282 | |||
283 | Testing default checkout: |
|
283 | Testing default checkout: | |
284 |
|
284 | |||
285 | $ hg clone a ua |
|
285 | $ hg clone a ua | |
286 | updating to branch default |
|
286 | updating to branch default | |
287 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
287 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
288 |
|
288 | |||
289 | Repo ua has both heads: |
|
289 | Repo ua has both heads: | |
290 |
|
290 | |||
291 | $ hg -R ua heads |
|
291 | $ hg -R ua heads | |
292 | changeset: 15:0aae7cf88f0d |
|
292 | changeset: 15:0aae7cf88f0d | |
293 | branch: stable |
|
293 | branch: stable | |
294 | tag: tip |
|
294 | tag: tip | |
295 | user: test |
|
295 | user: test | |
296 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
296 | date: Thu Jan 01 00:00:00 1970 +0000 | |
297 | summary: another change for branch stable |
|
297 | summary: another change for branch stable | |
298 |
|
298 | |||
299 | changeset: 12:f21241060d6a |
|
299 | changeset: 12:f21241060d6a | |
300 | user: test |
|
300 | user: test | |
301 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
301 | date: Thu Jan 01 00:00:00 1970 +0000 | |
302 | summary: hacked default |
|
302 | summary: hacked default | |
303 |
|
303 | |||
304 |
|
304 | |||
305 | Branch 'default' is checked out: |
|
305 | Branch 'default' is checked out: | |
306 |
|
306 | |||
307 | $ hg -R ua parents |
|
307 | $ hg -R ua parents | |
308 | changeset: 12:f21241060d6a |
|
308 | changeset: 12:f21241060d6a | |
309 | user: test |
|
309 | user: test | |
310 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
310 | date: Thu Jan 01 00:00:00 1970 +0000 | |
311 | summary: hacked default |
|
311 | summary: hacked default | |
312 |
|
312 | |||
313 |
|
313 | |||
314 | $ rm -r ua |
|
314 | $ rm -r ua | |
315 |
|
315 | |||
316 |
|
316 | |||
317 | Testing #<branch>: |
|
317 | Testing #<branch>: | |
318 |
|
318 | |||
319 | $ hg clone -u . a#stable ua |
|
319 | $ hg clone -u . a#stable ua | |
320 | adding changesets |
|
320 | adding changesets | |
321 | adding manifests |
|
321 | adding manifests | |
322 | adding file changes |
|
322 | adding file changes | |
323 | added 14 changesets with 14 changes to 3 files |
|
323 | added 14 changesets with 14 changes to 3 files | |
324 | updating to branch stable |
|
324 | updating to branch stable | |
325 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
325 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
326 |
|
326 | |||
327 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
327 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
328 |
|
328 | |||
329 | $ hg -R ua heads |
|
329 | $ hg -R ua heads | |
330 | changeset: 13:0aae7cf88f0d |
|
330 | changeset: 13:0aae7cf88f0d | |
331 | branch: stable |
|
331 | branch: stable | |
332 | tag: tip |
|
332 | tag: tip | |
333 | user: test |
|
333 | user: test | |
334 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
334 | date: Thu Jan 01 00:00:00 1970 +0000 | |
335 | summary: another change for branch stable |
|
335 | summary: another change for branch stable | |
336 |
|
336 | |||
337 | changeset: 10:a7949464abda |
|
337 | changeset: 10:a7949464abda | |
338 | user: test |
|
338 | user: test | |
339 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
339 | date: Thu Jan 01 00:00:00 1970 +0000 | |
340 | summary: test |
|
340 | summary: test | |
341 |
|
341 | |||
342 |
|
342 | |||
343 | Same revision checked out in repo a and ua: |
|
343 | Same revision checked out in repo a and ua: | |
344 |
|
344 | |||
345 | $ hg -R a parents --template "{node|short}\n" |
|
345 | $ hg -R a parents --template "{node|short}\n" | |
346 | e8ece76546a6 |
|
346 | e8ece76546a6 | |
347 | $ hg -R ua parents --template "{node|short}\n" |
|
347 | $ hg -R ua parents --template "{node|short}\n" | |
348 | e8ece76546a6 |
|
348 | e8ece76546a6 | |
349 |
|
349 | |||
350 | $ rm -r ua |
|
350 | $ rm -r ua | |
351 |
|
351 | |||
352 |
|
352 | |||
353 | Testing -u -r <branch>: |
|
353 | Testing -u -r <branch>: | |
354 |
|
354 | |||
355 | $ hg clone -u . -r stable a ua |
|
355 | $ hg clone -u . -r stable a ua | |
356 | adding changesets |
|
356 | adding changesets | |
357 | adding manifests |
|
357 | adding manifests | |
358 | adding file changes |
|
358 | adding file changes | |
359 | added 14 changesets with 14 changes to 3 files |
|
359 | added 14 changesets with 14 changes to 3 files | |
360 | updating to branch stable |
|
360 | updating to branch stable | |
361 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
361 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
362 |
|
362 | |||
363 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
363 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
364 |
|
364 | |||
365 | $ hg -R ua heads |
|
365 | $ hg -R ua heads | |
366 | changeset: 13:0aae7cf88f0d |
|
366 | changeset: 13:0aae7cf88f0d | |
367 | branch: stable |
|
367 | branch: stable | |
368 | tag: tip |
|
368 | tag: tip | |
369 | user: test |
|
369 | user: test | |
370 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
370 | date: Thu Jan 01 00:00:00 1970 +0000 | |
371 | summary: another change for branch stable |
|
371 | summary: another change for branch stable | |
372 |
|
372 | |||
373 | changeset: 10:a7949464abda |
|
373 | changeset: 10:a7949464abda | |
374 | user: test |
|
374 | user: test | |
375 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
375 | date: Thu Jan 01 00:00:00 1970 +0000 | |
376 | summary: test |
|
376 | summary: test | |
377 |
|
377 | |||
378 |
|
378 | |||
379 | Same revision checked out in repo a and ua: |
|
379 | Same revision checked out in repo a and ua: | |
380 |
|
380 | |||
381 | $ hg -R a parents --template "{node|short}\n" |
|
381 | $ hg -R a parents --template "{node|short}\n" | |
382 | e8ece76546a6 |
|
382 | e8ece76546a6 | |
383 | $ hg -R ua parents --template "{node|short}\n" |
|
383 | $ hg -R ua parents --template "{node|short}\n" | |
384 | e8ece76546a6 |
|
384 | e8ece76546a6 | |
385 |
|
385 | |||
386 | $ rm -r ua |
|
386 | $ rm -r ua | |
387 |
|
387 | |||
388 |
|
388 | |||
389 | Testing -r <branch>: |
|
389 | Testing -r <branch>: | |
390 |
|
390 | |||
391 | $ hg clone -r stable a ua |
|
391 | $ hg clone -r stable a ua | |
392 | adding changesets |
|
392 | adding changesets | |
393 | adding manifests |
|
393 | adding manifests | |
394 | adding file changes |
|
394 | adding file changes | |
395 | added 14 changesets with 14 changes to 3 files |
|
395 | added 14 changesets with 14 changes to 3 files | |
396 | updating to branch stable |
|
396 | updating to branch stable | |
397 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
397 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
398 |
|
398 | |||
399 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): |
|
399 | Repo ua has branch 'stable' and 'default' (was changed in fd511e9eeea6): | |
400 |
|
400 | |||
401 | $ hg -R ua heads |
|
401 | $ hg -R ua heads | |
402 | changeset: 13:0aae7cf88f0d |
|
402 | changeset: 13:0aae7cf88f0d | |
403 | branch: stable |
|
403 | branch: stable | |
404 | tag: tip |
|
404 | tag: tip | |
405 | user: test |
|
405 | user: test | |
406 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
406 | date: Thu Jan 01 00:00:00 1970 +0000 | |
407 | summary: another change for branch stable |
|
407 | summary: another change for branch stable | |
408 |
|
408 | |||
409 | changeset: 10:a7949464abda |
|
409 | changeset: 10:a7949464abda | |
410 | user: test |
|
410 | user: test | |
411 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:00 1970 +0000 | |
412 | summary: test |
|
412 | summary: test | |
413 |
|
413 | |||
414 |
|
414 | |||
415 | Branch 'stable' is checked out: |
|
415 | Branch 'stable' is checked out: | |
416 |
|
416 | |||
417 | $ hg -R ua parents |
|
417 | $ hg -R ua parents | |
418 | changeset: 13:0aae7cf88f0d |
|
418 | changeset: 13:0aae7cf88f0d | |
419 | branch: stable |
|
419 | branch: stable | |
420 | tag: tip |
|
420 | tag: tip | |
421 | user: test |
|
421 | user: test | |
422 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
422 | date: Thu Jan 01 00:00:00 1970 +0000 | |
423 | summary: another change for branch stable |
|
423 | summary: another change for branch stable | |
424 |
|
424 | |||
425 |
|
425 | |||
426 | $ rm -r ua |
|
426 | $ rm -r ua | |
427 |
|
427 | |||
428 |
|
428 | |||
429 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not |
|
429 | Issue2267: Error in 1.6 hg.py: TypeError: 'NoneType' object is not | |
430 | iterable in addbranchrevs() |
|
430 | iterable in addbranchrevs() | |
431 |
|
431 | |||
432 | $ cat <<EOF > simpleclone.py |
|
432 | $ cat <<EOF > simpleclone.py | |
433 | > from mercurial import ui, hg |
|
433 | > from mercurial import ui, hg | |
434 | > myui = ui.ui() |
|
434 | > myui = ui.ui() | |
435 | > repo = hg.repository(myui, 'a') |
|
435 | > repo = hg.repository(myui, 'a') | |
436 | > hg.clone(myui, {}, repo, dest="ua") |
|
436 | > hg.clone(myui, {}, repo, dest="ua") | |
437 | > EOF |
|
437 | > EOF | |
438 |
|
438 | |||
439 | $ python simpleclone.py |
|
439 | $ python simpleclone.py | |
440 | updating to branch default |
|
440 | updating to branch default | |
441 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
441 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
442 |
|
442 | |||
443 | $ rm -r ua |
|
443 | $ rm -r ua | |
444 |
|
444 | |||
445 | $ cat <<EOF > branchclone.py |
|
445 | $ cat <<EOF > branchclone.py | |
446 | > from mercurial import ui, hg |
|
446 | > from mercurial import ui, hg | |
447 | > myui = ui.ui() |
|
447 | > myui = ui.ui() | |
448 | > repo = hg.repository(myui, 'a') |
|
448 | > repo = hg.repository(myui, 'a') | |
449 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) |
|
449 | > hg.clone(myui, {}, repo, dest="ua", branch=["stable",]) | |
450 | > EOF |
|
450 | > EOF | |
451 |
|
451 | |||
452 | $ python branchclone.py |
|
452 | $ python branchclone.py | |
453 | adding changesets |
|
453 | adding changesets | |
454 | adding manifests |
|
454 | adding manifests | |
455 | adding file changes |
|
455 | adding file changes | |
456 | added 14 changesets with 14 changes to 3 files |
|
456 | added 14 changesets with 14 changes to 3 files | |
457 | updating to branch stable |
|
457 | updating to branch stable | |
458 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
458 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
459 | $ rm -r ua |
|
459 | $ rm -r ua |
@@ -1,395 +1,395 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > graphlog= |
|
3 | > graphlog= | |
4 | > rebase= |
|
4 | > rebase= | |
5 | > |
|
5 | > | |
6 | > [alias] |
|
6 | > [alias] | |
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
7 | > tglog = log -G --template "{rev}: '{desc}' {branches}\n" | |
8 | > EOF |
|
8 | > EOF | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | $ hg init a |
|
11 | $ hg init a | |
12 | $ cd a |
|
12 | $ cd a | |
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg |
|
13 | $ hg unbundle $TESTDIR/bundles/rebase.hg | |
14 | adding changesets |
|
14 | adding changesets | |
15 | adding manifests |
|
15 | adding manifests | |
16 | adding file changes |
|
16 | adding file changes | |
17 | added 8 changesets with 7 changes to 7 files (+2 heads) |
|
17 | added 8 changesets with 7 changes to 7 files (+2 heads) | |
18 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
18 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
19 | $ hg up tip |
|
19 | $ hg up tip | |
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 |
|
21 | |||
22 | $ cd .. |
|
22 | $ cd .. | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | Rebasing D onto H detaching from C: |
|
25 | Rebasing D onto H detaching from C: | |
26 |
|
26 | |||
27 | $ hg clone -q -u . a a1 |
|
27 | $ hg clone -q -u . a a1 | |
28 | $ cd a1 |
|
28 | $ cd a1 | |
29 |
|
29 | |||
30 | $ hg tglog |
|
30 | $ hg tglog | |
31 | @ 7: 'H' |
|
31 | @ 7: 'H' | |
32 | | |
|
32 | | | |
33 | | o 6: 'G' |
|
33 | | o 6: 'G' | |
34 | |/| |
|
34 | |/| | |
35 | o | 5: 'F' |
|
35 | o | 5: 'F' | |
36 | | | |
|
36 | | | | |
37 | | o 4: 'E' |
|
37 | | o 4: 'E' | |
38 | |/ |
|
38 | |/ | |
39 | | o 3: 'D' |
|
39 | | o 3: 'D' | |
40 | | | |
|
40 | | | | |
41 | | o 2: 'C' |
|
41 | | o 2: 'C' | |
42 | | | |
|
42 | | | | |
43 | | o 1: 'B' |
|
43 | | o 1: 'B' | |
44 | |/ |
|
44 | |/ | |
45 | o 0: 'A' |
|
45 | o 0: 'A' | |
46 |
|
46 | |||
47 | $ hg rebase --detach -s 3 -d 7 |
|
47 | $ hg rebase --detach -s 3 -d 7 | |
48 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) |
|
48 | saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob) | |
49 |
|
49 | |||
50 | $ hg tglog |
|
50 | $ hg tglog | |
51 | @ 7: 'D' |
|
51 | @ 7: 'D' | |
52 | | |
|
52 | | | |
53 | o 6: 'H' |
|
53 | o 6: 'H' | |
54 | | |
|
54 | | | |
55 | | o 5: 'G' |
|
55 | | o 5: 'G' | |
56 | |/| |
|
56 | |/| | |
57 | o | 4: 'F' |
|
57 | o | 4: 'F' | |
58 | | | |
|
58 | | | | |
59 | | o 3: 'E' |
|
59 | | o 3: 'E' | |
60 | |/ |
|
60 | |/ | |
61 | | o 2: 'C' |
|
61 | | o 2: 'C' | |
62 | | | |
|
62 | | | | |
63 | | o 1: 'B' |
|
63 | | o 1: 'B' | |
64 | |/ |
|
64 | |/ | |
65 | o 0: 'A' |
|
65 | o 0: 'A' | |
66 |
|
66 | |||
67 | $ hg manifest |
|
67 | $ hg manifest | |
68 | A |
|
68 | A | |
69 | D |
|
69 | D | |
70 | F |
|
70 | F | |
71 | H |
|
71 | H | |
72 |
|
72 | |||
73 | $ cd .. |
|
73 | $ cd .. | |
74 |
|
74 | |||
75 |
|
75 | |||
76 | Rebasing C onto H detaching from B: |
|
76 | Rebasing C onto H detaching from B: | |
77 |
|
77 | |||
78 | $ hg clone -q -u . a a2 |
|
78 | $ hg clone -q -u . a a2 | |
79 | $ cd a2 |
|
79 | $ cd a2 | |
80 |
|
80 | |||
81 | $ hg tglog |
|
81 | $ hg tglog | |
82 | @ 7: 'H' |
|
82 | @ 7: 'H' | |
83 | | |
|
83 | | | |
84 | | o 6: 'G' |
|
84 | | o 6: 'G' | |
85 | |/| |
|
85 | |/| | |
86 | o | 5: 'F' |
|
86 | o | 5: 'F' | |
87 | | | |
|
87 | | | | |
88 | | o 4: 'E' |
|
88 | | o 4: 'E' | |
89 | |/ |
|
89 | |/ | |
90 | | o 3: 'D' |
|
90 | | o 3: 'D' | |
91 | | | |
|
91 | | | | |
92 | | o 2: 'C' |
|
92 | | o 2: 'C' | |
93 | | | |
|
93 | | | | |
94 | | o 1: 'B' |
|
94 | | o 1: 'B' | |
95 | |/ |
|
95 | |/ | |
96 | o 0: 'A' |
|
96 | o 0: 'A' | |
97 |
|
97 | |||
98 | $ hg rebase --detach -s 2 -d 7 |
|
98 | $ hg rebase --detach -s 2 -d 7 | |
99 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) |
|
99 | saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob) | |
100 |
|
100 | |||
101 | $ hg tglog |
|
101 | $ hg tglog | |
102 | @ 7: 'D' |
|
102 | @ 7: 'D' | |
103 | | |
|
103 | | | |
104 | o 6: 'C' |
|
104 | o 6: 'C' | |
105 | | |
|
105 | | | |
106 | o 5: 'H' |
|
106 | o 5: 'H' | |
107 | | |
|
107 | | | |
108 | | o 4: 'G' |
|
108 | | o 4: 'G' | |
109 | |/| |
|
109 | |/| | |
110 | o | 3: 'F' |
|
110 | o | 3: 'F' | |
111 | | | |
|
111 | | | | |
112 | | o 2: 'E' |
|
112 | | o 2: 'E' | |
113 | |/ |
|
113 | |/ | |
114 | | o 1: 'B' |
|
114 | | o 1: 'B' | |
115 | |/ |
|
115 | |/ | |
116 | o 0: 'A' |
|
116 | o 0: 'A' | |
117 |
|
117 | |||
118 | $ hg manifest |
|
118 | $ hg manifest | |
119 | A |
|
119 | A | |
120 | C |
|
120 | C | |
121 | D |
|
121 | D | |
122 | F |
|
122 | F | |
123 | H |
|
123 | H | |
124 |
|
124 | |||
125 | $ cd .. |
|
125 | $ cd .. | |
126 |
|
126 | |||
127 |
|
127 | |||
128 | Rebasing B onto H using detach (same as not using it): |
|
128 | Rebasing B onto H using detach (same as not using it): | |
129 |
|
129 | |||
130 | $ hg clone -q -u . a a3 |
|
130 | $ hg clone -q -u . a a3 | |
131 | $ cd a3 |
|
131 | $ cd a3 | |
132 |
|
132 | |||
133 | $ hg tglog |
|
133 | $ hg tglog | |
134 | @ 7: 'H' |
|
134 | @ 7: 'H' | |
135 | | |
|
135 | | | |
136 | | o 6: 'G' |
|
136 | | o 6: 'G' | |
137 | |/| |
|
137 | |/| | |
138 | o | 5: 'F' |
|
138 | o | 5: 'F' | |
139 | | | |
|
139 | | | | |
140 | | o 4: 'E' |
|
140 | | o 4: 'E' | |
141 | |/ |
|
141 | |/ | |
142 | | o 3: 'D' |
|
142 | | o 3: 'D' | |
143 | | | |
|
143 | | | | |
144 | | o 2: 'C' |
|
144 | | o 2: 'C' | |
145 | | | |
|
145 | | | | |
146 | | o 1: 'B' |
|
146 | | o 1: 'B' | |
147 | |/ |
|
147 | |/ | |
148 | o 0: 'A' |
|
148 | o 0: 'A' | |
149 |
|
149 | |||
150 | $ hg rebase --detach -s 1 -d 7 |
|
150 | $ hg rebase --detach -s 1 -d 7 | |
151 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) |
|
151 | saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob) | |
152 |
|
152 | |||
153 | $ hg tglog |
|
153 | $ hg tglog | |
154 | @ 7: 'D' |
|
154 | @ 7: 'D' | |
155 | | |
|
155 | | | |
156 | o 6: 'C' |
|
156 | o 6: 'C' | |
157 | | |
|
157 | | | |
158 | o 5: 'B' |
|
158 | o 5: 'B' | |
159 | | |
|
159 | | | |
160 | o 4: 'H' |
|
160 | o 4: 'H' | |
161 | | |
|
161 | | | |
162 | | o 3: 'G' |
|
162 | | o 3: 'G' | |
163 | |/| |
|
163 | |/| | |
164 | o | 2: 'F' |
|
164 | o | 2: 'F' | |
165 | | | |
|
165 | | | | |
166 | | o 1: 'E' |
|
166 | | o 1: 'E' | |
167 | |/ |
|
167 | |/ | |
168 | o 0: 'A' |
|
168 | o 0: 'A' | |
169 |
|
169 | |||
170 | $ hg manifest |
|
170 | $ hg manifest | |
171 | A |
|
171 | A | |
172 | B |
|
172 | B | |
173 | C |
|
173 | C | |
174 | D |
|
174 | D | |
175 | F |
|
175 | F | |
176 | H |
|
176 | H | |
177 |
|
177 | |||
178 | $ cd .. |
|
178 | $ cd .. | |
179 |
|
179 | |||
180 |
|
180 | |||
181 | Rebasing C onto H detaching from B and collapsing: |
|
181 | Rebasing C onto H detaching from B and collapsing: | |
182 |
|
182 | |||
183 | $ hg clone -q -u . a a4 |
|
183 | $ hg clone -q -u . a a4 | |
184 | $ cd a4 |
|
184 | $ cd a4 | |
185 |
|
185 | |||
186 | $ hg tglog |
|
186 | $ hg tglog | |
187 | @ 7: 'H' |
|
187 | @ 7: 'H' | |
188 | | |
|
188 | | | |
189 | | o 6: 'G' |
|
189 | | o 6: 'G' | |
190 | |/| |
|
190 | |/| | |
191 | o | 5: 'F' |
|
191 | o | 5: 'F' | |
192 | | | |
|
192 | | | | |
193 | | o 4: 'E' |
|
193 | | o 4: 'E' | |
194 | |/ |
|
194 | |/ | |
195 | | o 3: 'D' |
|
195 | | o 3: 'D' | |
196 | | | |
|
196 | | | | |
197 | | o 2: 'C' |
|
197 | | o 2: 'C' | |
198 | | | |
|
198 | | | | |
199 | | o 1: 'B' |
|
199 | | o 1: 'B' | |
200 | |/ |
|
200 | |/ | |
201 | o 0: 'A' |
|
201 | o 0: 'A' | |
202 |
|
202 | |||
203 | $ hg rebase --detach --collapse -s 2 -d 7 |
|
203 | $ hg rebase --detach --collapse -s 2 -d 7 | |
204 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) |
|
204 | saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob) | |
205 |
|
205 | |||
206 | $ hg tglog |
|
206 | $ hg tglog | |
207 | @ 6: 'Collapsed revision |
|
207 | @ 6: 'Collapsed revision | |
208 | | * C |
|
208 | | * C | |
209 | | * D' |
|
209 | | * D' | |
210 | o 5: 'H' |
|
210 | o 5: 'H' | |
211 | | |
|
211 | | | |
212 | | o 4: 'G' |
|
212 | | o 4: 'G' | |
213 | |/| |
|
213 | |/| | |
214 | o | 3: 'F' |
|
214 | o | 3: 'F' | |
215 | | | |
|
215 | | | | |
216 | | o 2: 'E' |
|
216 | | o 2: 'E' | |
217 | |/ |
|
217 | |/ | |
218 | | o 1: 'B' |
|
218 | | o 1: 'B' | |
219 | |/ |
|
219 | |/ | |
220 | o 0: 'A' |
|
220 | o 0: 'A' | |
221 |
|
221 | |||
222 | $ hg manifest |
|
222 | $ hg manifest | |
223 | A |
|
223 | A | |
224 | C |
|
224 | C | |
225 | D |
|
225 | D | |
226 | F |
|
226 | F | |
227 | H |
|
227 | H | |
228 |
|
228 | |||
229 | $ cd .. |
|
229 | $ cd .. | |
230 |
|
230 | |||
231 | Rebasing across null as ancestor |
|
231 | Rebasing across null as ancestor | |
232 | $ hg clone -q -U a a5 |
|
232 | $ hg clone -q -U a a5 | |
233 |
|
233 | |||
234 | $ cd a5 |
|
234 | $ cd a5 | |
235 |
|
235 | |||
236 | $ echo x > x |
|
236 | $ echo x > x | |
237 |
|
237 | |||
238 | $ hg add x |
|
238 | $ hg add x | |
239 |
|
239 | |||
240 | $ hg ci -m "extra branch" |
|
240 | $ hg ci -m "extra branch" | |
241 | created new head |
|
241 | created new head | |
242 |
|
242 | |||
243 | $ hg tglog |
|
243 | $ hg tglog | |
244 | @ 8: 'extra branch' |
|
244 | @ 8: 'extra branch' | |
245 |
|
245 | |||
246 | o 7: 'H' |
|
246 | o 7: 'H' | |
247 | | |
|
247 | | | |
248 | | o 6: 'G' |
|
248 | | o 6: 'G' | |
249 | |/| |
|
249 | |/| | |
250 | o | 5: 'F' |
|
250 | o | 5: 'F' | |
251 | | | |
|
251 | | | | |
252 | | o 4: 'E' |
|
252 | | o 4: 'E' | |
253 | |/ |
|
253 | |/ | |
254 | | o 3: 'D' |
|
254 | | o 3: 'D' | |
255 | | | |
|
255 | | | | |
256 | | o 2: 'C' |
|
256 | | o 2: 'C' | |
257 | | | |
|
257 | | | | |
258 | | o 1: 'B' |
|
258 | | o 1: 'B' | |
259 | |/ |
|
259 | |/ | |
260 | o 0: 'A' |
|
260 | o 0: 'A' | |
261 |
|
261 | |||
262 | $ hg rebase --detach -s 1 -d tip |
|
262 | $ hg rebase --detach -s 1 -d tip | |
263 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) |
|
263 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob) | |
264 |
|
264 | |||
265 | $ hg tglog |
|
265 | $ hg tglog | |
266 | @ 8: 'D' |
|
266 | @ 8: 'D' | |
267 | | |
|
267 | | | |
268 | o 7: 'C' |
|
268 | o 7: 'C' | |
269 | | |
|
269 | | | |
270 | o 6: 'B' |
|
270 | o 6: 'B' | |
271 | | |
|
271 | | | |
272 | o 5: 'extra branch' |
|
272 | o 5: 'extra branch' | |
273 |
|
273 | |||
274 | o 4: 'H' |
|
274 | o 4: 'H' | |
275 | | |
|
275 | | | |
276 | | o 3: 'G' |
|
276 | | o 3: 'G' | |
277 | |/| |
|
277 | |/| | |
278 | o | 2: 'F' |
|
278 | o | 2: 'F' | |
279 | | | |
|
279 | | | | |
280 | | o 1: 'E' |
|
280 | | o 1: 'E' | |
281 | |/ |
|
281 | |/ | |
282 | o 0: 'A' |
|
282 | o 0: 'A' | |
283 |
|
283 | |||
284 |
|
284 | |||
285 | $ hg rebase -d 5 -s 7 |
|
285 | $ hg rebase -d 5 -s 7 | |
286 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/13547172c9c0-backup.hg (glob) |
|
286 | saved backup bundle to $TESTTMP/a5/.hg/strip-backup/13547172c9c0-backup.hg (glob) | |
287 | $ hg tglog |
|
287 | $ hg tglog | |
288 | @ 8: 'D' |
|
288 | @ 8: 'D' | |
289 | | |
|
289 | | | |
290 | o 7: 'C' |
|
290 | o 7: 'C' | |
291 | | |
|
291 | | | |
292 | | o 6: 'B' |
|
292 | | o 6: 'B' | |
293 | |/ |
|
293 | |/ | |
294 | o 5: 'extra branch' |
|
294 | o 5: 'extra branch' | |
295 |
|
295 | |||
296 | o 4: 'H' |
|
296 | o 4: 'H' | |
297 | | |
|
297 | | | |
298 | | o 3: 'G' |
|
298 | | o 3: 'G' | |
299 | |/| |
|
299 | |/| | |
300 | o | 2: 'F' |
|
300 | o | 2: 'F' | |
301 | | | |
|
301 | | | | |
302 | | o 1: 'E' |
|
302 | | o 1: 'E' | |
303 | |/ |
|
303 | |/ | |
304 | o 0: 'A' |
|
304 | o 0: 'A' | |
305 |
|
305 | |||
306 | $ cd .. |
|
306 | $ cd .. | |
307 |
|
307 | |||
308 | Verify that target is not selected as external rev (issue3085) |
|
308 | Verify that target is not selected as external rev (issue3085) | |
309 |
|
309 | |||
310 | $ hg clone -q -U a a6 |
|
310 | $ hg clone -q -U a a6 | |
311 | $ cd a6 |
|
311 | $ cd a6 | |
312 | $ hg up -q 6 |
|
312 | $ hg up -q 6 | |
313 |
|
313 | |||
314 | $ echo "I" >> E |
|
314 | $ echo "I" >> E | |
315 | $ hg ci -m "I" |
|
315 | $ hg ci -m "I" | |
316 | $ hg merge 7 |
|
316 | $ hg merge 7 | |
317 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
317 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
318 | (branch merge, don't forget to commit) |
|
318 | (branch merge, don't forget to commit) | |
319 | $ hg ci -m "Merge" |
|
319 | $ hg ci -m "Merge" | |
320 | $ echo "J" >> F |
|
320 | $ echo "J" >> F | |
321 | $ hg ci -m "J" |
|
321 | $ hg ci -m "J" | |
322 |
|
322 | |||
323 | $ hg rebase -s 8 -d 7 --collapse --detach --config ui.merge=internal:other |
|
323 | $ hg rebase -s 8 -d 7 --collapse --detach --config ui.merge=internal:other | |
324 | remote changed E which local deleted |
|
324 | remote changed E which local deleted | |
325 | use (c)hanged version or leave (d)eleted? c |
|
325 | use (c)hanged version or leave (d)eleted? c | |
326 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) |
|
326 | saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob) | |
327 |
|
327 | |||
328 | $ hg tglog |
|
328 | $ hg tglog | |
329 | @ 8: 'Collapsed revision |
|
329 | @ 8: 'Collapsed revision | |
330 | | * I |
|
330 | | * I | |
331 | | * Merge |
|
331 | | * Merge | |
332 | | * J' |
|
332 | | * J' | |
333 | o 7: 'H' |
|
333 | o 7: 'H' | |
334 | | |
|
334 | | | |
335 | | o 6: 'G' |
|
335 | | o 6: 'G' | |
336 | |/| |
|
336 | |/| | |
337 | o | 5: 'F' |
|
337 | o | 5: 'F' | |
338 | | | |
|
338 | | | | |
339 | | o 4: 'E' |
|
339 | | o 4: 'E' | |
340 | |/ |
|
340 | |/ | |
341 | | o 3: 'D' |
|
341 | | o 3: 'D' | |
342 | | | |
|
342 | | | | |
343 | | o 2: 'C' |
|
343 | | o 2: 'C' | |
344 | | | |
|
344 | | | | |
345 | | o 1: 'B' |
|
345 | | o 1: 'B' | |
346 | |/ |
|
346 | |/ | |
347 | o 0: 'A' |
|
347 | o 0: 'A' | |
348 |
|
348 | |||
349 |
|
349 | |||
350 | $ hg parents |
|
350 | $ hg parents | |
351 | changeset: 8:9472f4b1d736 |
|
351 | changeset: 8:9472f4b1d736 | |
352 | tag: tip |
|
352 | tag: tip | |
353 | user: test |
|
353 | user: test | |
354 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
354 | date: Thu Jan 01 00:00:00 1970 +0000 | |
355 | summary: Collapsed revision |
|
355 | summary: Collapsed revision | |
356 |
|
356 | |||
357 |
|
357 | |||
358 | $ cd .. |
|
358 | $ cd .. | |
359 |
|
359 | |||
360 | Ensure --continue restores a correct state (issue3046): |
|
360 | Ensure --continue restores a correct state (issue3046): | |
361 | $ hg clone -q a a7 |
|
361 | $ hg clone -q a a7 | |
362 | $ cd a7 |
|
362 | $ cd a7 | |
363 | $ hg up -q 3 |
|
363 | $ hg up -q 3 | |
364 | $ echo 'H2' > H |
|
364 | $ echo 'H2' > H | |
365 | $ hg ci -A -m 'H2' |
|
365 | $ hg ci -A -m 'H2' | |
366 | adding H |
|
366 | adding H | |
367 | $ hg rebase -s 8 -d 7 --detach --config ui.merge=internal:fail |
|
367 | $ hg rebase -s 8 -d 7 --detach --config ui.merge=internal:fail | |
368 | merging H |
|
368 | merging H | |
369 | warning: conflicts during merge. |
|
369 | warning: conflicts during merge. | |
370 | merging H failed! |
|
370 | merging H failed! | |
371 | abort: unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
371 | abort: unresolved conflicts (see hg resolve, then hg rebase --continue) | |
372 | [255] |
|
372 | [255] | |
373 | $ hg resolve --all -t internal:local |
|
373 | $ hg resolve --all -t internal:local | |
374 | $ hg rebase -c |
|
374 | $ hg rebase -c | |
375 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg |
|
375 | saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg (glob) | |
376 | $ hg tglog |
|
376 | $ hg tglog | |
377 | @ 8: 'H2' |
|
377 | @ 8: 'H2' | |
378 | | |
|
378 | | | |
379 | o 7: 'H' |
|
379 | o 7: 'H' | |
380 | | |
|
380 | | | |
381 | | o 6: 'G' |
|
381 | | o 6: 'G' | |
382 | |/| |
|
382 | |/| | |
383 | o | 5: 'F' |
|
383 | o | 5: 'F' | |
384 | | | |
|
384 | | | | |
385 | | o 4: 'E' |
|
385 | | o 4: 'E' | |
386 | |/ |
|
386 | |/ | |
387 | | o 3: 'D' |
|
387 | | o 3: 'D' | |
388 | | | |
|
388 | | | | |
389 | | o 2: 'C' |
|
389 | | o 2: 'C' | |
390 | | | |
|
390 | | | | |
391 | | o 1: 'B' |
|
391 | | o 1: 'B' | |
392 | |/ |
|
392 | |/ | |
393 | o 0: 'A' |
|
393 | o 0: 'A' | |
394 |
|
394 | |||
395 |
|
395 |
@@ -1,477 +1,477 b'' | |||||
1 | Create test repository: |
|
1 | Create test repository: | |
2 |
|
2 | |||
3 | $ hg init repo |
|
3 | $ hg init repo | |
4 | $ cd repo |
|
4 | $ cd repo | |
5 | $ echo x1 > x.txt |
|
5 | $ echo x1 > x.txt | |
6 |
|
6 | |||
7 | $ hg init foo |
|
7 | $ hg init foo | |
8 | $ cd foo |
|
8 | $ cd foo | |
9 | $ echo y1 > y.txt |
|
9 | $ echo y1 > y.txt | |
10 |
|
10 | |||
11 | $ hg init bar |
|
11 | $ hg init bar | |
12 | $ cd bar |
|
12 | $ cd bar | |
13 | $ echo z1 > z.txt |
|
13 | $ echo z1 > z.txt | |
14 |
|
14 | |||
15 | $ cd .. |
|
15 | $ cd .. | |
16 | $ echo 'bar = bar' > .hgsub |
|
16 | $ echo 'bar = bar' > .hgsub | |
17 |
|
17 | |||
18 | $ cd .. |
|
18 | $ cd .. | |
19 | $ echo 'foo = foo' > .hgsub |
|
19 | $ echo 'foo = foo' > .hgsub | |
20 |
|
20 | |||
21 | Add files --- .hgsub files must go first to trigger subrepos: |
|
21 | Add files --- .hgsub files must go first to trigger subrepos: | |
22 |
|
22 | |||
23 | $ hg add -S .hgsub |
|
23 | $ hg add -S .hgsub | |
24 | $ hg add -S foo/.hgsub |
|
24 | $ hg add -S foo/.hgsub | |
25 | $ hg add -S foo/bar |
|
25 | $ hg add -S foo/bar | |
26 | adding foo/bar/z.txt |
|
26 | adding foo/bar/z.txt (glob) | |
27 | $ hg add -S |
|
27 | $ hg add -S | |
28 | adding x.txt |
|
28 | adding x.txt | |
29 | adding foo/y.txt |
|
29 | adding foo/y.txt (glob) | |
30 |
|
30 | |||
31 | Test recursive status without committing anything: |
|
31 | Test recursive status without committing anything: | |
32 |
|
32 | |||
33 | $ hg status -S |
|
33 | $ hg status -S | |
34 | A .hgsub |
|
34 | A .hgsub | |
35 | A foo/.hgsub |
|
35 | A foo/.hgsub | |
36 | A foo/bar/z.txt |
|
36 | A foo/bar/z.txt | |
37 | A foo/y.txt |
|
37 | A foo/y.txt | |
38 | A x.txt |
|
38 | A x.txt | |
39 |
|
39 | |||
40 | Test recursive diff without committing anything: |
|
40 | Test recursive diff without committing anything: | |
41 |
|
41 | |||
42 | $ hg diff --nodates -S foo |
|
42 | $ hg diff --nodates -S foo | |
43 | diff -r 000000000000 foo/.hgsub |
|
43 | diff -r 000000000000 foo/.hgsub | |
44 | --- /dev/null |
|
44 | --- /dev/null | |
45 | +++ b/foo/.hgsub |
|
45 | +++ b/foo/.hgsub | |
46 | @@ -0,0 +1,1 @@ |
|
46 | @@ -0,0 +1,1 @@ | |
47 | +bar = bar |
|
47 | +bar = bar | |
48 | diff -r 000000000000 foo/y.txt |
|
48 | diff -r 000000000000 foo/y.txt | |
49 | --- /dev/null |
|
49 | --- /dev/null | |
50 | +++ b/foo/y.txt |
|
50 | +++ b/foo/y.txt | |
51 | @@ -0,0 +1,1 @@ |
|
51 | @@ -0,0 +1,1 @@ | |
52 | +y1 |
|
52 | +y1 | |
53 | diff -r 000000000000 foo/bar/z.txt |
|
53 | diff -r 000000000000 foo/bar/z.txt | |
54 | --- /dev/null |
|
54 | --- /dev/null | |
55 | +++ b/foo/bar/z.txt |
|
55 | +++ b/foo/bar/z.txt | |
56 | @@ -0,0 +1,1 @@ |
|
56 | @@ -0,0 +1,1 @@ | |
57 | +z1 |
|
57 | +z1 | |
58 |
|
58 | |||
59 | Commits: |
|
59 | Commits: | |
60 |
|
60 | |||
61 | $ hg commit -m fails |
|
61 | $ hg commit -m fails | |
62 | abort: uncommitted changes in subrepo foo |
|
62 | abort: uncommitted changes in subrepo foo | |
63 | (use --subrepos for recursive commit) |
|
63 | (use --subrepos for recursive commit) | |
64 | [255] |
|
64 | [255] | |
65 |
|
65 | |||
66 | The --subrepos flag overwrite the config setting: |
|
66 | The --subrepos flag overwrite the config setting: | |
67 |
|
67 | |||
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos |
|
68 | $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos | |
69 | committing subrepository foo |
|
69 | committing subrepository foo | |
70 | committing subrepository foo/bar |
|
70 | committing subrepository foo/bar (glob) | |
71 |
|
71 | |||
72 | $ cd foo |
|
72 | $ cd foo | |
73 | $ echo y2 >> y.txt |
|
73 | $ echo y2 >> y.txt | |
74 | $ hg commit -m 0-1-0 |
|
74 | $ hg commit -m 0-1-0 | |
75 |
|
75 | |||
76 | $ cd bar |
|
76 | $ cd bar | |
77 | $ echo z2 >> z.txt |
|
77 | $ echo z2 >> z.txt | |
78 | $ hg commit -m 0-1-1 |
|
78 | $ hg commit -m 0-1-1 | |
79 |
|
79 | |||
80 | $ cd .. |
|
80 | $ cd .. | |
81 | $ hg commit -m 0-2-1 |
|
81 | $ hg commit -m 0-2-1 | |
82 | committing subrepository bar |
|
82 | committing subrepository bar | |
83 |
|
83 | |||
84 | $ cd .. |
|
84 | $ cd .. | |
85 | $ hg commit -m 1-2-1 |
|
85 | $ hg commit -m 1-2-1 | |
86 | committing subrepository foo |
|
86 | committing subrepository foo | |
87 |
|
87 | |||
88 | Change working directory: |
|
88 | Change working directory: | |
89 |
|
89 | |||
90 | $ echo y3 >> foo/y.txt |
|
90 | $ echo y3 >> foo/y.txt | |
91 | $ echo z3 >> foo/bar/z.txt |
|
91 | $ echo z3 >> foo/bar/z.txt | |
92 | $ hg status -S |
|
92 | $ hg status -S | |
93 | M foo/bar/z.txt |
|
93 | M foo/bar/z.txt | |
94 | M foo/y.txt |
|
94 | M foo/y.txt | |
95 | $ hg diff --nodates -S |
|
95 | $ hg diff --nodates -S | |
96 | diff -r d254738c5f5e foo/y.txt |
|
96 | diff -r d254738c5f5e foo/y.txt | |
97 | --- a/foo/y.txt |
|
97 | --- a/foo/y.txt | |
98 | +++ b/foo/y.txt |
|
98 | +++ b/foo/y.txt | |
99 | @@ -1,2 +1,3 @@ |
|
99 | @@ -1,2 +1,3 @@ | |
100 | y1 |
|
100 | y1 | |
101 | y2 |
|
101 | y2 | |
102 | +y3 |
|
102 | +y3 | |
103 | diff -r 9647f22de499 foo/bar/z.txt |
|
103 | diff -r 9647f22de499 foo/bar/z.txt | |
104 | --- a/foo/bar/z.txt |
|
104 | --- a/foo/bar/z.txt | |
105 | +++ b/foo/bar/z.txt |
|
105 | +++ b/foo/bar/z.txt | |
106 | @@ -1,2 +1,3 @@ |
|
106 | @@ -1,2 +1,3 @@ | |
107 | z1 |
|
107 | z1 | |
108 | z2 |
|
108 | z2 | |
109 | +z3 |
|
109 | +z3 | |
110 |
|
110 | |||
111 | Status call crossing repository boundaries: |
|
111 | Status call crossing repository boundaries: | |
112 |
|
112 | |||
113 | $ hg status -S foo/bar/z.txt |
|
113 | $ hg status -S foo/bar/z.txt | |
114 | M foo/bar/z.txt |
|
114 | M foo/bar/z.txt | |
115 | $ hg status -S -I 'foo/?.txt' |
|
115 | $ hg status -S -I 'foo/?.txt' | |
116 | M foo/y.txt |
|
116 | M foo/y.txt | |
117 | $ hg status -S -I '**/?.txt' |
|
117 | $ hg status -S -I '**/?.txt' | |
118 | M foo/bar/z.txt |
|
118 | M foo/bar/z.txt | |
119 | M foo/y.txt |
|
119 | M foo/y.txt | |
120 | $ hg diff --nodates -S -I '**/?.txt' |
|
120 | $ hg diff --nodates -S -I '**/?.txt' | |
121 | diff -r d254738c5f5e foo/y.txt |
|
121 | diff -r d254738c5f5e foo/y.txt | |
122 | --- a/foo/y.txt |
|
122 | --- a/foo/y.txt | |
123 | +++ b/foo/y.txt |
|
123 | +++ b/foo/y.txt | |
124 | @@ -1,2 +1,3 @@ |
|
124 | @@ -1,2 +1,3 @@ | |
125 | y1 |
|
125 | y1 | |
126 | y2 |
|
126 | y2 | |
127 | +y3 |
|
127 | +y3 | |
128 | diff -r 9647f22de499 foo/bar/z.txt |
|
128 | diff -r 9647f22de499 foo/bar/z.txt | |
129 | --- a/foo/bar/z.txt |
|
129 | --- a/foo/bar/z.txt | |
130 | +++ b/foo/bar/z.txt |
|
130 | +++ b/foo/bar/z.txt | |
131 | @@ -1,2 +1,3 @@ |
|
131 | @@ -1,2 +1,3 @@ | |
132 | z1 |
|
132 | z1 | |
133 | z2 |
|
133 | z2 | |
134 | +z3 |
|
134 | +z3 | |
135 |
|
135 | |||
136 | Status from within a subdirectory: |
|
136 | Status from within a subdirectory: | |
137 |
|
137 | |||
138 | $ mkdir dir |
|
138 | $ mkdir dir | |
139 | $ cd dir |
|
139 | $ cd dir | |
140 | $ echo a1 > a.txt |
|
140 | $ echo a1 > a.txt | |
141 | $ hg status -S |
|
141 | $ hg status -S | |
142 | M foo/bar/z.txt |
|
142 | M foo/bar/z.txt | |
143 | M foo/y.txt |
|
143 | M foo/y.txt | |
144 | ? dir/a.txt |
|
144 | ? dir/a.txt | |
145 | $ hg diff --nodates -S |
|
145 | $ hg diff --nodates -S | |
146 | diff -r d254738c5f5e foo/y.txt |
|
146 | diff -r d254738c5f5e foo/y.txt | |
147 | --- a/foo/y.txt |
|
147 | --- a/foo/y.txt | |
148 | +++ b/foo/y.txt |
|
148 | +++ b/foo/y.txt | |
149 | @@ -1,2 +1,3 @@ |
|
149 | @@ -1,2 +1,3 @@ | |
150 | y1 |
|
150 | y1 | |
151 | y2 |
|
151 | y2 | |
152 | +y3 |
|
152 | +y3 | |
153 | diff -r 9647f22de499 foo/bar/z.txt |
|
153 | diff -r 9647f22de499 foo/bar/z.txt | |
154 | --- a/foo/bar/z.txt |
|
154 | --- a/foo/bar/z.txt | |
155 | +++ b/foo/bar/z.txt |
|
155 | +++ b/foo/bar/z.txt | |
156 | @@ -1,2 +1,3 @@ |
|
156 | @@ -1,2 +1,3 @@ | |
157 | z1 |
|
157 | z1 | |
158 | z2 |
|
158 | z2 | |
159 | +z3 |
|
159 | +z3 | |
160 |
|
160 | |||
161 | Status with relative path: |
|
161 | Status with relative path: | |
162 |
|
162 | |||
163 | $ hg status -S .. |
|
163 | $ hg status -S .. | |
164 | M ../foo/bar/z.txt |
|
164 | M ../foo/bar/z.txt | |
165 | M ../foo/y.txt |
|
165 | M ../foo/y.txt | |
166 | ? a.txt |
|
166 | ? a.txt | |
167 | $ hg diff --nodates -S .. |
|
167 | $ hg diff --nodates -S .. | |
168 | diff -r d254738c5f5e foo/y.txt |
|
168 | diff -r d254738c5f5e foo/y.txt | |
169 | --- a/foo/y.txt |
|
169 | --- a/foo/y.txt | |
170 | +++ b/foo/y.txt |
|
170 | +++ b/foo/y.txt | |
171 | @@ -1,2 +1,3 @@ |
|
171 | @@ -1,2 +1,3 @@ | |
172 | y1 |
|
172 | y1 | |
173 | y2 |
|
173 | y2 | |
174 | +y3 |
|
174 | +y3 | |
175 | diff -r 9647f22de499 foo/bar/z.txt |
|
175 | diff -r 9647f22de499 foo/bar/z.txt | |
176 | --- a/foo/bar/z.txt |
|
176 | --- a/foo/bar/z.txt | |
177 | +++ b/foo/bar/z.txt |
|
177 | +++ b/foo/bar/z.txt | |
178 | @@ -1,2 +1,3 @@ |
|
178 | @@ -1,2 +1,3 @@ | |
179 | z1 |
|
179 | z1 | |
180 | z2 |
|
180 | z2 | |
181 | +z3 |
|
181 | +z3 | |
182 | $ cd .. |
|
182 | $ cd .. | |
183 |
|
183 | |||
184 | Cleanup and final commit: |
|
184 | Cleanup and final commit: | |
185 |
|
185 | |||
186 | $ rm -r dir |
|
186 | $ rm -r dir | |
187 | $ hg commit --subrepos -m 2-3-2 |
|
187 | $ hg commit --subrepos -m 2-3-2 | |
188 | committing subrepository foo |
|
188 | committing subrepository foo | |
189 | committing subrepository foo/bar |
|
189 | committing subrepository foo/bar (glob) | |
190 |
|
190 | |||
191 | Log with the relationships between repo and its subrepo: |
|
191 | Log with the relationships between repo and its subrepo: | |
192 |
|
192 | |||
193 | $ hg log --template '{rev}:{node|short} {desc}\n' |
|
193 | $ hg log --template '{rev}:{node|short} {desc}\n' | |
194 | 2:1326fa26d0c0 2-3-2 |
|
194 | 2:1326fa26d0c0 2-3-2 | |
195 | 1:4b3c9ff4f66b 1-2-1 |
|
195 | 1:4b3c9ff4f66b 1-2-1 | |
196 | 0:23376cbba0d8 0-0-0 |
|
196 | 0:23376cbba0d8 0-0-0 | |
197 |
|
197 | |||
198 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' |
|
198 | $ hg -R foo log --template '{rev}:{node|short} {desc}\n' | |
199 | 3:65903cebad86 2-3-2 |
|
199 | 3:65903cebad86 2-3-2 | |
200 | 2:d254738c5f5e 0-2-1 |
|
200 | 2:d254738c5f5e 0-2-1 | |
201 | 1:8629ce7dcc39 0-1-0 |
|
201 | 1:8629ce7dcc39 0-1-0 | |
202 | 0:af048e97ade2 0-0-0 |
|
202 | 0:af048e97ade2 0-0-0 | |
203 |
|
203 | |||
204 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' |
|
204 | $ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n' | |
205 | 2:31ecbdafd357 2-3-2 |
|
205 | 2:31ecbdafd357 2-3-2 | |
206 | 1:9647f22de499 0-1-1 |
|
206 | 1:9647f22de499 0-1-1 | |
207 | 0:4904098473f9 0-0-0 |
|
207 | 0:4904098473f9 0-0-0 | |
208 |
|
208 | |||
209 | Status between revisions: |
|
209 | Status between revisions: | |
210 |
|
210 | |||
211 | $ hg status -S |
|
211 | $ hg status -S | |
212 | $ hg status -S --rev 0:1 |
|
212 | $ hg status -S --rev 0:1 | |
213 | M .hgsubstate |
|
213 | M .hgsubstate | |
214 | M foo/.hgsubstate |
|
214 | M foo/.hgsubstate | |
215 | M foo/bar/z.txt |
|
215 | M foo/bar/z.txt | |
216 | M foo/y.txt |
|
216 | M foo/y.txt | |
217 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 |
|
217 | $ hg diff --nodates -S -I '**/?.txt' --rev 0:1 | |
218 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt |
|
218 | diff -r af048e97ade2 -r d254738c5f5e foo/y.txt | |
219 | --- a/foo/y.txt |
|
219 | --- a/foo/y.txt | |
220 | +++ b/foo/y.txt |
|
220 | +++ b/foo/y.txt | |
221 | @@ -1,1 +1,2 @@ |
|
221 | @@ -1,1 +1,2 @@ | |
222 | y1 |
|
222 | y1 | |
223 | +y2 |
|
223 | +y2 | |
224 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt |
|
224 | diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt | |
225 | --- a/foo/bar/z.txt |
|
225 | --- a/foo/bar/z.txt | |
226 | +++ b/foo/bar/z.txt |
|
226 | +++ b/foo/bar/z.txt | |
227 | @@ -1,1 +1,2 @@ |
|
227 | @@ -1,1 +1,2 @@ | |
228 | z1 |
|
228 | z1 | |
229 | +z2 |
|
229 | +z2 | |
230 |
|
230 | |||
231 | Enable progress extension for archive tests: |
|
231 | Enable progress extension for archive tests: | |
232 |
|
232 | |||
233 | $ cp $HGRCPATH $HGRCPATH.no-progress |
|
233 | $ cp $HGRCPATH $HGRCPATH.no-progress | |
234 | $ cat >> $HGRCPATH <<EOF |
|
234 | $ cat >> $HGRCPATH <<EOF | |
235 | > [extensions] |
|
235 | > [extensions] | |
236 | > progress = |
|
236 | > progress = | |
237 | > [progress] |
|
237 | > [progress] | |
238 | > assume-tty = 1 |
|
238 | > assume-tty = 1 | |
239 | > delay = 0 |
|
239 | > delay = 0 | |
240 | > format = topic bar number |
|
240 | > format = topic bar number | |
241 | > refresh = 0 |
|
241 | > refresh = 0 | |
242 | > width = 60 |
|
242 | > width = 60 | |
243 | > EOF |
|
243 | > EOF | |
244 |
|
244 | |||
245 | Test archiving to a directory tree (the doubled lines in the output |
|
245 | Test archiving to a directory tree (the doubled lines in the output | |
246 | only show up in the test output, not in real usage): |
|
246 | only show up in the test output, not in real usage): | |
247 |
|
247 | |||
248 | $ hg archive --subrepos ../archive 2>&1 | $TESTDIR/filtercr.py |
|
248 | $ hg archive --subrepos ../archive 2>&1 | $TESTDIR/filtercr.py | |
249 |
|
249 | |||
250 | archiving [ ] 0/3 |
|
250 | archiving [ ] 0/3 | |
251 | archiving [ ] 0/3 |
|
251 | archiving [ ] 0/3 | |
252 | archiving [=============> ] 1/3 |
|
252 | archiving [=============> ] 1/3 | |
253 | archiving [=============> ] 1/3 |
|
253 | archiving [=============> ] 1/3 | |
254 | archiving [===========================> ] 2/3 |
|
254 | archiving [===========================> ] 2/3 | |
255 | archiving [===========================> ] 2/3 |
|
255 | archiving [===========================> ] 2/3 | |
256 | archiving [==========================================>] 3/3 |
|
256 | archiving [==========================================>] 3/3 | |
257 | archiving [==========================================>] 3/3 |
|
257 | archiving [==========================================>] 3/3 | |
258 |
|
258 | |||
259 | archiving (foo) [ ] 0/3 |
|
259 | archiving (foo) [ ] 0/3 | |
260 | archiving (foo) [ ] 0/3 |
|
260 | archiving (foo) [ ] 0/3 | |
261 | archiving (foo) [===========> ] 1/3 |
|
261 | archiving (foo) [===========> ] 1/3 | |
262 | archiving (foo) [===========> ] 1/3 |
|
262 | archiving (foo) [===========> ] 1/3 | |
263 | archiving (foo) [=======================> ] 2/3 |
|
263 | archiving (foo) [=======================> ] 2/3 | |
264 | archiving (foo) [=======================> ] 2/3 |
|
264 | archiving (foo) [=======================> ] 2/3 | |
265 | archiving (foo) [====================================>] 3/3 |
|
265 | archiving (foo) [====================================>] 3/3 | |
266 | archiving (foo) [====================================>] 3/3 |
|
266 | archiving (foo) [====================================>] 3/3 | |
267 |
|
267 | |||
268 | archiving (foo/bar) [ ] 0/1 (glob) |
|
268 | archiving (foo/bar) [ ] 0/1 (glob) | |
269 | archiving (foo/bar) [ ] 0/1 (glob) |
|
269 | archiving (foo/bar) [ ] 0/1 (glob) | |
270 | archiving (foo/bar) [================================>] 1/1 (glob) |
|
270 | archiving (foo/bar) [================================>] 1/1 (glob) | |
271 | archiving (foo/bar) [================================>] 1/1 (glob) |
|
271 | archiving (foo/bar) [================================>] 1/1 (glob) | |
272 | \r (esc) |
|
272 | \r (esc) | |
273 | $ find ../archive | sort |
|
273 | $ find ../archive | sort | |
274 | ../archive |
|
274 | ../archive | |
275 | ../archive/.hg_archival.txt |
|
275 | ../archive/.hg_archival.txt | |
276 | ../archive/.hgsub |
|
276 | ../archive/.hgsub | |
277 | ../archive/.hgsubstate |
|
277 | ../archive/.hgsubstate | |
278 | ../archive/foo |
|
278 | ../archive/foo | |
279 | ../archive/foo/.hgsub |
|
279 | ../archive/foo/.hgsub | |
280 | ../archive/foo/.hgsubstate |
|
280 | ../archive/foo/.hgsubstate | |
281 | ../archive/foo/bar |
|
281 | ../archive/foo/bar | |
282 | ../archive/foo/bar/z.txt |
|
282 | ../archive/foo/bar/z.txt | |
283 | ../archive/foo/y.txt |
|
283 | ../archive/foo/y.txt | |
284 | ../archive/x.txt |
|
284 | ../archive/x.txt | |
285 |
|
285 | |||
286 | Test archiving to zip file (unzip output is unstable): |
|
286 | Test archiving to zip file (unzip output is unstable): | |
287 |
|
287 | |||
288 | $ hg archive --subrepos ../archive.zip 2>&1 | $TESTDIR/filtercr.py |
|
288 | $ hg archive --subrepos ../archive.zip 2>&1 | $TESTDIR/filtercr.py | |
289 |
|
289 | |||
290 | archiving [ ] 0/3 |
|
290 | archiving [ ] 0/3 | |
291 | archiving [ ] 0/3 |
|
291 | archiving [ ] 0/3 | |
292 | archiving [=============> ] 1/3 |
|
292 | archiving [=============> ] 1/3 | |
293 | archiving [=============> ] 1/3 |
|
293 | archiving [=============> ] 1/3 | |
294 | archiving [===========================> ] 2/3 |
|
294 | archiving [===========================> ] 2/3 | |
295 | archiving [===========================> ] 2/3 |
|
295 | archiving [===========================> ] 2/3 | |
296 | archiving [==========================================>] 3/3 |
|
296 | archiving [==========================================>] 3/3 | |
297 | archiving [==========================================>] 3/3 |
|
297 | archiving [==========================================>] 3/3 | |
298 |
|
298 | |||
299 | archiving (foo) [ ] 0/3 |
|
299 | archiving (foo) [ ] 0/3 | |
300 | archiving (foo) [ ] 0/3 |
|
300 | archiving (foo) [ ] 0/3 | |
301 | archiving (foo) [===========> ] 1/3 |
|
301 | archiving (foo) [===========> ] 1/3 | |
302 | archiving (foo) [===========> ] 1/3 |
|
302 | archiving (foo) [===========> ] 1/3 | |
303 | archiving (foo) [=======================> ] 2/3 |
|
303 | archiving (foo) [=======================> ] 2/3 | |
304 | archiving (foo) [=======================> ] 2/3 |
|
304 | archiving (foo) [=======================> ] 2/3 | |
305 | archiving (foo) [====================================>] 3/3 |
|
305 | archiving (foo) [====================================>] 3/3 | |
306 | archiving (foo) [====================================>] 3/3 |
|
306 | archiving (foo) [====================================>] 3/3 | |
307 |
|
307 | |||
308 | archiving (foo/bar) [ ] 0/1 (glob) |
|
308 | archiving (foo/bar) [ ] 0/1 (glob) | |
309 | archiving (foo/bar) [ ] 0/1 (glob) |
|
309 | archiving (foo/bar) [ ] 0/1 (glob) | |
310 | archiving (foo/bar) [================================>] 1/1 (glob) |
|
310 | archiving (foo/bar) [================================>] 1/1 (glob) | |
311 | archiving (foo/bar) [================================>] 1/1 (glob) |
|
311 | archiving (foo/bar) [================================>] 1/1 (glob) | |
312 | \r (esc) |
|
312 | \r (esc) | |
313 |
|
313 | |||
314 | Test archiving a revision that references a subrepo that is not yet |
|
314 | Test archiving a revision that references a subrepo that is not yet | |
315 | cloned: |
|
315 | cloned: | |
316 |
|
316 | |||
317 | $ hg clone -U . ../empty |
|
317 | $ hg clone -U . ../empty | |
318 | $ cd ../empty |
|
318 | $ cd ../empty | |
319 | $ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | $TESTDIR/filtercr.py |
|
319 | $ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | $TESTDIR/filtercr.py | |
320 |
|
320 | |||
321 | archiving [ ] 0/3 |
|
321 | archiving [ ] 0/3 | |
322 | archiving [ ] 0/3 |
|
322 | archiving [ ] 0/3 | |
323 | archiving [=============> ] 1/3 |
|
323 | archiving [=============> ] 1/3 | |
324 | archiving [=============> ] 1/3 |
|
324 | archiving [=============> ] 1/3 | |
325 | archiving [===========================> ] 2/3 |
|
325 | archiving [===========================> ] 2/3 | |
326 | archiving [===========================> ] 2/3 |
|
326 | archiving [===========================> ] 2/3 | |
327 | archiving [==========================================>] 3/3 |
|
327 | archiving [==========================================>] 3/3 | |
328 | archiving [==========================================>] 3/3 |
|
328 | archiving [==========================================>] 3/3 | |
329 |
|
329 | |||
330 | archiving (foo) [ ] 0/3 |
|
330 | archiving (foo) [ ] 0/3 | |
331 | archiving (foo) [ ] 0/3 |
|
331 | archiving (foo) [ ] 0/3 | |
332 | archiving (foo) [===========> ] 1/3 |
|
332 | archiving (foo) [===========> ] 1/3 | |
333 | archiving (foo) [===========> ] 1/3 |
|
333 | archiving (foo) [===========> ] 1/3 | |
334 | archiving (foo) [=======================> ] 2/3 |
|
334 | archiving (foo) [=======================> ] 2/3 | |
335 | archiving (foo) [=======================> ] 2/3 |
|
335 | archiving (foo) [=======================> ] 2/3 | |
336 | archiving (foo) [====================================>] 3/3 |
|
336 | archiving (foo) [====================================>] 3/3 | |
337 | archiving (foo) [====================================>] 3/3 |
|
337 | archiving (foo) [====================================>] 3/3 | |
338 |
|
338 | |||
339 | archiving (foo/bar) [ ] 0/1 (glob) |
|
339 | archiving (foo/bar) [ ] 0/1 (glob) | |
340 | archiving (foo/bar) [ ] 0/1 (glob) |
|
340 | archiving (foo/bar) [ ] 0/1 (glob) | |
341 | archiving (foo/bar) [================================>] 1/1 (glob) |
|
341 | archiving (foo/bar) [================================>] 1/1 (glob) | |
342 | archiving (foo/bar) [================================>] 1/1 (glob) |
|
342 | archiving (foo/bar) [================================>] 1/1 (glob) | |
343 |
|
343 | |||
344 | cloning subrepo foo from $TESTTMP/repo/foo |
|
344 | cloning subrepo foo from $TESTTMP/repo/foo | |
345 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
345 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) | |
346 |
|
346 | |||
347 | The newly cloned subrepos contain no working copy: |
|
347 | The newly cloned subrepos contain no working copy: | |
348 |
|
348 | |||
349 | $ hg -R foo summary |
|
349 | $ hg -R foo summary | |
350 | parent: -1:000000000000 (no revision checked out) |
|
350 | parent: -1:000000000000 (no revision checked out) | |
351 | branch: default |
|
351 | branch: default | |
352 | commit: (clean) |
|
352 | commit: (clean) | |
353 | update: 4 new changesets (update) |
|
353 | update: 4 new changesets (update) | |
354 |
|
354 | |||
355 | Disable progress extension and cleanup: |
|
355 | Disable progress extension and cleanup: | |
356 |
|
356 | |||
357 | $ mv $HGRCPATH.no-progress $HGRCPATH |
|
357 | $ mv $HGRCPATH.no-progress $HGRCPATH | |
358 |
|
358 | |||
359 | Test archiving when there is a directory in the way for a subrepo |
|
359 | Test archiving when there is a directory in the way for a subrepo | |
360 | created by archive: |
|
360 | created by archive: | |
361 |
|
361 | |||
362 | $ hg clone -U . ../almost-empty |
|
362 | $ hg clone -U . ../almost-empty | |
363 | $ cd ../almost-empty |
|
363 | $ cd ../almost-empty | |
364 | $ mkdir foo |
|
364 | $ mkdir foo | |
365 | $ echo f > foo/f |
|
365 | $ echo f > foo/f | |
366 | $ hg archive --subrepos -r tip archive |
|
366 | $ hg archive --subrepos -r tip archive | |
367 | cloning subrepo foo from $TESTTMP/empty/foo |
|
367 | cloning subrepo foo from $TESTTMP/empty/foo | |
368 | abort: destination '$TESTTMP/almost-empty/foo' is not empty |
|
368 | abort: destination '$TESTTMP/almost-empty/foo' is not empty (glob) | |
369 | [255] |
|
369 | [255] | |
370 |
|
370 | |||
371 | Clone and test outgoing: |
|
371 | Clone and test outgoing: | |
372 |
|
372 | |||
373 | $ cd .. |
|
373 | $ cd .. | |
374 | $ hg clone repo repo2 |
|
374 | $ hg clone repo repo2 | |
375 | updating to branch default |
|
375 | updating to branch default | |
376 | cloning subrepo foo from $TESTTMP/repo/foo |
|
376 | cloning subrepo foo from $TESTTMP/repo/foo | |
377 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar |
|
377 | cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob) | |
378 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
378 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
379 | $ cd repo2 |
|
379 | $ cd repo2 | |
380 | $ hg outgoing -S |
|
380 | $ hg outgoing -S | |
381 | comparing with $TESTTMP/repo |
|
381 | comparing with $TESTTMP/repo (glob) | |
382 | searching for changes |
|
382 | searching for changes | |
383 | no changes found |
|
383 | no changes found | |
384 | comparing with $TESTTMP/repo/foo |
|
384 | comparing with $TESTTMP/repo/foo | |
385 | searching for changes |
|
385 | searching for changes | |
386 | no changes found |
|
386 | no changes found | |
387 | comparing with $TESTTMP/repo/foo/bar |
|
387 | comparing with $TESTTMP/repo/foo/bar | |
388 | searching for changes |
|
388 | searching for changes | |
389 | no changes found |
|
389 | no changes found | |
390 | [1] |
|
390 | [1] | |
391 |
|
391 | |||
392 | Make nested change: |
|
392 | Make nested change: | |
393 |
|
393 | |||
394 | $ echo y4 >> foo/y.txt |
|
394 | $ echo y4 >> foo/y.txt | |
395 | $ hg diff --nodates -S |
|
395 | $ hg diff --nodates -S | |
396 | diff -r 65903cebad86 foo/y.txt |
|
396 | diff -r 65903cebad86 foo/y.txt | |
397 | --- a/foo/y.txt |
|
397 | --- a/foo/y.txt | |
398 | +++ b/foo/y.txt |
|
398 | +++ b/foo/y.txt | |
399 | @@ -1,3 +1,4 @@ |
|
399 | @@ -1,3 +1,4 @@ | |
400 | y1 |
|
400 | y1 | |
401 | y2 |
|
401 | y2 | |
402 | y3 |
|
402 | y3 | |
403 | +y4 |
|
403 | +y4 | |
404 | $ hg commit --subrepos -m 3-4-2 |
|
404 | $ hg commit --subrepos -m 3-4-2 | |
405 | committing subrepository foo |
|
405 | committing subrepository foo | |
406 | $ hg outgoing -S |
|
406 | $ hg outgoing -S | |
407 | comparing with $TESTTMP/repo |
|
407 | comparing with $TESTTMP/repo (glob) | |
408 | searching for changes |
|
408 | searching for changes | |
409 | changeset: 3:2655b8ecc4ee |
|
409 | changeset: 3:2655b8ecc4ee | |
410 | tag: tip |
|
410 | tag: tip | |
411 | user: test |
|
411 | user: test | |
412 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
412 | date: Thu Jan 01 00:00:00 1970 +0000 | |
413 | summary: 3-4-2 |
|
413 | summary: 3-4-2 | |
414 |
|
414 | |||
415 | comparing with $TESTTMP/repo/foo |
|
415 | comparing with $TESTTMP/repo/foo | |
416 | searching for changes |
|
416 | searching for changes | |
417 | changeset: 4:e96193d6cb36 |
|
417 | changeset: 4:e96193d6cb36 | |
418 | tag: tip |
|
418 | tag: tip | |
419 | user: test |
|
419 | user: test | |
420 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
420 | date: Thu Jan 01 00:00:00 1970 +0000 | |
421 | summary: 3-4-2 |
|
421 | summary: 3-4-2 | |
422 |
|
422 | |||
423 | comparing with $TESTTMP/repo/foo/bar |
|
423 | comparing with $TESTTMP/repo/foo/bar | |
424 | searching for changes |
|
424 | searching for changes | |
425 | no changes found |
|
425 | no changes found | |
426 |
|
426 | |||
427 |
|
427 | |||
428 | Switch to original repo and setup default path: |
|
428 | Switch to original repo and setup default path: | |
429 |
|
429 | |||
430 | $ cd ../repo |
|
430 | $ cd ../repo | |
431 | $ echo '[paths]' >> .hg/hgrc |
|
431 | $ echo '[paths]' >> .hg/hgrc | |
432 | $ echo 'default = ../repo2' >> .hg/hgrc |
|
432 | $ echo 'default = ../repo2' >> .hg/hgrc | |
433 |
|
433 | |||
434 | Test incoming: |
|
434 | Test incoming: | |
435 |
|
435 | |||
436 | $ hg incoming -S |
|
436 | $ hg incoming -S | |
437 | comparing with $TESTTMP/repo2 |
|
437 | comparing with $TESTTMP/repo2 (glob) | |
438 | searching for changes |
|
438 | searching for changes | |
439 | changeset: 3:2655b8ecc4ee |
|
439 | changeset: 3:2655b8ecc4ee | |
440 | tag: tip |
|
440 | tag: tip | |
441 | user: test |
|
441 | user: test | |
442 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
442 | date: Thu Jan 01 00:00:00 1970 +0000 | |
443 | summary: 3-4-2 |
|
443 | summary: 3-4-2 | |
444 |
|
444 | |||
445 | comparing with $TESTTMP/repo2/foo |
|
445 | comparing with $TESTTMP/repo2/foo | |
446 | searching for changes |
|
446 | searching for changes | |
447 | changeset: 4:e96193d6cb36 |
|
447 | changeset: 4:e96193d6cb36 | |
448 | tag: tip |
|
448 | tag: tip | |
449 | user: test |
|
449 | user: test | |
450 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
450 | date: Thu Jan 01 00:00:00 1970 +0000 | |
451 | summary: 3-4-2 |
|
451 | summary: 3-4-2 | |
452 |
|
452 | |||
453 | comparing with $TESTTMP/repo2/foo/bar |
|
453 | comparing with $TESTTMP/repo2/foo/bar | |
454 | searching for changes |
|
454 | searching for changes | |
455 | no changes found |
|
455 | no changes found | |
456 |
|
456 | |||
457 | $ hg incoming -S --bundle incoming.hg |
|
457 | $ hg incoming -S --bundle incoming.hg | |
458 | abort: cannot combine --bundle and --subrepos |
|
458 | abort: cannot combine --bundle and --subrepos | |
459 | [255] |
|
459 | [255] | |
460 |
|
460 | |||
461 | Test missing subrepo: |
|
461 | Test missing subrepo: | |
462 |
|
462 | |||
463 | $ rm -r foo |
|
463 | $ rm -r foo | |
464 | $ hg status -S |
|
464 | $ hg status -S | |
465 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" |
|
465 | warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" | |
466 |
|
466 | |||
467 | Issue2619: IndexError: list index out of range on hg add with subrepos |
|
467 | Issue2619: IndexError: list index out of range on hg add with subrepos | |
468 | The subrepo must sorts after the explicit filename. |
|
468 | The subrepo must sorts after the explicit filename. | |
469 |
|
469 | |||
470 | $ cd .. |
|
470 | $ cd .. | |
471 | $ hg init test |
|
471 | $ hg init test | |
472 | $ cd test |
|
472 | $ cd test | |
473 | $ hg init x |
|
473 | $ hg init x | |
474 | $ echo "x = x" >> .hgsub |
|
474 | $ echo "x = x" >> .hgsub | |
475 | $ hg add .hgsub |
|
475 | $ hg add .hgsub | |
476 | $ touch a x/a |
|
476 | $ touch a x/a | |
477 | $ hg add a x/a |
|
477 | $ hg add a x/a |
@@ -1,1017 +1,1017 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 | $ rm -rf sub |
|
6 | $ rm -rf sub | |
7 | $ mkdir sub |
|
7 | $ mkdir sub | |
8 | $ cd sub |
|
8 | $ cd sub | |
9 | $ hg init t |
|
9 | $ hg init t | |
10 | $ cd t |
|
10 | $ cd t | |
11 |
|
11 | |||
12 | first revision, no sub |
|
12 | first revision, no sub | |
13 |
|
13 | |||
14 | $ echo a > a |
|
14 | $ echo a > a | |
15 | $ hg ci -Am0 |
|
15 | $ hg ci -Am0 | |
16 | adding a |
|
16 | adding a | |
17 |
|
17 | |||
18 | add first sub |
|
18 | add first sub | |
19 |
|
19 | |||
20 | $ echo s = s > .hgsub |
|
20 | $ echo s = s > .hgsub | |
21 | $ hg add .hgsub |
|
21 | $ hg add .hgsub | |
22 | $ hg init s |
|
22 | $ hg init s | |
23 | $ echo a > s/a |
|
23 | $ echo a > s/a | |
24 |
|
24 | |||
25 | Issue2232: committing a subrepo without .hgsub |
|
25 | Issue2232: committing a subrepo without .hgsub | |
26 |
|
26 | |||
27 | $ hg ci -mbad s |
|
27 | $ hg ci -mbad s | |
28 | abort: can't commit subrepos without .hgsub |
|
28 | abort: can't commit subrepos without .hgsub | |
29 | [255] |
|
29 | [255] | |
30 |
|
30 | |||
31 | $ hg -R s ci -Ams0 |
|
31 | $ hg -R s ci -Ams0 | |
32 | adding a |
|
32 | adding a | |
33 | $ hg sum |
|
33 | $ hg sum | |
34 | parent: 0:f7b1eb17ad24 tip |
|
34 | parent: 0:f7b1eb17ad24 tip | |
35 | 0 |
|
35 | 0 | |
36 | branch: default |
|
36 | branch: default | |
37 | commit: 1 added, 1 subrepos |
|
37 | commit: 1 added, 1 subrepos | |
38 | update: (current) |
|
38 | update: (current) | |
39 | $ hg ci -m1 |
|
39 | $ hg ci -m1 | |
40 | committing subrepository s |
|
40 | committing subrepository s | |
41 |
|
41 | |||
42 | Revert can't (yet) revert subrepos: |
|
42 | Revert can't (yet) revert subrepos: | |
43 |
|
43 | |||
44 | $ echo b > s/a |
|
44 | $ echo b > s/a | |
45 | $ hg revert s |
|
45 | $ hg revert s | |
46 | s: reverting subrepos is unsupported |
|
46 | s: reverting subrepos is unsupported | |
47 |
|
47 | |||
48 | Revert currently ignores subrepos by default |
|
48 | Revert currently ignores subrepos by default | |
49 |
|
49 | |||
50 | $ hg revert -a |
|
50 | $ hg revert -a | |
51 | $ hg revert -R s -a -C |
|
51 | $ hg revert -R s -a -C | |
52 | reverting s/a (glob) |
|
52 | reverting s/a (glob) | |
53 |
|
53 | |||
54 | Issue2022: update -C |
|
54 | Issue2022: update -C | |
55 |
|
55 | |||
56 | $ echo b > s/a |
|
56 | $ echo b > s/a | |
57 | $ hg sum |
|
57 | $ hg sum | |
58 | parent: 1:7cf8cfea66e4 tip |
|
58 | parent: 1:7cf8cfea66e4 tip | |
59 | 1 |
|
59 | 1 | |
60 | branch: default |
|
60 | branch: default | |
61 | commit: 1 subrepos |
|
61 | commit: 1 subrepos | |
62 | update: (current) |
|
62 | update: (current) | |
63 | $ hg co -C 1 |
|
63 | $ hg co -C 1 | |
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
65 | $ hg sum |
|
65 | $ hg sum | |
66 | parent: 1:7cf8cfea66e4 tip |
|
66 | parent: 1:7cf8cfea66e4 tip | |
67 | 1 |
|
67 | 1 | |
68 | branch: default |
|
68 | branch: default | |
69 | commit: (clean) |
|
69 | commit: (clean) | |
70 | update: (current) |
|
70 | update: (current) | |
71 |
|
71 | |||
72 | commands that require a clean repo should respect subrepos |
|
72 | commands that require a clean repo should respect subrepos | |
73 |
|
73 | |||
74 | $ echo b >> s/a |
|
74 | $ echo b >> s/a | |
75 | $ hg backout tip |
|
75 | $ hg backout tip | |
76 | abort: uncommitted changes in subrepo s |
|
76 | abort: uncommitted changes in subrepo s | |
77 | [255] |
|
77 | [255] | |
78 | $ hg revert -C -R s s/a |
|
78 | $ hg revert -C -R s s/a | |
79 |
|
79 | |||
80 | add sub sub |
|
80 | add sub sub | |
81 |
|
81 | |||
82 | $ echo ss = ss > s/.hgsub |
|
82 | $ echo ss = ss > s/.hgsub | |
83 | $ hg init s/ss |
|
83 | $ hg init s/ss | |
84 | $ echo a > s/ss/a |
|
84 | $ echo a > s/ss/a | |
85 | $ hg -R s add s/.hgsub |
|
85 | $ hg -R s add s/.hgsub | |
86 | $ hg -R s/ss add s/ss/a |
|
86 | $ hg -R s/ss add s/ss/a | |
87 | $ hg sum |
|
87 | $ hg sum | |
88 | parent: 1:7cf8cfea66e4 tip |
|
88 | parent: 1:7cf8cfea66e4 tip | |
89 | 1 |
|
89 | 1 | |
90 | branch: default |
|
90 | branch: default | |
91 | commit: 1 subrepos |
|
91 | commit: 1 subrepos | |
92 | update: (current) |
|
92 | update: (current) | |
93 | $ hg ci -m2 |
|
93 | $ hg ci -m2 | |
94 | committing subrepository s |
|
94 | committing subrepository s | |
95 | committing subrepository s/ss (glob) |
|
95 | committing subrepository s/ss (glob) | |
96 | $ hg sum |
|
96 | $ hg sum | |
97 | parent: 2:df30734270ae tip |
|
97 | parent: 2:df30734270ae tip | |
98 | 2 |
|
98 | 2 | |
99 | branch: default |
|
99 | branch: default | |
100 | commit: (clean) |
|
100 | commit: (clean) | |
101 | update: (current) |
|
101 | update: (current) | |
102 |
|
102 | |||
103 | bump sub rev (and check it is ignored by ui.commitsubrepos) |
|
103 | bump sub rev (and check it is ignored by ui.commitsubrepos) | |
104 |
|
104 | |||
105 | $ echo b > s/a |
|
105 | $ echo b > s/a | |
106 | $ hg -R s ci -ms1 |
|
106 | $ hg -R s ci -ms1 | |
107 | $ hg --config ui.commitsubrepos=no ci -m3 |
|
107 | $ hg --config ui.commitsubrepos=no ci -m3 | |
108 | committing subrepository s |
|
108 | committing subrepository s | |
109 |
|
109 | |||
110 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) |
|
110 | leave sub dirty (and check ui.commitsubrepos=no aborts the commit) | |
111 |
|
111 | |||
112 | $ echo c > s/a |
|
112 | $ echo c > s/a | |
113 | $ hg --config ui.commitsubrepos=no ci -m4 |
|
113 | $ hg --config ui.commitsubrepos=no ci -m4 | |
114 | abort: uncommitted changes in subrepo s |
|
114 | abort: uncommitted changes in subrepo s | |
115 | (use --subrepos for recursive commit) |
|
115 | (use --subrepos for recursive commit) | |
116 | [255] |
|
116 | [255] | |
117 | $ hg ci -m4 |
|
117 | $ hg ci -m4 | |
118 | committing subrepository s |
|
118 | committing subrepository s | |
119 | $ hg tip -R s |
|
119 | $ hg tip -R s | |
120 | changeset: 3:1c833a7a9e3a |
|
120 | changeset: 3:1c833a7a9e3a | |
121 | tag: tip |
|
121 | tag: tip | |
122 | user: test |
|
122 | user: test | |
123 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
123 | date: Thu Jan 01 00:00:00 1970 +0000 | |
124 | summary: 4 |
|
124 | summary: 4 | |
125 |
|
125 | |||
126 |
|
126 | |||
127 | check caching |
|
127 | check caching | |
128 |
|
128 | |||
129 | $ hg co 0 |
|
129 | $ hg co 0 | |
130 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
130 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
131 | $ hg debugsub |
|
131 | $ hg debugsub | |
132 |
|
132 | |||
133 | restore |
|
133 | restore | |
134 |
|
134 | |||
135 | $ hg co |
|
135 | $ hg co | |
136 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
136 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
137 | $ hg debugsub |
|
137 | $ hg debugsub | |
138 | path s |
|
138 | path s | |
139 | source s |
|
139 | source s | |
140 | revision 1c833a7a9e3a4445c711aaf0f012379cd0d4034e |
|
140 | revision 1c833a7a9e3a4445c711aaf0f012379cd0d4034e | |
141 |
|
141 | |||
142 | new branch for merge tests |
|
142 | new branch for merge tests | |
143 |
|
143 | |||
144 | $ hg co 1 |
|
144 | $ hg co 1 | |
145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
146 | $ echo t = t >> .hgsub |
|
146 | $ echo t = t >> .hgsub | |
147 | $ hg init t |
|
147 | $ hg init t | |
148 | $ echo t > t/t |
|
148 | $ echo t > t/t | |
149 | $ hg -R t add t |
|
149 | $ hg -R t add t | |
150 | adding t/t (glob) |
|
150 | adding t/t (glob) | |
151 |
|
151 | |||
152 | 5 |
|
152 | 5 | |
153 |
|
153 | |||
154 | $ hg ci -m5 # add sub |
|
154 | $ hg ci -m5 # add sub | |
155 | committing subrepository t |
|
155 | committing subrepository t | |
156 | created new head |
|
156 | created new head | |
157 | $ echo t2 > t/t |
|
157 | $ echo t2 > t/t | |
158 |
|
158 | |||
159 | 6 |
|
159 | 6 | |
160 |
|
160 | |||
161 | $ hg st -R s |
|
161 | $ hg st -R s | |
162 | $ hg ci -m6 # change sub |
|
162 | $ hg ci -m6 # change sub | |
163 | committing subrepository t |
|
163 | committing subrepository t | |
164 | $ hg debugsub |
|
164 | $ hg debugsub | |
165 | path s |
|
165 | path s | |
166 | source s |
|
166 | source s | |
167 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 |
|
167 | revision e4ece1bf43360ddc8f6a96432201a37b7cd27ae4 | |
168 | path t |
|
168 | path t | |
169 | source t |
|
169 | source t | |
170 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
170 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
171 | $ echo t3 > t/t |
|
171 | $ echo t3 > t/t | |
172 |
|
172 | |||
173 | 7 |
|
173 | 7 | |
174 |
|
174 | |||
175 | $ hg ci -m7 # change sub again for conflict test |
|
175 | $ hg ci -m7 # change sub again for conflict test | |
176 | committing subrepository t |
|
176 | committing subrepository t | |
177 | $ hg rm .hgsub |
|
177 | $ hg rm .hgsub | |
178 |
|
178 | |||
179 | 8 |
|
179 | 8 | |
180 |
|
180 | |||
181 | $ hg ci -m8 # remove sub |
|
181 | $ hg ci -m8 # remove sub | |
182 |
|
182 | |||
183 | merge tests |
|
183 | merge tests | |
184 |
|
184 | |||
185 | $ hg co -C 3 |
|
185 | $ hg co -C 3 | |
186 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
186 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
187 | $ hg merge 5 # test adding |
|
187 | $ hg merge 5 # test adding | |
188 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
188 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
189 | (branch merge, don't forget to commit) |
|
189 | (branch merge, don't forget to commit) | |
190 | $ hg debugsub |
|
190 | $ hg debugsub | |
191 | path s |
|
191 | path s | |
192 | source s |
|
192 | source s | |
193 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
193 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
194 | path t |
|
194 | path t | |
195 | source t |
|
195 | source t | |
196 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 |
|
196 | revision 60ca1237c19474e7a3978b0dc1ca4e6f36d51382 | |
197 | $ hg ci -m9 |
|
197 | $ hg ci -m9 | |
198 | created new head |
|
198 | created new head | |
199 | $ hg merge 6 --debug # test change |
|
199 | $ hg merge 6 --debug # test change | |
200 | searching for copies back to rev 2 |
|
200 | searching for copies back to rev 2 | |
201 | resolving manifests |
|
201 | resolving manifests | |
202 | overwrite None partial False |
|
202 | overwrite None partial False | |
203 | ancestor 1f14a2e2d3ec local f0d2028bf86d+ remote 1831e14459c4 |
|
203 | ancestor 1f14a2e2d3ec local f0d2028bf86d+ remote 1831e14459c4 | |
204 | .hgsubstate: versions differ -> m |
|
204 | .hgsubstate: versions differ -> m | |
205 | updating: .hgsubstate 1/1 files (100.00%) |
|
205 | updating: .hgsubstate 1/1 files (100.00%) | |
206 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec |
|
206 | subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec | |
207 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg |
|
207 | subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg | |
208 | getting subrepo t |
|
208 | getting subrepo t | |
209 | resolving manifests |
|
209 | resolving manifests | |
210 | overwrite True partial False |
|
210 | overwrite True partial False | |
211 | ancestor 60ca1237c194+ local 60ca1237c194+ remote 6747d179aa9a |
|
211 | ancestor 60ca1237c194+ local 60ca1237c194+ remote 6747d179aa9a | |
212 | t: remote is newer -> g |
|
212 | t: remote is newer -> g | |
213 | updating: t 1/1 files (100.00%) |
|
213 | updating: t 1/1 files (100.00%) | |
214 | getting t |
|
214 | getting t | |
215 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
215 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
216 | (branch merge, don't forget to commit) |
|
216 | (branch merge, don't forget to commit) | |
217 | $ hg debugsub |
|
217 | $ hg debugsub | |
218 | path s |
|
218 | path s | |
219 | source s |
|
219 | source s | |
220 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
220 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
221 | path t |
|
221 | path t | |
222 | source t |
|
222 | source t | |
223 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad |
|
223 | revision 6747d179aa9a688023c4b0cad32e4c92bb7f34ad | |
224 | $ echo conflict > t/t |
|
224 | $ echo conflict > t/t | |
225 | $ hg ci -m10 |
|
225 | $ hg ci -m10 | |
226 | committing subrepository t |
|
226 | committing subrepository t | |
227 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict |
|
227 | $ HGMERGE=internal:merge hg merge --debug 7 # test conflict | |
228 | searching for copies back to rev 2 |
|
228 | searching for copies back to rev 2 | |
229 | resolving manifests |
|
229 | resolving manifests | |
230 | overwrite None partial False |
|
230 | overwrite None partial False | |
231 | ancestor 1831e14459c4 local e45c8b14af55+ remote f94576341bcf |
|
231 | ancestor 1831e14459c4 local e45c8b14af55+ remote f94576341bcf | |
232 | .hgsubstate: versions differ -> m |
|
232 | .hgsubstate: versions differ -> m | |
233 | updating: .hgsubstate 1/1 files (100.00%) |
|
233 | updating: .hgsubstate 1/1 files (100.00%) | |
234 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 |
|
234 | subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4 | |
235 | subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg |
|
235 | subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4:hg | |
236 | merging subrepo t |
|
236 | merging subrepo t | |
237 | searching for copies back to rev 2 |
|
237 | searching for copies back to rev 2 | |
238 | resolving manifests |
|
238 | resolving manifests | |
239 | overwrite None partial False |
|
239 | overwrite None partial False | |
240 | ancestor 6747d179aa9a local 20a0db6fbf6c+ remote 7af322bc1198 |
|
240 | ancestor 6747d179aa9a local 20a0db6fbf6c+ remote 7af322bc1198 | |
241 | t: versions differ -> m |
|
241 | t: versions differ -> m | |
242 | preserving t for resolve of t |
|
242 | preserving t for resolve of t | |
243 | updating: t 1/1 files (100.00%) |
|
243 | updating: t 1/1 files (100.00%) | |
244 | picked tool 'internal:merge' for t (binary False symlink False) |
|
244 | picked tool 'internal:merge' for t (binary False symlink False) | |
245 | merging t |
|
245 | merging t | |
246 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a |
|
246 | my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a | |
247 | warning: conflicts during merge. |
|
247 | warning: conflicts during merge. | |
248 | merging t failed! |
|
248 | merging t failed! | |
249 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
249 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
250 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
250 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
251 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
251 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
252 | (branch merge, don't forget to commit) |
|
252 | (branch merge, don't forget to commit) | |
253 |
|
253 | |||
254 | should conflict |
|
254 | should conflict | |
255 |
|
255 | |||
256 | $ cat t/t |
|
256 | $ cat t/t | |
257 | <<<<<<< local |
|
257 | <<<<<<< local | |
258 | conflict |
|
258 | conflict | |
259 | ======= |
|
259 | ======= | |
260 | t3 |
|
260 | t3 | |
261 | >>>>>>> other |
|
261 | >>>>>>> other | |
262 |
|
262 | |||
263 | clone |
|
263 | clone | |
264 |
|
264 | |||
265 | $ cd .. |
|
265 | $ cd .. | |
266 | $ hg clone t tc |
|
266 | $ hg clone t tc | |
267 | updating to branch default |
|
267 | updating to branch default | |
268 | cloning subrepo s from $TESTTMP/sub/t/s (glob) |
|
268 | cloning subrepo s from $TESTTMP/sub/t/s (glob) | |
269 | cloning subrepo s/ss from $TESTTMP/sub/t/s/ss (glob) |
|
269 | cloning subrepo s/ss from $TESTTMP/sub/t/s/ss (glob) | |
270 | cloning subrepo t from $TESTTMP/sub/t/t (glob) |
|
270 | cloning subrepo t from $TESTTMP/sub/t/t (glob) | |
271 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
271 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
272 | $ cd tc |
|
272 | $ cd tc | |
273 | $ hg debugsub |
|
273 | $ hg debugsub | |
274 | path s |
|
274 | path s | |
275 | source s |
|
275 | source s | |
276 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 |
|
276 | revision fc627a69481fcbe5f1135069e8a3881c023e4cf5 | |
277 | path t |
|
277 | path t | |
278 | source t |
|
278 | source t | |
279 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e |
|
279 | revision 20a0db6fbf6c3d2836e6519a642ae929bfc67c0e | |
280 |
|
280 | |||
281 | push |
|
281 | push | |
282 |
|
282 | |||
283 | $ echo bah > t/t |
|
283 | $ echo bah > t/t | |
284 | $ hg ci -m11 |
|
284 | $ hg ci -m11 | |
285 | committing subrepository t |
|
285 | committing subrepository t | |
286 | $ hg push |
|
286 | $ hg push | |
287 | pushing to $TESTTMP/sub/t (glob) |
|
287 | pushing to $TESTTMP/sub/t (glob) | |
288 | pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) |
|
288 | pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) | |
289 | searching for changes |
|
289 | searching for changes | |
290 | no changes found |
|
290 | no changes found | |
291 | pushing subrepo s to $TESTTMP/sub/t/s (glob) |
|
291 | pushing subrepo s to $TESTTMP/sub/t/s (glob) | |
292 | searching for changes |
|
292 | searching for changes | |
293 | no changes found |
|
293 | no changes found | |
294 | pushing subrepo t to $TESTTMP/sub/t/t (glob) |
|
294 | pushing subrepo t to $TESTTMP/sub/t/t (glob) | |
295 | searching for changes |
|
295 | searching for changes | |
296 | adding changesets |
|
296 | adding changesets | |
297 | adding manifests |
|
297 | adding manifests | |
298 | adding file changes |
|
298 | adding file changes | |
299 | added 1 changesets with 1 changes to 1 files |
|
299 | added 1 changesets with 1 changes to 1 files | |
300 | searching for changes |
|
300 | searching for changes | |
301 | adding changesets |
|
301 | adding changesets | |
302 | adding manifests |
|
302 | adding manifests | |
303 | adding file changes |
|
303 | adding file changes | |
304 | added 1 changesets with 1 changes to 1 files |
|
304 | added 1 changesets with 1 changes to 1 files | |
305 |
|
305 | |||
306 | push -f |
|
306 | push -f | |
307 |
|
307 | |||
308 | $ echo bah > s/a |
|
308 | $ echo bah > s/a | |
309 | $ hg ci -m12 |
|
309 | $ hg ci -m12 | |
310 | committing subrepository s |
|
310 | committing subrepository s | |
311 | $ hg push |
|
311 | $ hg push | |
312 | pushing to $TESTTMP/sub/t (glob) |
|
312 | pushing to $TESTTMP/sub/t (glob) | |
313 | pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) |
|
313 | pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) | |
314 | searching for changes |
|
314 | searching for changes | |
315 | no changes found |
|
315 | no changes found | |
316 | pushing subrepo s to $TESTTMP/sub/t/s (glob) |
|
316 | pushing subrepo s to $TESTTMP/sub/t/s (glob) | |
317 | searching for changes |
|
317 | searching for changes | |
318 | abort: push creates new remote head 12a213df6fa9! |
|
318 | abort: push creates new remote head 12a213df6fa9! | |
319 | (did you forget to merge? use push -f to force) |
|
319 | (did you forget to merge? use push -f to force) | |
320 | [255] |
|
320 | [255] | |
321 | $ hg push -f |
|
321 | $ hg push -f | |
322 | pushing to $TESTTMP/sub/t (glob) |
|
322 | pushing to $TESTTMP/sub/t (glob) | |
323 | pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) |
|
323 | pushing subrepo s/ss to $TESTTMP/sub/t/s/ss (glob) | |
324 | searching for changes |
|
324 | searching for changes | |
325 | no changes found |
|
325 | no changes found | |
326 | pushing subrepo s to $TESTTMP/sub/t/s (glob) |
|
326 | pushing subrepo s to $TESTTMP/sub/t/s (glob) | |
327 | searching for changes |
|
327 | searching for changes | |
328 | adding changesets |
|
328 | adding changesets | |
329 | adding manifests |
|
329 | adding manifests | |
330 | adding file changes |
|
330 | adding file changes | |
331 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
331 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
332 | pushing subrepo t to $TESTTMP/sub/t/t (glob) |
|
332 | pushing subrepo t to $TESTTMP/sub/t/t (glob) | |
333 | searching for changes |
|
333 | searching for changes | |
334 | no changes found |
|
334 | no changes found | |
335 | searching for changes |
|
335 | searching for changes | |
336 | adding changesets |
|
336 | adding changesets | |
337 | adding manifests |
|
337 | adding manifests | |
338 | adding file changes |
|
338 | adding file changes | |
339 | added 1 changesets with 1 changes to 1 files |
|
339 | added 1 changesets with 1 changes to 1 files | |
340 |
|
340 | |||
341 | update |
|
341 | update | |
342 |
|
342 | |||
343 | $ cd ../t |
|
343 | $ cd ../t | |
344 | $ hg up -C # discard our earlier merge |
|
344 | $ hg up -C # discard our earlier merge | |
345 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
345 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
346 | $ echo blah > t/t |
|
346 | $ echo blah > t/t | |
347 | $ hg ci -m13 |
|
347 | $ hg ci -m13 | |
348 | committing subrepository t |
|
348 | committing subrepository t | |
349 |
|
349 | |||
350 | pull |
|
350 | pull | |
351 |
|
351 | |||
352 | $ cd ../tc |
|
352 | $ cd ../tc | |
353 | $ hg pull |
|
353 | $ hg pull | |
354 | pulling from $TESTTMP/sub/t (glob) |
|
354 | pulling from $TESTTMP/sub/t (glob) | |
355 | searching for changes |
|
355 | searching for changes | |
356 | adding changesets |
|
356 | adding changesets | |
357 | adding manifests |
|
357 | adding manifests | |
358 | adding file changes |
|
358 | adding file changes | |
359 | added 1 changesets with 1 changes to 1 files |
|
359 | added 1 changesets with 1 changes to 1 files | |
360 | (run 'hg update' to get a working copy) |
|
360 | (run 'hg update' to get a working copy) | |
361 |
|
361 | |||
362 | should pull t |
|
362 | should pull t | |
363 |
|
363 | |||
364 | $ hg up |
|
364 | $ hg up | |
365 | pulling subrepo t from $TESTTMP/sub/t/t (glob) |
|
365 | pulling subrepo t from $TESTTMP/sub/t/t (glob) | |
366 | searching for changes |
|
366 | searching for changes | |
367 | adding changesets |
|
367 | adding changesets | |
368 | adding manifests |
|
368 | adding manifests | |
369 | adding file changes |
|
369 | adding file changes | |
370 | added 1 changesets with 1 changes to 1 files |
|
370 | added 1 changesets with 1 changes to 1 files | |
371 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
371 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
372 | $ cat t/t |
|
372 | $ cat t/t | |
373 | blah |
|
373 | blah | |
374 |
|
374 | |||
375 | bogus subrepo path aborts |
|
375 | bogus subrepo path aborts | |
376 |
|
376 | |||
377 | $ echo 'bogus=[boguspath' >> .hgsub |
|
377 | $ echo 'bogus=[boguspath' >> .hgsub | |
378 | $ hg ci -m 'bogus subrepo path' |
|
378 | $ hg ci -m 'bogus subrepo path' | |
379 | abort: missing ] in subrepo source |
|
379 | abort: missing ] in subrepo source | |
380 | [255] |
|
380 | [255] | |
381 |
|
381 | |||
382 | Issue1986: merge aborts when trying to merge a subrepo that |
|
382 | Issue1986: merge aborts when trying to merge a subrepo that | |
383 | shouldn't need merging |
|
383 | shouldn't need merging | |
384 |
|
384 | |||
385 | # subrepo layout |
|
385 | # subrepo layout | |
386 | # |
|
386 | # | |
387 | # o 5 br |
|
387 | # o 5 br | |
388 | # /| |
|
388 | # /| | |
389 | # o | 4 default |
|
389 | # o | 4 default | |
390 | # | | |
|
390 | # | | | |
391 | # | o 3 br |
|
391 | # | o 3 br | |
392 | # |/| |
|
392 | # |/| | |
393 | # o | 2 default |
|
393 | # o | 2 default | |
394 | # | | |
|
394 | # | | | |
395 | # | o 1 br |
|
395 | # | o 1 br | |
396 | # |/ |
|
396 | # |/ | |
397 | # o 0 default |
|
397 | # o 0 default | |
398 |
|
398 | |||
399 | $ cd .. |
|
399 | $ cd .. | |
400 | $ rm -rf sub |
|
400 | $ rm -rf sub | |
401 | $ hg init main |
|
401 | $ hg init main | |
402 | $ cd main |
|
402 | $ cd main | |
403 | $ hg init s |
|
403 | $ hg init s | |
404 | $ cd s |
|
404 | $ cd s | |
405 | $ echo a > a |
|
405 | $ echo a > a | |
406 | $ hg ci -Am1 |
|
406 | $ hg ci -Am1 | |
407 | adding a |
|
407 | adding a | |
408 | $ hg branch br |
|
408 | $ hg branch br | |
409 | marked working directory as branch br |
|
409 | marked working directory as branch br | |
410 | $ echo a >> a |
|
410 | $ echo a >> a | |
411 | $ hg ci -m1 |
|
411 | $ hg ci -m1 | |
412 | $ hg up default |
|
412 | $ hg up default | |
413 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
413 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
414 | $ echo b > b |
|
414 | $ echo b > b | |
415 | $ hg ci -Am1 |
|
415 | $ hg ci -Am1 | |
416 | adding b |
|
416 | adding b | |
417 | $ hg up br |
|
417 | $ hg up br | |
418 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
418 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
419 | $ hg merge tip |
|
419 | $ hg merge tip | |
420 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
420 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
421 | (branch merge, don't forget to commit) |
|
421 | (branch merge, don't forget to commit) | |
422 | $ hg ci -m1 |
|
422 | $ hg ci -m1 | |
423 | $ hg up 2 |
|
423 | $ hg up 2 | |
424 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
424 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
425 | $ echo c > c |
|
425 | $ echo c > c | |
426 | $ hg ci -Am1 |
|
426 | $ hg ci -Am1 | |
427 | adding c |
|
427 | adding c | |
428 | $ hg up 3 |
|
428 | $ hg up 3 | |
429 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
429 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
430 | $ hg merge 4 |
|
430 | $ hg merge 4 | |
431 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
431 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
432 | (branch merge, don't forget to commit) |
|
432 | (branch merge, don't forget to commit) | |
433 | $ hg ci -m1 |
|
433 | $ hg ci -m1 | |
434 |
|
434 | |||
435 | # main repo layout: |
|
435 | # main repo layout: | |
436 | # |
|
436 | # | |
437 | # * <-- try to merge default into br again |
|
437 | # * <-- try to merge default into br again | |
438 | # .`| |
|
438 | # .`| | |
439 | # . o 5 br --> substate = 5 |
|
439 | # . o 5 br --> substate = 5 | |
440 | # . | |
|
440 | # . | | |
441 | # o | 4 default --> substate = 4 |
|
441 | # o | 4 default --> substate = 4 | |
442 | # | | |
|
442 | # | | | |
443 | # | o 3 br --> substate = 2 |
|
443 | # | o 3 br --> substate = 2 | |
444 | # |/| |
|
444 | # |/| | |
445 | # o | 2 default --> substate = 2 |
|
445 | # o | 2 default --> substate = 2 | |
446 | # | | |
|
446 | # | | | |
447 | # | o 1 br --> substate = 3 |
|
447 | # | o 1 br --> substate = 3 | |
448 | # |/ |
|
448 | # |/ | |
449 | # o 0 default --> substate = 2 |
|
449 | # o 0 default --> substate = 2 | |
450 |
|
450 | |||
451 | $ cd .. |
|
451 | $ cd .. | |
452 | $ echo 's = s' > .hgsub |
|
452 | $ echo 's = s' > .hgsub | |
453 | $ hg -R s up 2 |
|
453 | $ hg -R s up 2 | |
454 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
454 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
455 | $ hg ci -Am1 |
|
455 | $ hg ci -Am1 | |
456 | adding .hgsub |
|
456 | adding .hgsub | |
457 | committing subrepository s |
|
457 | committing subrepository s | |
458 | $ hg branch br |
|
458 | $ hg branch br | |
459 | marked working directory as branch br |
|
459 | marked working directory as branch br | |
460 | $ echo b > b |
|
460 | $ echo b > b | |
461 | $ hg -R s up 3 |
|
461 | $ hg -R s up 3 | |
462 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
462 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
463 | $ hg ci -Am1 |
|
463 | $ hg ci -Am1 | |
464 | adding b |
|
464 | adding b | |
465 | committing subrepository s |
|
465 | committing subrepository s | |
466 | $ hg up default |
|
466 | $ hg up default | |
467 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
467 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
468 | $ echo c > c |
|
468 | $ echo c > c | |
469 | $ hg ci -Am1 |
|
469 | $ hg ci -Am1 | |
470 | adding c |
|
470 | adding c | |
471 | $ hg up 1 |
|
471 | $ hg up 1 | |
472 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
472 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
473 | $ hg merge 2 |
|
473 | $ hg merge 2 | |
474 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
474 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
475 | (branch merge, don't forget to commit) |
|
475 | (branch merge, don't forget to commit) | |
476 | $ hg ci -m1 |
|
476 | $ hg ci -m1 | |
477 | $ hg up 2 |
|
477 | $ hg up 2 | |
478 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
478 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
479 | $ hg -R s up 4 |
|
479 | $ hg -R s up 4 | |
480 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
480 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
481 | $ echo d > d |
|
481 | $ echo d > d | |
482 | $ hg ci -Am1 |
|
482 | $ hg ci -Am1 | |
483 | adding d |
|
483 | adding d | |
484 | committing subrepository s |
|
484 | committing subrepository s | |
485 | $ hg up 3 |
|
485 | $ hg up 3 | |
486 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
486 | 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
487 | $ hg -R s up 5 |
|
487 | $ hg -R s up 5 | |
488 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
488 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
489 | $ echo e > e |
|
489 | $ echo e > e | |
490 | $ hg ci -Am1 |
|
490 | $ hg ci -Am1 | |
491 | adding e |
|
491 | adding e | |
492 | committing subrepository s |
|
492 | committing subrepository s | |
493 |
|
493 | |||
494 | $ hg up 5 |
|
494 | $ hg up 5 | |
495 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
495 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
496 | $ hg merge 4 # try to merge default into br again |
|
496 | $ hg merge 4 # try to merge default into br again | |
497 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
497 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
498 | (branch merge, don't forget to commit) |
|
498 | (branch merge, don't forget to commit) | |
499 | $ cd .. |
|
499 | $ cd .. | |
500 |
|
500 | |||
501 | test subrepo delete from .hgsubstate |
|
501 | test subrepo delete from .hgsubstate | |
502 |
|
502 | |||
503 | $ hg init testdelete |
|
503 | $ hg init testdelete | |
504 | $ mkdir testdelete/nested testdelete/nested2 |
|
504 | $ mkdir testdelete/nested testdelete/nested2 | |
505 | $ hg init testdelete/nested |
|
505 | $ hg init testdelete/nested | |
506 | $ hg init testdelete/nested2 |
|
506 | $ hg init testdelete/nested2 | |
507 | $ echo test > testdelete/nested/foo |
|
507 | $ echo test > testdelete/nested/foo | |
508 | $ echo test > testdelete/nested2/foo |
|
508 | $ echo test > testdelete/nested2/foo | |
509 | $ hg -R testdelete/nested add |
|
509 | $ hg -R testdelete/nested add | |
510 | adding testdelete/nested/foo (glob) |
|
510 | adding testdelete/nested/foo (glob) | |
511 | $ hg -R testdelete/nested2 add |
|
511 | $ hg -R testdelete/nested2 add | |
512 | adding testdelete/nested2/foo (glob) |
|
512 | adding testdelete/nested2/foo (glob) | |
513 | $ hg -R testdelete/nested ci -m test |
|
513 | $ hg -R testdelete/nested ci -m test | |
514 | $ hg -R testdelete/nested2 ci -m test |
|
514 | $ hg -R testdelete/nested2 ci -m test | |
515 | $ echo nested = nested > testdelete/.hgsub |
|
515 | $ echo nested = nested > testdelete/.hgsub | |
516 | $ echo nested2 = nested2 >> testdelete/.hgsub |
|
516 | $ echo nested2 = nested2 >> testdelete/.hgsub | |
517 | $ hg -R testdelete add |
|
517 | $ hg -R testdelete add | |
518 | adding testdelete/.hgsub (glob) |
|
518 | adding testdelete/.hgsub (glob) | |
519 | $ hg -R testdelete ci -m "nested 1 & 2 added" |
|
519 | $ hg -R testdelete ci -m "nested 1 & 2 added" | |
520 | committing subrepository nested |
|
520 | committing subrepository nested | |
521 | committing subrepository nested2 |
|
521 | committing subrepository nested2 | |
522 | $ echo nested = nested > testdelete/.hgsub |
|
522 | $ echo nested = nested > testdelete/.hgsub | |
523 | $ hg -R testdelete ci -m "nested 2 deleted" |
|
523 | $ hg -R testdelete ci -m "nested 2 deleted" | |
524 | $ cat testdelete/.hgsubstate |
|
524 | $ cat testdelete/.hgsubstate | |
525 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
525 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
526 | $ hg -R testdelete remove testdelete/.hgsub |
|
526 | $ hg -R testdelete remove testdelete/.hgsub | |
527 | $ hg -R testdelete ci -m ".hgsub deleted" |
|
527 | $ hg -R testdelete ci -m ".hgsub deleted" | |
528 | $ cat testdelete/.hgsubstate |
|
528 | $ cat testdelete/.hgsubstate | |
529 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested |
|
529 | bdf5c9a3103743d900b12ae0db3ffdcfd7b0d878 nested | |
530 |
|
530 | |||
531 | test repository cloning |
|
531 | test repository cloning | |
532 |
|
532 | |||
533 | $ mkdir mercurial mercurial2 |
|
533 | $ mkdir mercurial mercurial2 | |
534 | $ hg init nested_absolute |
|
534 | $ hg init nested_absolute | |
535 | $ echo test > nested_absolute/foo |
|
535 | $ echo test > nested_absolute/foo | |
536 | $ hg -R nested_absolute add |
|
536 | $ hg -R nested_absolute add | |
537 | adding nested_absolute/foo (glob) |
|
537 | adding nested_absolute/foo (glob) | |
538 | $ hg -R nested_absolute ci -mtest |
|
538 | $ hg -R nested_absolute ci -mtest | |
539 | $ cd mercurial |
|
539 | $ cd mercurial | |
540 | $ hg init nested_relative |
|
540 | $ hg init nested_relative | |
541 | $ echo test2 > nested_relative/foo2 |
|
541 | $ echo test2 > nested_relative/foo2 | |
542 | $ hg -R nested_relative add |
|
542 | $ hg -R nested_relative add | |
543 | adding nested_relative/foo2 (glob) |
|
543 | adding nested_relative/foo2 (glob) | |
544 | $ hg -R nested_relative ci -mtest2 |
|
544 | $ hg -R nested_relative ci -mtest2 | |
545 | $ hg init main |
|
545 | $ hg init main | |
546 | $ echo "nested_relative = ../nested_relative" > main/.hgsub |
|
546 | $ echo "nested_relative = ../nested_relative" > main/.hgsub | |
547 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub |
|
547 | $ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub | |
548 | $ hg -R main add |
|
548 | $ hg -R main add | |
549 | adding main/.hgsub (glob) |
|
549 | adding main/.hgsub (glob) | |
550 | $ hg -R main ci -m "add subrepos" |
|
550 | $ hg -R main ci -m "add subrepos" | |
551 | committing subrepository nested_absolute |
|
551 | committing subrepository nested_absolute | |
552 | committing subrepository nested_relative |
|
552 | committing subrepository nested_relative | |
553 | $ cd .. |
|
553 | $ cd .. | |
554 | $ hg clone mercurial/main mercurial2/main |
|
554 | $ hg clone mercurial/main mercurial2/main | |
555 | updating to branch default |
|
555 | updating to branch default | |
556 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
556 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
557 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ |
|
557 | $ cat mercurial2/main/nested_absolute/.hg/hgrc \ | |
558 | > mercurial2/main/nested_relative/.hg/hgrc |
|
558 | > mercurial2/main/nested_relative/.hg/hgrc | |
559 | [paths] |
|
559 | [paths] | |
560 | default = $TESTTMP/sub/mercurial/nested_absolute |
|
560 | default = $TESTTMP/sub/mercurial/nested_absolute | |
561 | [paths] |
|
561 | [paths] | |
562 | default = $TESTTMP/sub/mercurial/nested_relative |
|
562 | default = $TESTTMP/sub/mercurial/nested_relative | |
563 | $ rm -rf mercurial mercurial2 |
|
563 | $ rm -rf mercurial mercurial2 | |
564 |
|
564 | |||
565 | Issue1977: multirepo push should fail if subrepo push fails |
|
565 | Issue1977: multirepo push should fail if subrepo push fails | |
566 |
|
566 | |||
567 | $ hg init repo |
|
567 | $ hg init repo | |
568 | $ hg init repo/s |
|
568 | $ hg init repo/s | |
569 | $ echo a > repo/s/a |
|
569 | $ echo a > repo/s/a | |
570 | $ hg -R repo/s ci -Am0 |
|
570 | $ hg -R repo/s ci -Am0 | |
571 | adding a |
|
571 | adding a | |
572 | $ echo s = s > repo/.hgsub |
|
572 | $ echo s = s > repo/.hgsub | |
573 | $ hg -R repo ci -Am1 |
|
573 | $ hg -R repo ci -Am1 | |
574 | adding .hgsub |
|
574 | adding .hgsub | |
575 | committing subrepository s |
|
575 | committing subrepository s | |
576 | $ hg clone repo repo2 |
|
576 | $ hg clone repo repo2 | |
577 | updating to branch default |
|
577 | updating to branch default | |
578 | cloning subrepo s from $TESTTMP/sub/repo/s (glob) |
|
578 | cloning subrepo s from $TESTTMP/sub/repo/s (glob) | |
579 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
579 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
580 | $ hg -q -R repo2 pull -u |
|
580 | $ hg -q -R repo2 pull -u | |
581 | $ echo 1 > repo2/s/a |
|
581 | $ echo 1 > repo2/s/a | |
582 | $ hg -R repo2/s ci -m2 |
|
582 | $ hg -R repo2/s ci -m2 | |
583 | $ hg -q -R repo2/s push |
|
583 | $ hg -q -R repo2/s push | |
584 | $ hg -R repo2/s up -C 0 |
|
584 | $ hg -R repo2/s up -C 0 | |
585 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
585 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
586 | $ echo 2 > repo2/s/a |
|
586 | $ echo 2 > repo2/s/a | |
587 | $ hg -R repo2/s ci -m3 |
|
587 | $ hg -R repo2/s ci -m3 | |
588 | created new head |
|
588 | created new head | |
589 | $ hg -R repo2 ci -m3 |
|
589 | $ hg -R repo2 ci -m3 | |
590 | committing subrepository s |
|
590 | committing subrepository s | |
591 | $ hg -q -R repo2 push |
|
591 | $ hg -q -R repo2 push | |
592 | abort: push creates new remote head 9d66565e64e1! |
|
592 | abort: push creates new remote head 9d66565e64e1! | |
593 | (did you forget to merge? use push -f to force) |
|
593 | (did you forget to merge? use push -f to force) | |
594 | [255] |
|
594 | [255] | |
595 | $ hg -R repo update |
|
595 | $ hg -R repo update | |
596 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
596 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
597 | $ rm -rf repo2 repo |
|
597 | $ rm -rf repo2 repo | |
598 |
|
598 | |||
599 |
|
599 | |||
600 | Issue1852 subrepos with relative paths always push/pull relative to default |
|
600 | Issue1852 subrepos with relative paths always push/pull relative to default | |
601 |
|
601 | |||
602 | Prepare a repo with subrepo |
|
602 | Prepare a repo with subrepo | |
603 |
|
603 | |||
604 | $ hg init issue1852a |
|
604 | $ hg init issue1852a | |
605 | $ cd issue1852a |
|
605 | $ cd issue1852a | |
606 | $ hg init sub/repo |
|
606 | $ hg init sub/repo | |
607 | $ echo test > sub/repo/foo |
|
607 | $ echo test > sub/repo/foo | |
608 | $ hg -R sub/repo add sub/repo/foo |
|
608 | $ hg -R sub/repo add sub/repo/foo | |
609 | $ echo sub/repo = sub/repo > .hgsub |
|
609 | $ echo sub/repo = sub/repo > .hgsub | |
610 | $ hg add .hgsub |
|
610 | $ hg add .hgsub | |
611 | $ hg ci -mtest |
|
611 | $ hg ci -mtest | |
612 | committing subrepository sub/repo (glob) |
|
612 | committing subrepository sub/repo (glob) | |
613 | $ echo test >> sub/repo/foo |
|
613 | $ echo test >> sub/repo/foo | |
614 | $ hg ci -mtest |
|
614 | $ hg ci -mtest | |
615 | committing subrepository sub/repo (glob) |
|
615 | committing subrepository sub/repo (glob) | |
616 | $ cd .. |
|
616 | $ cd .. | |
617 |
|
617 | |||
618 | Create repo without default path, pull top repo, and see what happens on update |
|
618 | Create repo without default path, pull top repo, and see what happens on update | |
619 |
|
619 | |||
620 | $ hg init issue1852b |
|
620 | $ hg init issue1852b | |
621 | $ hg -R issue1852b pull issue1852a |
|
621 | $ hg -R issue1852b pull issue1852a | |
622 | pulling from issue1852a |
|
622 | pulling from issue1852a | |
623 | requesting all changes |
|
623 | requesting all changes | |
624 | adding changesets |
|
624 | adding changesets | |
625 | adding manifests |
|
625 | adding manifests | |
626 | adding file changes |
|
626 | adding file changes | |
627 | added 2 changesets with 3 changes to 2 files |
|
627 | added 2 changesets with 3 changes to 2 files | |
628 | (run 'hg update' to get a working copy) |
|
628 | (run 'hg update' to get a working copy) | |
629 | $ hg -R issue1852b update |
|
629 | $ hg -R issue1852b update | |
630 | abort: default path for subrepository sub/repo not found (glob) |
|
630 | abort: default path for subrepository sub/repo not found (glob) | |
631 | [255] |
|
631 | [255] | |
632 |
|
632 | |||
633 | Pull -u now doesn't help |
|
633 | Pull -u now doesn't help | |
634 |
|
634 | |||
635 | $ hg -R issue1852b pull -u issue1852a |
|
635 | $ hg -R issue1852b pull -u issue1852a | |
636 | pulling from issue1852a |
|
636 | pulling from issue1852a | |
637 | searching for changes |
|
637 | searching for changes | |
638 | no changes found |
|
638 | no changes found | |
639 |
|
639 | |||
640 | Try the same, but with pull -u |
|
640 | Try the same, but with pull -u | |
641 |
|
641 | |||
642 | $ hg init issue1852c |
|
642 | $ hg init issue1852c | |
643 | $ hg -R issue1852c pull -r0 -u issue1852a |
|
643 | $ hg -R issue1852c pull -r0 -u issue1852a | |
644 | pulling from issue1852a |
|
644 | pulling from issue1852a | |
645 | adding changesets |
|
645 | adding changesets | |
646 | adding manifests |
|
646 | adding manifests | |
647 | adding file changes |
|
647 | adding file changes | |
648 | added 1 changesets with 2 changes to 2 files |
|
648 | added 1 changesets with 2 changes to 2 files | |
649 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) |
|
649 | cloning subrepo sub/repo from issue1852a/sub/repo (glob) | |
650 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
650 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
651 |
|
651 | |||
652 | Try to push from the other side |
|
652 | Try to push from the other side | |
653 |
|
653 | |||
654 | $ hg -R issue1852a push `pwd`/issue1852c |
|
654 | $ hg -R issue1852a push `pwd`/issue1852c | |
655 | pushing to $TESTTMP/sub/issue1852c |
|
655 | pushing to $TESTTMP/sub/issue1852c | |
656 | pushing subrepo sub/repo to $TESTTMP/sub/issue1852c/sub/repo (glob) |
|
656 | pushing subrepo sub/repo to $TESTTMP/sub/issue1852c/sub/repo (glob) | |
657 | searching for changes |
|
657 | searching for changes | |
658 | no changes found |
|
658 | no changes found | |
659 | searching for changes |
|
659 | searching for changes | |
660 | adding changesets |
|
660 | adding changesets | |
661 | adding manifests |
|
661 | adding manifests | |
662 | adding file changes |
|
662 | adding file changes | |
663 | added 1 changesets with 1 changes to 1 files |
|
663 | added 1 changesets with 1 changes to 1 files | |
664 |
|
664 | |||
665 | Incoming and outgoing should not use the default path: |
|
665 | Incoming and outgoing should not use the default path: | |
666 |
|
666 | |||
667 | $ hg clone -q issue1852a issue1852d |
|
667 | $ hg clone -q issue1852a issue1852d | |
668 | $ hg -R issue1852d outgoing --subrepos issue1852c |
|
668 | $ hg -R issue1852d outgoing --subrepos issue1852c | |
669 | comparing with issue1852c |
|
669 | comparing with issue1852c | |
670 | searching for changes |
|
670 | searching for changes | |
671 | no changes found |
|
671 | no changes found | |
672 | comparing with issue1852c/sub/repo |
|
672 | comparing with issue1852c/sub/repo | |
673 | searching for changes |
|
673 | searching for changes | |
674 | no changes found |
|
674 | no changes found | |
675 | [1] |
|
675 | [1] | |
676 | $ hg -R issue1852d incoming --subrepos issue1852c |
|
676 | $ hg -R issue1852d incoming --subrepos issue1852c | |
677 | comparing with issue1852c |
|
677 | comparing with issue1852c | |
678 | searching for changes |
|
678 | searching for changes | |
679 | no changes found |
|
679 | no changes found | |
680 | comparing with issue1852c/sub/repo |
|
680 | comparing with issue1852c/sub/repo | |
681 | searching for changes |
|
681 | searching for changes | |
682 | no changes found |
|
682 | no changes found | |
683 | [1] |
|
683 | [1] | |
684 |
|
684 | |||
685 | Check status of files when none of them belong to the first |
|
685 | Check status of files when none of them belong to the first | |
686 | subrepository: |
|
686 | subrepository: | |
687 |
|
687 | |||
688 | $ hg init subrepo-status |
|
688 | $ hg init subrepo-status | |
689 | $ cd subrepo-status |
|
689 | $ cd subrepo-status | |
690 | $ hg init subrepo-1 |
|
690 | $ hg init subrepo-1 | |
691 | $ hg init subrepo-2 |
|
691 | $ hg init subrepo-2 | |
692 | $ cd subrepo-2 |
|
692 | $ cd subrepo-2 | |
693 | $ touch file |
|
693 | $ touch file | |
694 | $ hg add file |
|
694 | $ hg add file | |
695 | $ cd .. |
|
695 | $ cd .. | |
696 | $ echo subrepo-1 = subrepo-1 > .hgsub |
|
696 | $ echo subrepo-1 = subrepo-1 > .hgsub | |
697 | $ echo subrepo-2 = subrepo-2 >> .hgsub |
|
697 | $ echo subrepo-2 = subrepo-2 >> .hgsub | |
698 | $ hg add .hgsub |
|
698 | $ hg add .hgsub | |
699 | $ hg ci -m 'Added subrepos' |
|
699 | $ hg ci -m 'Added subrepos' | |
700 | committing subrepository subrepo-1 |
|
700 | committing subrepository subrepo-1 | |
701 | committing subrepository subrepo-2 |
|
701 | committing subrepository subrepo-2 | |
702 | $ hg st subrepo-2/file |
|
702 | $ hg st subrepo-2/file | |
703 |
|
703 | |||
704 | Check hg update --clean |
|
704 | Check hg update --clean | |
705 | $ cd $TESTTMP/sub/t |
|
705 | $ cd $TESTTMP/sub/t | |
706 | $ rm -r t/t.orig |
|
706 | $ rm -r t/t.orig | |
707 | $ hg status -S --all |
|
707 | $ hg status -S --all | |
708 | C .hgsub |
|
708 | C .hgsub | |
709 | C .hgsubstate |
|
709 | C .hgsubstate | |
710 | C a |
|
710 | C a | |
711 | C s/.hgsub |
|
711 | C s/.hgsub | |
712 | C s/.hgsubstate |
|
712 | C s/.hgsubstate | |
713 | C s/a |
|
713 | C s/a | |
714 | C s/ss/a |
|
714 | C s/ss/a | |
715 | C t/t |
|
715 | C t/t | |
716 | $ echo c1 > s/a |
|
716 | $ echo c1 > s/a | |
717 | $ cd s |
|
717 | $ cd s | |
718 | $ echo c1 > b |
|
718 | $ echo c1 > b | |
719 | $ echo c1 > c |
|
719 | $ echo c1 > c | |
720 | $ hg add b |
|
720 | $ hg add b | |
721 | $ cd .. |
|
721 | $ cd .. | |
722 | $ hg status -S |
|
722 | $ hg status -S | |
723 | M s/a |
|
723 | M s/a | |
724 | A s/b |
|
724 | A s/b | |
725 | ? s/c |
|
725 | ? s/c | |
726 | $ hg update -C |
|
726 | $ hg update -C | |
727 | 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 | |
728 | $ hg status -S |
|
728 | $ hg status -S | |
729 | ? s/b |
|
729 | ? s/b | |
730 | ? s/c |
|
730 | ? s/c | |
731 |
|
731 | |||
732 | Sticky subrepositories, no changes |
|
732 | Sticky subrepositories, no changes | |
733 | $ cd $TESTTMP/sub/t |
|
733 | $ cd $TESTTMP/sub/t | |
734 | $ hg id |
|
734 | $ hg id | |
735 | 925c17564ef8 tip |
|
735 | 925c17564ef8 tip | |
736 | $ hg -R s id |
|
736 | $ hg -R s id | |
737 | 12a213df6fa9 tip |
|
737 | 12a213df6fa9 tip | |
738 | $ hg -R t id |
|
738 | $ hg -R t id | |
739 | 52c0adc0515a tip |
|
739 | 52c0adc0515a tip | |
740 | $ hg update 11 |
|
740 | $ hg update 11 | |
741 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
741 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
742 | $ hg id |
|
742 | $ hg id | |
743 | 365661e5936a |
|
743 | 365661e5936a | |
744 | $ hg -R s id |
|
744 | $ hg -R s id | |
745 | fc627a69481f |
|
745 | fc627a69481f | |
746 | $ hg -R t id |
|
746 | $ hg -R t id | |
747 | e95bcfa18a35 |
|
747 | e95bcfa18a35 | |
748 |
|
748 | |||
749 | Sticky subrepositorys, file changes |
|
749 | Sticky subrepositorys, file changes | |
750 | $ touch s/f1 |
|
750 | $ touch s/f1 | |
751 | $ touch t/f1 |
|
751 | $ touch t/f1 | |
752 | $ hg add -S s/f1 |
|
752 | $ hg add -S s/f1 | |
753 | $ hg add -S t/f1 |
|
753 | $ hg add -S t/f1 | |
754 | $ hg id |
|
754 | $ hg id | |
755 | 365661e5936a |
|
755 | 365661e5936a | |
756 | $ hg -R s id |
|
756 | $ hg -R s id | |
757 | fc627a69481f+ |
|
757 | fc627a69481f+ | |
758 | $ hg -R t id |
|
758 | $ hg -R t id | |
759 | e95bcfa18a35+ |
|
759 | e95bcfa18a35+ | |
760 | $ hg update tip |
|
760 | $ hg update tip | |
761 | subrepository sources for s differ |
|
761 | subrepository sources for s differ | |
762 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? |
|
762 | use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)? | |
763 | l |
|
763 | l | |
764 | subrepository sources for t differ |
|
764 | subrepository sources for t differ | |
765 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? |
|
765 | use (l)ocal source (e95bcfa18a35) or (r)emote source (52c0adc0515a)? | |
766 | l |
|
766 | l | |
767 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
767 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
768 | $ hg id |
|
768 | $ hg id | |
769 | 925c17564ef8+ tip |
|
769 | 925c17564ef8+ tip | |
770 | $ hg -R s id |
|
770 | $ hg -R s id | |
771 | fc627a69481f+ |
|
771 | fc627a69481f+ | |
772 | $ hg -R t id |
|
772 | $ hg -R t id | |
773 | e95bcfa18a35+ |
|
773 | e95bcfa18a35+ | |
774 | $ hg update --clean tip |
|
774 | $ hg update --clean tip | |
775 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
775 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
776 |
|
776 | |||
777 | Sticky subrepository, revision updates |
|
777 | Sticky subrepository, revision updates | |
778 | $ hg id |
|
778 | $ hg id | |
779 | 925c17564ef8 tip |
|
779 | 925c17564ef8 tip | |
780 | $ hg -R s id |
|
780 | $ hg -R s id | |
781 | 12a213df6fa9 tip |
|
781 | 12a213df6fa9 tip | |
782 | $ hg -R t id |
|
782 | $ hg -R t id | |
783 | 52c0adc0515a tip |
|
783 | 52c0adc0515a tip | |
784 | $ cd s |
|
784 | $ cd s | |
785 | $ hg update -r -2 |
|
785 | $ hg update -r -2 | |
786 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
786 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
787 | $ cd ../t |
|
787 | $ cd ../t | |
788 | $ hg update -r 2 |
|
788 | $ hg update -r 2 | |
789 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
789 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
790 | $ cd .. |
|
790 | $ cd .. | |
791 | $ hg update 10 |
|
791 | $ hg update 10 | |
792 | subrepository sources for t differ (in checked out version) |
|
792 | subrepository sources for t differ (in checked out version) | |
793 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? |
|
793 | use (l)ocal source (7af322bc1198) or (r)emote source (20a0db6fbf6c)? | |
794 | l |
|
794 | l | |
795 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
795 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
796 | $ hg id |
|
796 | $ hg id | |
797 | e45c8b14af55+ |
|
797 | e45c8b14af55+ | |
798 | $ hg -R s id |
|
798 | $ hg -R s id | |
799 | 1c833a7a9e3a |
|
799 | 1c833a7a9e3a | |
800 | $ hg -R t id |
|
800 | $ hg -R t id | |
801 | 7af322bc1198 |
|
801 | 7af322bc1198 | |
802 |
|
802 | |||
803 | Sticky subrepository, file changes and revision updates |
|
803 | Sticky subrepository, file changes and revision updates | |
804 | $ touch s/f1 |
|
804 | $ touch s/f1 | |
805 | $ touch t/f1 |
|
805 | $ touch t/f1 | |
806 | $ hg add -S s/f1 |
|
806 | $ hg add -S s/f1 | |
807 | $ hg add -S t/f1 |
|
807 | $ hg add -S t/f1 | |
808 | $ hg id |
|
808 | $ hg id | |
809 | e45c8b14af55+ |
|
809 | e45c8b14af55+ | |
810 | $ hg -R s id |
|
810 | $ hg -R s id | |
811 | 1c833a7a9e3a+ |
|
811 | 1c833a7a9e3a+ | |
812 | $ hg -R t id |
|
812 | $ hg -R t id | |
813 | 7af322bc1198+ |
|
813 | 7af322bc1198+ | |
814 | $ hg update tip |
|
814 | $ hg update tip | |
815 | subrepository sources for s differ |
|
815 | subrepository sources for s differ | |
816 | use (l)ocal source (1c833a7a9e3a) or (r)emote source (12a213df6fa9)? |
|
816 | use (l)ocal source (1c833a7a9e3a) or (r)emote source (12a213df6fa9)? | |
817 | l |
|
817 | l | |
818 | subrepository sources for t differ |
|
818 | subrepository sources for t differ | |
819 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? |
|
819 | use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)? | |
820 | l |
|
820 | l | |
821 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
821 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
822 | $ hg id |
|
822 | $ hg id | |
823 | 925c17564ef8 tip |
|
823 | 925c17564ef8 tip | |
824 | $ hg -R s id |
|
824 | $ hg -R s id | |
825 | 1c833a7a9e3a+ |
|
825 | 1c833a7a9e3a+ | |
826 | $ hg -R t id |
|
826 | $ hg -R t id | |
827 | 7af322bc1198+ |
|
827 | 7af322bc1198+ | |
828 |
|
828 | |||
829 | Sticky repository, update --clean |
|
829 | Sticky repository, update --clean | |
830 | $ hg update --clean tip |
|
830 | $ hg update --clean tip | |
831 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
831 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
832 | $ hg id |
|
832 | $ hg id | |
833 | 925c17564ef8 tip |
|
833 | 925c17564ef8 tip | |
834 | $ hg -R s id |
|
834 | $ hg -R s id | |
835 | 12a213df6fa9 tip |
|
835 | 12a213df6fa9 tip | |
836 | $ hg -R t id |
|
836 | $ hg -R t id | |
837 | 52c0adc0515a tip |
|
837 | 52c0adc0515a tip | |
838 |
|
838 | |||
839 | Test subrepo already at intended revision: |
|
839 | Test subrepo already at intended revision: | |
840 | $ cd s |
|
840 | $ cd s | |
841 | $ hg update fc627a69481f |
|
841 | $ hg update fc627a69481f | |
842 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
842 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
843 | $ cd .. |
|
843 | $ cd .. | |
844 | $ hg update 11 |
|
844 | $ hg update 11 | |
845 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
845 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
846 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
846 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
847 | $ hg id -n |
|
847 | $ hg id -n | |
848 | 11+ |
|
848 | 11+ | |
849 | $ hg -R s id |
|
849 | $ hg -R s id | |
850 | fc627a69481f |
|
850 | fc627a69481f | |
851 | $ hg -R t id |
|
851 | $ hg -R t id | |
852 | e95bcfa18a35 |
|
852 | e95bcfa18a35 | |
853 |
|
853 | |||
854 | Test that removing .hgsubstate doesn't break anything: |
|
854 | Test that removing .hgsubstate doesn't break anything: | |
855 |
|
855 | |||
856 | $ hg rm -f .hgsubstate |
|
856 | $ hg rm -f .hgsubstate | |
857 | $ hg ci -mrm |
|
857 | $ hg ci -mrm | |
858 | committing subrepository s |
|
858 | committing subrepository s | |
859 | committing subrepository t |
|
859 | committing subrepository t | |
860 | created new head |
|
860 | created new head | |
861 | $ hg log -vr tip |
|
861 | $ hg log -vr tip | |
862 | changeset: 14:3941e0aa5236 |
|
862 | changeset: 14:3941e0aa5236 | |
863 | tag: tip |
|
863 | tag: tip | |
864 | parent: 11:365661e5936a |
|
864 | parent: 11:365661e5936a | |
865 | user: test |
|
865 | user: test | |
866 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
866 | date: Thu Jan 01 00:00:00 1970 +0000 | |
867 | description: |
|
867 | description: | |
868 | rm |
|
868 | rm | |
869 |
|
869 | |||
870 |
|
870 | |||
871 |
|
871 | |||
872 | Test that removing .hgsub removes .hgsubstate: |
|
872 | Test that removing .hgsub removes .hgsubstate: | |
873 |
|
873 | |||
874 | $ hg rm .hgsub |
|
874 | $ hg rm .hgsub | |
875 | $ hg ci -mrm2 |
|
875 | $ hg ci -mrm2 | |
876 | $ hg log -vr tip |
|
876 | $ hg log -vr tip | |
877 | changeset: 15:8b31de9d13d1 |
|
877 | changeset: 15:8b31de9d13d1 | |
878 | tag: tip |
|
878 | tag: tip | |
879 | user: test |
|
879 | user: test | |
880 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
880 | date: Thu Jan 01 00:00:00 1970 +0000 | |
881 | files: .hgsub .hgsubstate |
|
881 | files: .hgsub .hgsubstate | |
882 | description: |
|
882 | description: | |
883 | rm2 |
|
883 | rm2 | |
884 |
|
884 | |||
885 |
|
885 | |||
886 | Test behavior of add for explicit path in subrepo: |
|
886 | Test behavior of add for explicit path in subrepo: | |
887 | $ cd .. |
|
887 | $ cd .. | |
888 | $ hg init explicit |
|
888 | $ hg init explicit | |
889 | $ cd explicit |
|
889 | $ cd explicit | |
890 | $ echo s = s > .hgsub |
|
890 | $ echo s = s > .hgsub | |
891 | $ hg add .hgsub |
|
891 | $ hg add .hgsub | |
892 | $ hg init s |
|
892 | $ hg init s | |
893 | $ hg ci -m0 |
|
893 | $ hg ci -m0 | |
894 | committing subrepository s |
|
894 | committing subrepository s | |
895 | Adding with an explicit path in a subrepo adds the file |
|
895 | Adding with an explicit path in a subrepo adds the file | |
896 | $ echo c1 > f1 |
|
896 | $ echo c1 > f1 | |
897 | $ echo c2 > s/f2 |
|
897 | $ echo c2 > s/f2 | |
898 | $ hg st -S |
|
898 | $ hg st -S | |
899 | ? f1 |
|
899 | ? f1 | |
900 | ? s/f2 |
|
900 | ? s/f2 | |
901 | $ hg add s/f2 |
|
901 | $ hg add s/f2 | |
902 | $ hg st -S |
|
902 | $ hg st -S | |
903 | A s/f2 |
|
903 | A s/f2 | |
904 | ? f1 |
|
904 | ? f1 | |
905 | $ hg ci -R s -m0 |
|
905 | $ hg ci -R s -m0 | |
906 | $ hg ci -Am1 |
|
906 | $ hg ci -Am1 | |
907 | adding f1 |
|
907 | adding f1 | |
908 | committing subrepository s |
|
908 | committing subrepository s | |
909 | Adding with an explicit path in a subrepo with -S has the same behavior |
|
909 | Adding with an explicit path in a subrepo with -S has the same behavior | |
910 | $ echo c3 > f3 |
|
910 | $ echo c3 > f3 | |
911 | $ echo c4 > s/f4 |
|
911 | $ echo c4 > s/f4 | |
912 | $ hg st -S |
|
912 | $ hg st -S | |
913 | ? f3 |
|
913 | ? f3 | |
914 | ? s/f4 |
|
914 | ? s/f4 | |
915 | $ hg add -S s/f4 |
|
915 | $ hg add -S s/f4 | |
916 | $ hg st -S |
|
916 | $ hg st -S | |
917 | A s/f4 |
|
917 | A s/f4 | |
918 | ? f3 |
|
918 | ? f3 | |
919 | $ hg ci -R s -m1 |
|
919 | $ hg ci -R s -m1 | |
920 | $ hg ci -Ama2 |
|
920 | $ hg ci -Ama2 | |
921 | adding f3 |
|
921 | adding f3 | |
922 | committing subrepository s |
|
922 | committing subrepository s | |
923 | Adding without a path or pattern silently ignores subrepos |
|
923 | Adding without a path or pattern silently ignores subrepos | |
924 | $ echo c5 > f5 |
|
924 | $ echo c5 > f5 | |
925 | $ echo c6 > s/f6 |
|
925 | $ echo c6 > s/f6 | |
926 | $ echo c7 > s/f7 |
|
926 | $ echo c7 > s/f7 | |
927 | $ hg st -S |
|
927 | $ hg st -S | |
928 | ? f5 |
|
928 | ? f5 | |
929 | ? s/f6 |
|
929 | ? s/f6 | |
930 | ? s/f7 |
|
930 | ? s/f7 | |
931 | $ hg add |
|
931 | $ hg add | |
932 | adding f5 |
|
932 | adding f5 | |
933 | $ hg st -S |
|
933 | $ hg st -S | |
934 | A f5 |
|
934 | A f5 | |
935 | ? s/f6 |
|
935 | ? s/f6 | |
936 | ? s/f7 |
|
936 | ? s/f7 | |
937 | $ hg ci -R s -Am2 |
|
937 | $ hg ci -R s -Am2 | |
938 | adding f6 |
|
938 | adding f6 | |
939 | adding f7 |
|
939 | adding f7 | |
940 | $ hg ci -m3 |
|
940 | $ hg ci -m3 | |
941 | committing subrepository s |
|
941 | committing subrepository s | |
942 | Adding without a path or pattern with -S also adds files in subrepos |
|
942 | Adding without a path or pattern with -S also adds files in subrepos | |
943 | $ echo c8 > f8 |
|
943 | $ echo c8 > f8 | |
944 | $ echo c9 > s/f9 |
|
944 | $ echo c9 > s/f9 | |
945 | $ echo c10 > s/f10 |
|
945 | $ echo c10 > s/f10 | |
946 | $ hg st -S |
|
946 | $ hg st -S | |
947 | ? f8 |
|
947 | ? f8 | |
948 | ? s/f10 |
|
948 | ? s/f10 | |
949 | ? s/f9 |
|
949 | ? s/f9 | |
950 | $ hg add -S |
|
950 | $ hg add -S | |
951 | adding f8 |
|
951 | adding f8 | |
952 | adding s/f10 |
|
952 | adding s/f10 (glob) | |
953 | adding s/f9 |
|
953 | adding s/f9 (glob) | |
954 | $ hg st -S |
|
954 | $ hg st -S | |
955 | A f8 |
|
955 | A f8 | |
956 | A s/f10 |
|
956 | A s/f10 | |
957 | A s/f9 |
|
957 | A s/f9 | |
958 | $ hg ci -R s -m3 |
|
958 | $ hg ci -R s -m3 | |
959 | $ hg ci -m4 |
|
959 | $ hg ci -m4 | |
960 | committing subrepository s |
|
960 | committing subrepository s | |
961 | Adding with a pattern silently ignores subrepos |
|
961 | Adding with a pattern silently ignores subrepos | |
962 | $ echo c11 > fm11 |
|
962 | $ echo c11 > fm11 | |
963 | $ echo c12 > fn12 |
|
963 | $ echo c12 > fn12 | |
964 | $ echo c13 > s/fm13 |
|
964 | $ echo c13 > s/fm13 | |
965 | $ echo c14 > s/fn14 |
|
965 | $ echo c14 > s/fn14 | |
966 | $ hg st -S |
|
966 | $ hg st -S | |
967 | ? fm11 |
|
967 | ? fm11 | |
968 | ? fn12 |
|
968 | ? fn12 | |
969 | ? s/fm13 |
|
969 | ? s/fm13 | |
970 | ? s/fn14 |
|
970 | ? s/fn14 | |
971 | $ hg add 'glob:**fm*' |
|
971 | $ hg add 'glob:**fm*' | |
972 | adding fm11 |
|
972 | adding fm11 | |
973 | $ hg st -S |
|
973 | $ hg st -S | |
974 | A fm11 |
|
974 | A fm11 | |
975 | ? fn12 |
|
975 | ? fn12 | |
976 | ? s/fm13 |
|
976 | ? s/fm13 | |
977 | ? s/fn14 |
|
977 | ? s/fn14 | |
978 | $ hg ci -R s -Am4 |
|
978 | $ hg ci -R s -Am4 | |
979 | adding fm13 |
|
979 | adding fm13 | |
980 | adding fn14 |
|
980 | adding fn14 | |
981 | $ hg ci -Am5 |
|
981 | $ hg ci -Am5 | |
982 | adding fn12 |
|
982 | adding fn12 | |
983 | committing subrepository s |
|
983 | committing subrepository s | |
984 | Adding with a pattern with -S also adds matches in subrepos |
|
984 | Adding with a pattern with -S also adds matches in subrepos | |
985 | $ echo c15 > fm15 |
|
985 | $ echo c15 > fm15 | |
986 | $ echo c16 > fn16 |
|
986 | $ echo c16 > fn16 | |
987 | $ echo c17 > s/fm17 |
|
987 | $ echo c17 > s/fm17 | |
988 | $ echo c18 > s/fn18 |
|
988 | $ echo c18 > s/fn18 | |
989 | $ hg st -S |
|
989 | $ hg st -S | |
990 | ? fm15 |
|
990 | ? fm15 | |
991 | ? fn16 |
|
991 | ? fn16 | |
992 | ? s/fm17 |
|
992 | ? s/fm17 | |
993 | ? s/fn18 |
|
993 | ? s/fn18 | |
994 | $ hg add -S 'glob:**fm*' |
|
994 | $ hg add -S 'glob:**fm*' | |
995 | adding fm15 |
|
995 | adding fm15 | |
996 | adding s/fm17 |
|
996 | adding s/fm17 (glob) | |
997 | $ hg st -S |
|
997 | $ hg st -S | |
998 | A fm15 |
|
998 | A fm15 | |
999 | A s/fm17 |
|
999 | A s/fm17 | |
1000 | ? fn16 |
|
1000 | ? fn16 | |
1001 | ? s/fn18 |
|
1001 | ? s/fn18 | |
1002 | $ hg ci -R s -Am5 |
|
1002 | $ hg ci -R s -Am5 | |
1003 | adding fn18 |
|
1003 | adding fn18 | |
1004 | $ hg ci -Am6 |
|
1004 | $ hg ci -Am6 | |
1005 | adding fn16 |
|
1005 | adding fn16 | |
1006 | committing subrepository s |
|
1006 | committing subrepository s | |
1007 |
|
1007 | |||
1008 | Test behavior of forget for explicit path in subrepo: |
|
1008 | Test behavior of forget for explicit path in subrepo: | |
1009 | Forgetting an explicit path in a subrepo untracks the file |
|
1009 | Forgetting an explicit path in a subrepo untracks the file | |
1010 | $ echo c19 > s/f19 |
|
1010 | $ echo c19 > s/f19 | |
1011 | $ hg add s/f19 |
|
1011 | $ hg add s/f19 | |
1012 | $ hg st -S |
|
1012 | $ hg st -S | |
1013 | A s/f19 |
|
1013 | A s/f19 | |
1014 | $ hg forget s/f19 |
|
1014 | $ hg forget s/f19 | |
1015 | $ hg st -S |
|
1015 | $ hg st -S | |
1016 | ? s/f19 |
|
1016 | ? s/f19 | |
1017 | $ rm s/f19 |
|
1017 | $ rm s/f19 |
@@ -1,424 +1,424 b'' | |||||
1 |
|
1 | |||
2 | $ hg init t |
|
2 | $ hg init t | |
3 | $ cd t |
|
3 | $ cd t | |
4 | $ cat > unix2dos.py <<EOF |
|
4 | $ cat > unix2dos.py <<EOF | |
5 | > import sys |
|
5 | > import sys | |
6 | > |
|
6 | > | |
7 | > for path in sys.argv[1:]: |
|
7 | > for path in sys.argv[1:]: | |
8 | > data = file(path, 'rb').read() |
|
8 | > data = file(path, 'rb').read() | |
9 | > data = data.replace('\n', '\r\n') |
|
9 | > data = data.replace('\n', '\r\n') | |
10 | > file(path, 'wb').write(data) |
|
10 | > file(path, 'wb').write(data) | |
11 | > EOF |
|
11 | > EOF | |
12 | $ echo '[hooks]' >> .hg/hgrc |
|
12 | $ echo '[hooks]' >> .hg/hgrc | |
13 | $ echo 'pretxncommit.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc |
|
13 | $ echo 'pretxncommit.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc | |
14 | $ echo 'pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc |
|
14 | $ echo 'pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf' >> .hg/hgrc | |
15 | $ cat .hg/hgrc |
|
15 | $ cat .hg/hgrc | |
16 | [hooks] |
|
16 | [hooks] | |
17 | pretxncommit.crlf = python:hgext.win32text.forbidcrlf |
|
17 | pretxncommit.crlf = python:hgext.win32text.forbidcrlf | |
18 | pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf |
|
18 | pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf | |
19 |
|
19 | |||
20 | $ echo hello > f |
|
20 | $ echo hello > f | |
21 | $ hg add f |
|
21 | $ hg add f | |
22 |
|
22 | |||
23 | commit should succeed |
|
23 | commit should succeed | |
24 |
|
24 | |||
25 | $ hg ci -m 1 |
|
25 | $ hg ci -m 1 | |
26 |
|
26 | |||
27 | $ hg clone . ../zoz |
|
27 | $ hg clone . ../zoz | |
28 | updating to branch default |
|
28 | updating to branch default | |
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
30 | $ cp .hg/hgrc ../zoz/.hg |
|
30 | $ cp .hg/hgrc ../zoz/.hg | |
31 | $ python unix2dos.py f |
|
31 | $ python unix2dos.py f | |
32 |
|
32 | |||
33 | commit should fail |
|
33 | commit should fail | |
34 |
|
34 | |||
35 | $ hg ci -m 2.1 |
|
35 | $ hg ci -m 2.1 | |
36 | Attempt to commit or push text file(s) using CRLF line endings |
|
36 | Attempt to commit or push text file(s) using CRLF line endings | |
37 | in f583ea08d42a: f |
|
37 | in f583ea08d42a: f | |
38 | transaction abort! |
|
38 | transaction abort! | |
39 | rollback completed |
|
39 | rollback completed | |
40 | abort: pretxncommit.crlf hook failed |
|
40 | abort: pretxncommit.crlf hook failed | |
41 | [255] |
|
41 | [255] | |
42 |
|
42 | |||
43 | $ mv .hg/hgrc .hg/hgrc.bak |
|
43 | $ mv .hg/hgrc .hg/hgrc.bak | |
44 |
|
44 | |||
45 | commits should succeed |
|
45 | commits should succeed | |
46 |
|
46 | |||
47 | $ hg ci -m 2 |
|
47 | $ hg ci -m 2 | |
48 | $ hg cp f g |
|
48 | $ hg cp f g | |
49 | $ hg ci -m 2.2 |
|
49 | $ hg ci -m 2.2 | |
50 |
|
50 | |||
51 | push should fail |
|
51 | push should fail | |
52 |
|
52 | |||
53 | $ hg push ../zoz |
|
53 | $ hg push ../zoz | |
54 | pushing to ../zoz |
|
54 | pushing to ../zoz | |
55 | searching for changes |
|
55 | searching for changes | |
56 | adding changesets |
|
56 | adding changesets | |
57 | adding manifests |
|
57 | adding manifests | |
58 | adding file changes |
|
58 | adding file changes | |
59 | added 2 changesets with 2 changes to 2 files |
|
59 | added 2 changesets with 2 changes to 2 files | |
60 | Attempt to commit or push text file(s) using CRLF line endings |
|
60 | Attempt to commit or push text file(s) using CRLF line endings | |
61 | in bc2d09796734: g |
|
61 | in bc2d09796734: g | |
62 | in b1aa5cde7ff4: f |
|
62 | in b1aa5cde7ff4: f | |
63 |
|
63 | |||
64 | To prevent this mistake in your local repository, |
|
64 | To prevent this mistake in your local repository, | |
65 | add to Mercurial.ini or .hg/hgrc: |
|
65 | add to Mercurial.ini or .hg/hgrc: | |
66 |
|
66 | |||
67 | [hooks] |
|
67 | [hooks] | |
68 | pretxncommit.crlf = python:hgext.win32text.forbidcrlf |
|
68 | pretxncommit.crlf = python:hgext.win32text.forbidcrlf | |
69 |
|
69 | |||
70 | and also consider adding: |
|
70 | and also consider adding: | |
71 |
|
71 | |||
72 | [extensions] |
|
72 | [extensions] | |
73 | win32text = |
|
73 | win32text = | |
74 | [encode] |
|
74 | [encode] | |
75 | ** = cleverencode: |
|
75 | ** = cleverencode: | |
76 | [decode] |
|
76 | [decode] | |
77 | ** = cleverdecode: |
|
77 | ** = cleverdecode: | |
78 | transaction abort! |
|
78 | transaction abort! | |
79 | rollback completed |
|
79 | rollback completed | |
80 | abort: pretxnchangegroup.crlf hook failed |
|
80 | abort: pretxnchangegroup.crlf hook failed | |
81 | [255] |
|
81 | [255] | |
82 |
|
82 | |||
83 | $ mv .hg/hgrc.bak .hg/hgrc |
|
83 | $ mv .hg/hgrc.bak .hg/hgrc | |
84 | $ echo hello > f |
|
84 | $ echo hello > f | |
85 | $ hg rm g |
|
85 | $ hg rm g | |
86 |
|
86 | |||
87 | commit should succeed |
|
87 | commit should succeed | |
88 |
|
88 | |||
89 | $ hg ci -m 2.3 |
|
89 | $ hg ci -m 2.3 | |
90 |
|
90 | |||
91 | push should succeed |
|
91 | push should succeed | |
92 |
|
92 | |||
93 | $ hg push ../zoz |
|
93 | $ hg push ../zoz | |
94 | pushing to ../zoz |
|
94 | pushing to ../zoz | |
95 | searching for changes |
|
95 | searching for changes | |
96 | adding changesets |
|
96 | adding changesets | |
97 | adding manifests |
|
97 | adding manifests | |
98 | adding file changes |
|
98 | adding file changes | |
99 | added 3 changesets with 3 changes to 2 files |
|
99 | added 3 changesets with 3 changes to 2 files | |
100 |
|
100 | |||
101 | and now for something completely different |
|
101 | and now for something completely different | |
102 |
|
102 | |||
103 | $ mkdir d |
|
103 | $ mkdir d | |
104 | $ echo hello > d/f2 |
|
104 | $ echo hello > d/f2 | |
105 | $ python unix2dos.py d/f2 |
|
105 | $ python unix2dos.py d/f2 | |
106 | $ hg add d/f2 |
|
106 | $ hg add d/f2 | |
107 | $ hg ci -m 3 |
|
107 | $ hg ci -m 3 | |
108 | Attempt to commit or push text file(s) using CRLF line endings |
|
108 | Attempt to commit or push text file(s) using CRLF line endings | |
109 | in 053ba1a3035a: d/f2 |
|
109 | in 053ba1a3035a: d/f2 | |
110 | transaction abort! |
|
110 | transaction abort! | |
111 | rollback completed |
|
111 | rollback completed | |
112 | abort: pretxncommit.crlf hook failed |
|
112 | abort: pretxncommit.crlf hook failed | |
113 | [255] |
|
113 | [255] | |
114 | $ hg revert -a |
|
114 | $ hg revert -a | |
115 | forgetting d/f2 |
|
115 | forgetting d/f2 (glob) | |
116 | $ rm d/f2 |
|
116 | $ rm d/f2 | |
117 |
|
117 | |||
118 | $ hg rem f |
|
118 | $ hg rem f | |
119 | $ hg ci -m 4 |
|
119 | $ hg ci -m 4 | |
120 |
|
120 | |||
121 | $ python -c 'file("bin", "wb").write("hello\x00\x0D\x0A")' |
|
121 | $ python -c 'file("bin", "wb").write("hello\x00\x0D\x0A")' | |
122 | $ hg add bin |
|
122 | $ hg add bin | |
123 | $ hg ci -m 5 |
|
123 | $ hg ci -m 5 | |
124 | $ hg log -v |
|
124 | $ hg log -v | |
125 | changeset: 5:f0b1c8d75fce |
|
125 | changeset: 5:f0b1c8d75fce | |
126 | tag: tip |
|
126 | tag: tip | |
127 | user: test |
|
127 | user: test | |
128 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
128 | date: Thu Jan 01 00:00:00 1970 +0000 | |
129 | files: bin |
|
129 | files: bin | |
130 | description: |
|
130 | description: | |
131 | 5 |
|
131 | 5 | |
132 |
|
132 | |||
133 |
|
133 | |||
134 | changeset: 4:77796dbcd4ad |
|
134 | changeset: 4:77796dbcd4ad | |
135 | user: test |
|
135 | user: test | |
136 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
136 | date: Thu Jan 01 00:00:00 1970 +0000 | |
137 | files: f |
|
137 | files: f | |
138 | description: |
|
138 | description: | |
139 | 4 |
|
139 | 4 | |
140 |
|
140 | |||
141 |
|
141 | |||
142 | changeset: 3:7c1b5430b350 |
|
142 | changeset: 3:7c1b5430b350 | |
143 | user: test |
|
143 | user: test | |
144 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
144 | date: Thu Jan 01 00:00:00 1970 +0000 | |
145 | files: f g |
|
145 | files: f g | |
146 | description: |
|
146 | description: | |
147 | 2.3 |
|
147 | 2.3 | |
148 |
|
148 | |||
149 |
|
149 | |||
150 | changeset: 2:bc2d09796734 |
|
150 | changeset: 2:bc2d09796734 | |
151 | user: test |
|
151 | user: test | |
152 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
152 | date: Thu Jan 01 00:00:00 1970 +0000 | |
153 | files: g |
|
153 | files: g | |
154 | description: |
|
154 | description: | |
155 | 2.2 |
|
155 | 2.2 | |
156 |
|
156 | |||
157 |
|
157 | |||
158 | changeset: 1:b1aa5cde7ff4 |
|
158 | changeset: 1:b1aa5cde7ff4 | |
159 | user: test |
|
159 | user: test | |
160 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
160 | date: Thu Jan 01 00:00:00 1970 +0000 | |
161 | files: f |
|
161 | files: f | |
162 | description: |
|
162 | description: | |
163 | 2 |
|
163 | 2 | |
164 |
|
164 | |||
165 |
|
165 | |||
166 | changeset: 0:fcf06d5c4e1d |
|
166 | changeset: 0:fcf06d5c4e1d | |
167 | user: test |
|
167 | user: test | |
168 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
168 | date: Thu Jan 01 00:00:00 1970 +0000 | |
169 | files: f |
|
169 | files: f | |
170 | description: |
|
170 | description: | |
171 | 1 |
|
171 | 1 | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | $ hg clone . dupe |
|
174 | $ hg clone . dupe | |
175 | updating to branch default |
|
175 | updating to branch default | |
176 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
176 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
177 |
|
177 | |||
178 | $ for x in a b c d; do echo content > dupe/$x; done |
|
178 | $ for x in a b c d; do echo content > dupe/$x; done | |
179 | $ hg -R dupe add |
|
179 | $ hg -R dupe add | |
180 | adding dupe/a |
|
180 | adding dupe/a (glob) | |
181 | adding dupe/b |
|
181 | adding dupe/b (glob) | |
182 | adding dupe/c |
|
182 | adding dupe/c (glob) | |
183 | adding dupe/d |
|
183 | adding dupe/d (glob) | |
184 | $ python unix2dos.py dupe/b dupe/c dupe/d |
|
184 | $ python unix2dos.py dupe/b dupe/c dupe/d | |
185 | $ hg -R dupe ci -m a dupe/a |
|
185 | $ hg -R dupe ci -m a dupe/a | |
186 | $ hg -R dupe ci -m b/c dupe/[bc] |
|
186 | $ hg -R dupe ci -m b/c dupe/[bc] | |
187 | $ hg -R dupe ci -m d dupe/d |
|
187 | $ hg -R dupe ci -m d dupe/d | |
188 | $ hg -R dupe log -v |
|
188 | $ hg -R dupe log -v | |
189 | changeset: 8:67ac5962ab43 |
|
189 | changeset: 8:67ac5962ab43 | |
190 | tag: tip |
|
190 | tag: tip | |
191 | user: test |
|
191 | user: test | |
192 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
192 | date: Thu Jan 01 00:00:00 1970 +0000 | |
193 | files: d |
|
193 | files: d | |
194 | description: |
|
194 | description: | |
195 | d |
|
195 | d | |
196 |
|
196 | |||
197 |
|
197 | |||
198 | changeset: 7:68c127d1834e |
|
198 | changeset: 7:68c127d1834e | |
199 | user: test |
|
199 | user: test | |
200 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
200 | date: Thu Jan 01 00:00:00 1970 +0000 | |
201 | files: b c |
|
201 | files: b c | |
202 | description: |
|
202 | description: | |
203 | b/c |
|
203 | b/c | |
204 |
|
204 | |||
205 |
|
205 | |||
206 | changeset: 6:adbf8bf7f31d |
|
206 | changeset: 6:adbf8bf7f31d | |
207 | user: test |
|
207 | user: test | |
208 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
208 | date: Thu Jan 01 00:00:00 1970 +0000 | |
209 | files: a |
|
209 | files: a | |
210 | description: |
|
210 | description: | |
211 | a |
|
211 | a | |
212 |
|
212 | |||
213 |
|
213 | |||
214 | changeset: 5:f0b1c8d75fce |
|
214 | changeset: 5:f0b1c8d75fce | |
215 | user: test |
|
215 | user: test | |
216 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
216 | date: Thu Jan 01 00:00:00 1970 +0000 | |
217 | files: bin |
|
217 | files: bin | |
218 | description: |
|
218 | description: | |
219 | 5 |
|
219 | 5 | |
220 |
|
220 | |||
221 |
|
221 | |||
222 | changeset: 4:77796dbcd4ad |
|
222 | changeset: 4:77796dbcd4ad | |
223 | user: test |
|
223 | user: test | |
224 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
224 | date: Thu Jan 01 00:00:00 1970 +0000 | |
225 | files: f |
|
225 | files: f | |
226 | description: |
|
226 | description: | |
227 | 4 |
|
227 | 4 | |
228 |
|
228 | |||
229 |
|
229 | |||
230 | changeset: 3:7c1b5430b350 |
|
230 | changeset: 3:7c1b5430b350 | |
231 | user: test |
|
231 | user: test | |
232 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
232 | date: Thu Jan 01 00:00:00 1970 +0000 | |
233 | files: f g |
|
233 | files: f g | |
234 | description: |
|
234 | description: | |
235 | 2.3 |
|
235 | 2.3 | |
236 |
|
236 | |||
237 |
|
237 | |||
238 | changeset: 2:bc2d09796734 |
|
238 | changeset: 2:bc2d09796734 | |
239 | user: test |
|
239 | user: test | |
240 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
240 | date: Thu Jan 01 00:00:00 1970 +0000 | |
241 | files: g |
|
241 | files: g | |
242 | description: |
|
242 | description: | |
243 | 2.2 |
|
243 | 2.2 | |
244 |
|
244 | |||
245 |
|
245 | |||
246 | changeset: 1:b1aa5cde7ff4 |
|
246 | changeset: 1:b1aa5cde7ff4 | |
247 | user: test |
|
247 | user: test | |
248 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
248 | date: Thu Jan 01 00:00:00 1970 +0000 | |
249 | files: f |
|
249 | files: f | |
250 | description: |
|
250 | description: | |
251 | 2 |
|
251 | 2 | |
252 |
|
252 | |||
253 |
|
253 | |||
254 | changeset: 0:fcf06d5c4e1d |
|
254 | changeset: 0:fcf06d5c4e1d | |
255 | user: test |
|
255 | user: test | |
256 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
256 | date: Thu Jan 01 00:00:00 1970 +0000 | |
257 | files: f |
|
257 | files: f | |
258 | description: |
|
258 | description: | |
259 | 1 |
|
259 | 1 | |
260 |
|
260 | |||
261 |
|
261 | |||
262 | $ hg pull dupe |
|
262 | $ hg pull dupe | |
263 | pulling from dupe |
|
263 | pulling from dupe | |
264 | searching for changes |
|
264 | searching for changes | |
265 | adding changesets |
|
265 | adding changesets | |
266 | adding manifests |
|
266 | adding manifests | |
267 | adding file changes |
|
267 | adding file changes | |
268 | added 3 changesets with 4 changes to 4 files |
|
268 | added 3 changesets with 4 changes to 4 files | |
269 | Attempt to commit or push text file(s) using CRLF line endings |
|
269 | Attempt to commit or push text file(s) using CRLF line endings | |
270 | in 67ac5962ab43: d |
|
270 | in 67ac5962ab43: d | |
271 | in 68c127d1834e: b |
|
271 | in 68c127d1834e: b | |
272 | in 68c127d1834e: c |
|
272 | in 68c127d1834e: c | |
273 |
|
273 | |||
274 | To prevent this mistake in your local repository, |
|
274 | To prevent this mistake in your local repository, | |
275 | add to Mercurial.ini or .hg/hgrc: |
|
275 | add to Mercurial.ini or .hg/hgrc: | |
276 |
|
276 | |||
277 | [hooks] |
|
277 | [hooks] | |
278 | pretxncommit.crlf = python:hgext.win32text.forbidcrlf |
|
278 | pretxncommit.crlf = python:hgext.win32text.forbidcrlf | |
279 |
|
279 | |||
280 | and also consider adding: |
|
280 | and also consider adding: | |
281 |
|
281 | |||
282 | [extensions] |
|
282 | [extensions] | |
283 | win32text = |
|
283 | win32text = | |
284 | [encode] |
|
284 | [encode] | |
285 | ** = cleverencode: |
|
285 | ** = cleverencode: | |
286 | [decode] |
|
286 | [decode] | |
287 | ** = cleverdecode: |
|
287 | ** = cleverdecode: | |
288 | transaction abort! |
|
288 | transaction abort! | |
289 | rollback completed |
|
289 | rollback completed | |
290 | abort: pretxnchangegroup.crlf hook failed |
|
290 | abort: pretxnchangegroup.crlf hook failed | |
291 | [255] |
|
291 | [255] | |
292 |
|
292 | |||
293 | $ hg log -v |
|
293 | $ hg log -v | |
294 | changeset: 5:f0b1c8d75fce |
|
294 | changeset: 5:f0b1c8d75fce | |
295 | tag: tip |
|
295 | tag: tip | |
296 | user: test |
|
296 | user: test | |
297 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
297 | date: Thu Jan 01 00:00:00 1970 +0000 | |
298 | files: bin |
|
298 | files: bin | |
299 | description: |
|
299 | description: | |
300 | 5 |
|
300 | 5 | |
301 |
|
301 | |||
302 |
|
302 | |||
303 | changeset: 4:77796dbcd4ad |
|
303 | changeset: 4:77796dbcd4ad | |
304 | user: test |
|
304 | user: test | |
305 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
305 | date: Thu Jan 01 00:00:00 1970 +0000 | |
306 | files: f |
|
306 | files: f | |
307 | description: |
|
307 | description: | |
308 | 4 |
|
308 | 4 | |
309 |
|
309 | |||
310 |
|
310 | |||
311 | changeset: 3:7c1b5430b350 |
|
311 | changeset: 3:7c1b5430b350 | |
312 | user: test |
|
312 | user: test | |
313 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
313 | date: Thu Jan 01 00:00:00 1970 +0000 | |
314 | files: f g |
|
314 | files: f g | |
315 | description: |
|
315 | description: | |
316 | 2.3 |
|
316 | 2.3 | |
317 |
|
317 | |||
318 |
|
318 | |||
319 | changeset: 2:bc2d09796734 |
|
319 | changeset: 2:bc2d09796734 | |
320 | user: test |
|
320 | user: test | |
321 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
321 | date: Thu Jan 01 00:00:00 1970 +0000 | |
322 | files: g |
|
322 | files: g | |
323 | description: |
|
323 | description: | |
324 | 2.2 |
|
324 | 2.2 | |
325 |
|
325 | |||
326 |
|
326 | |||
327 | changeset: 1:b1aa5cde7ff4 |
|
327 | changeset: 1:b1aa5cde7ff4 | |
328 | user: test |
|
328 | user: test | |
329 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
329 | date: Thu Jan 01 00:00:00 1970 +0000 | |
330 | files: f |
|
330 | files: f | |
331 | description: |
|
331 | description: | |
332 | 2 |
|
332 | 2 | |
333 |
|
333 | |||
334 |
|
334 | |||
335 | changeset: 0:fcf06d5c4e1d |
|
335 | changeset: 0:fcf06d5c4e1d | |
336 | user: test |
|
336 | user: test | |
337 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
337 | date: Thu Jan 01 00:00:00 1970 +0000 | |
338 | files: f |
|
338 | files: f | |
339 | description: |
|
339 | description: | |
340 | 1 |
|
340 | 1 | |
341 |
|
341 | |||
342 |
|
342 | |||
343 | $ rm .hg/hgrc |
|
343 | $ rm .hg/hgrc | |
344 | $ (echo some; echo text) > f3 |
|
344 | $ (echo some; echo text) > f3 | |
345 | $ python -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")' |
|
345 | $ python -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")' | |
346 | $ hg add f3 f4.bat |
|
346 | $ hg add f3 f4.bat | |
347 | $ hg ci -m 6 |
|
347 | $ hg ci -m 6 | |
348 | $ cat bin |
|
348 | $ cat bin | |
349 | hello\x00\r (esc) |
|
349 | hello\x00\r (esc) | |
350 | $ cat f3 |
|
350 | $ cat f3 | |
351 | some |
|
351 | some | |
352 | text |
|
352 | text | |
353 | $ cat f4.bat |
|
353 | $ cat f4.bat | |
354 | rem empty\r (esc) |
|
354 | rem empty\r (esc) | |
355 |
|
355 | |||
356 | $ echo '[extensions]' >> .hg/hgrc |
|
356 | $ echo '[extensions]' >> .hg/hgrc | |
357 | $ echo 'win32text = ' >> .hg/hgrc |
|
357 | $ echo 'win32text = ' >> .hg/hgrc | |
358 | $ echo '[decode]' >> .hg/hgrc |
|
358 | $ echo '[decode]' >> .hg/hgrc | |
359 | $ echo '** = cleverdecode:' >> .hg/hgrc |
|
359 | $ echo '** = cleverdecode:' >> .hg/hgrc | |
360 | $ echo '[encode]' >> .hg/hgrc |
|
360 | $ echo '[encode]' >> .hg/hgrc | |
361 | $ echo '** = cleverencode:' >> .hg/hgrc |
|
361 | $ echo '** = cleverencode:' >> .hg/hgrc | |
362 | $ cat .hg/hgrc |
|
362 | $ cat .hg/hgrc | |
363 | [extensions] |
|
363 | [extensions] | |
364 | win32text = |
|
364 | win32text = | |
365 | [decode] |
|
365 | [decode] | |
366 | ** = cleverdecode: |
|
366 | ** = cleverdecode: | |
367 | [encode] |
|
367 | [encode] | |
368 | ** = cleverencode: |
|
368 | ** = cleverencode: | |
369 |
|
369 | |||
370 | Trigger deprecation warning: |
|
370 | Trigger deprecation warning: | |
371 |
|
371 | |||
372 | $ hg id -t |
|
372 | $ hg id -t | |
373 | win32text is deprecated: http://mercurial.selenic.com/wiki/Win32TextExtension |
|
373 | win32text is deprecated: http://mercurial.selenic.com/wiki/Win32TextExtension | |
374 | tip |
|
374 | tip | |
375 |
|
375 | |||
376 | Disable warning: |
|
376 | Disable warning: | |
377 |
|
377 | |||
378 | $ echo '[win32text]' >> .hg/hgrc |
|
378 | $ echo '[win32text]' >> .hg/hgrc | |
379 | $ echo 'warn = no' >> .hg/hgrc |
|
379 | $ echo 'warn = no' >> .hg/hgrc | |
380 | $ hg id -t |
|
380 | $ hg id -t | |
381 | tip |
|
381 | tip | |
382 |
|
382 | |||
383 | $ rm f3 f4.bat bin |
|
383 | $ rm f3 f4.bat bin | |
384 | $ hg co -C |
|
384 | $ hg co -C | |
385 | WARNING: f4.bat already has CRLF line endings |
|
385 | WARNING: f4.bat already has CRLF line endings | |
386 | and does not need EOL conversion by the win32text plugin. |
|
386 | and does not need EOL conversion by the win32text plugin. | |
387 | Before your next commit, please reconsider your encode/decode settings in |
|
387 | Before your next commit, please reconsider your encode/decode settings in | |
388 | Mercurial.ini or $TESTTMP/t/.hg/hgrc. (glob) |
|
388 | Mercurial.ini or $TESTTMP/t/.hg/hgrc. (glob) | |
389 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
389 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
390 | $ cat bin |
|
390 | $ cat bin | |
391 | hello\x00\r (esc) |
|
391 | hello\x00\r (esc) | |
392 | $ cat f3 |
|
392 | $ cat f3 | |
393 | some\r (esc) |
|
393 | some\r (esc) | |
394 | text\r (esc) |
|
394 | text\r (esc) | |
395 | $ cat f4.bat |
|
395 | $ cat f4.bat | |
396 | rem empty\r (esc) |
|
396 | rem empty\r (esc) | |
397 |
|
397 | |||
398 | $ python -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")' |
|
398 | $ python -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")' | |
399 | $ hg add f5.sh |
|
399 | $ hg add f5.sh | |
400 | $ hg ci -m 7 |
|
400 | $ hg ci -m 7 | |
401 | $ cat f5.sh |
|
401 | $ cat f5.sh | |
402 | # empty\r (esc) |
|
402 | # empty\r (esc) | |
403 | $ hg cat f5.sh |
|
403 | $ hg cat f5.sh | |
404 | # empty |
|
404 | # empty | |
405 | $ echo '% just linefeed' > linefeed |
|
405 | $ echo '% just linefeed' > linefeed | |
406 | $ hg ci -qAm 8 linefeed |
|
406 | $ hg ci -qAm 8 linefeed | |
407 | $ cat linefeed |
|
407 | $ cat linefeed | |
408 | % just linefeed |
|
408 | % just linefeed | |
409 | $ hg cat linefeed |
|
409 | $ hg cat linefeed | |
410 | % just linefeed |
|
410 | % just linefeed | |
411 | $ hg st -q |
|
411 | $ hg st -q | |
412 | $ hg revert -a linefeed |
|
412 | $ hg revert -a linefeed | |
413 | no changes needed to linefeed |
|
413 | no changes needed to linefeed | |
414 | $ cat linefeed |
|
414 | $ cat linefeed | |
415 | % just linefeed |
|
415 | % just linefeed | |
416 | $ hg st -q |
|
416 | $ hg st -q | |
417 | $ echo modified >> linefeed |
|
417 | $ echo modified >> linefeed | |
418 | $ hg st -q |
|
418 | $ hg st -q | |
419 | M linefeed |
|
419 | M linefeed | |
420 | $ hg revert -a |
|
420 | $ hg revert -a | |
421 | reverting linefeed |
|
421 | reverting linefeed | |
422 | $ hg st -q |
|
422 | $ hg st -q | |
423 | $ cat linefeed |
|
423 | $ cat linefeed | |
424 | % just linefeed\r (esc) |
|
424 | % just linefeed\r (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now