Show More
@@ -1,564 +1,564 b'' | |||||
1 | $ hg init a |
|
1 | $ hg init a | |
2 | $ cd a |
|
2 | $ cd a | |
3 | $ echo a > a |
|
3 | $ echo a > a | |
4 | $ hg ci -A -d'1 0' -m a |
|
4 | $ hg ci -A -d'1 0' -m a | |
5 | adding a |
|
5 | adding a | |
6 |
|
6 | |||
7 | $ cd .. |
|
7 | $ cd .. | |
8 |
|
8 | |||
9 | $ hg init b |
|
9 | $ hg init b | |
10 | $ cd b |
|
10 | $ cd b | |
11 | $ echo b > b |
|
11 | $ echo b > b | |
12 | $ hg ci -A -d'1 0' -m b |
|
12 | $ hg ci -A -d'1 0' -m b | |
13 | adding b |
|
13 | adding b | |
14 |
|
14 | |||
15 | $ cd .. |
|
15 | $ cd .. | |
16 |
|
16 | |||
17 | $ hg clone a c |
|
17 | $ hg clone a c | |
18 | updating to branch default |
|
18 | updating to branch default | |
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
20 | $ cd c |
|
20 | $ cd c | |
21 | $ cat >> .hg/hgrc <<EOF |
|
21 | $ cat >> .hg/hgrc <<EOF | |
22 | > [paths] |
|
22 | > [paths] | |
23 | > relative = ../a |
|
23 | > relative = ../a | |
24 | > EOF |
|
24 | > EOF | |
25 | $ hg pull -f ../b |
|
25 | $ hg pull -f ../b | |
26 | pulling from ../b |
|
26 | pulling from ../b | |
27 | searching for changes |
|
27 | searching for changes | |
28 | warning: repository is unrelated |
|
28 | warning: repository is unrelated | |
29 | requesting all changes |
|
29 | requesting all changes | |
30 | adding changesets |
|
30 | adding changesets | |
31 | adding manifests |
|
31 | adding manifests | |
32 | adding file changes |
|
32 | adding file changes | |
33 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
33 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
34 | new changesets b6c483daf290 |
|
34 | new changesets b6c483daf290 | |
35 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
35 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
36 | $ hg merge |
|
36 | $ hg merge | |
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | (branch merge, don't forget to commit) |
|
38 | (branch merge, don't forget to commit) | |
39 |
|
39 | |||
40 | $ cd .. |
|
40 | $ cd .. | |
41 |
|
41 | |||
42 | Testing -R/--repository: |
|
42 | Testing -R/--repository: | |
43 |
|
43 | |||
44 | $ hg -R a tip |
|
44 | $ hg -R a tip | |
45 | changeset: 0:8580ff50825a |
|
45 | changeset: 0:8580ff50825a | |
46 | tag: tip |
|
46 | tag: tip | |
47 | user: test |
|
47 | user: test | |
48 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
48 | date: Thu Jan 01 00:00:01 1970 +0000 | |
49 | summary: a |
|
49 | summary: a | |
50 |
|
50 | |||
51 | $ hg --repository b tip |
|
51 | $ hg --repository b tip | |
52 | changeset: 0:b6c483daf290 |
|
52 | changeset: 0:b6c483daf290 | |
53 | tag: tip |
|
53 | tag: tip | |
54 | user: test |
|
54 | user: test | |
55 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
55 | date: Thu Jan 01 00:00:01 1970 +0000 | |
56 | summary: b |
|
56 | summary: b | |
57 |
|
57 | |||
58 |
|
58 | |||
59 | -R with a URL: |
|
59 | -R with a URL: | |
60 |
|
60 | |||
61 | $ hg -R file:a identify |
|
61 | $ hg -R file:a identify | |
62 | 8580ff50825a tip |
|
62 | 8580ff50825a tip | |
63 | $ hg -R file://localhost/`pwd`/a/ identify |
|
63 | $ hg -R file://localhost/`pwd`/a/ identify | |
64 | 8580ff50825a tip |
|
64 | 8580ff50825a tip | |
65 |
|
65 | |||
66 | -R with path aliases: |
|
66 | -R with path aliases: | |
67 |
|
67 | |||
68 | $ cd c |
|
68 | $ cd c | |
69 | $ hg -R default identify |
|
69 | $ hg -R default identify | |
70 | 8580ff50825a tip |
|
70 | 8580ff50825a tip | |
71 | $ hg -R relative identify |
|
71 | $ hg -R relative identify | |
72 | 8580ff50825a tip |
|
72 | 8580ff50825a tip | |
73 | $ echo '[paths]' >> $HGRCPATH |
|
73 | $ echo '[paths]' >> $HGRCPATH | |
74 | $ echo 'relativetohome = a' >> $HGRCPATH |
|
74 | $ echo 'relativetohome = a' >> $HGRCPATH | |
75 | $ HOME=`pwd`/../ hg -R relativetohome identify |
|
75 | $ HOME=`pwd`/../ hg -R relativetohome identify | |
76 | 8580ff50825a tip |
|
76 | 8580ff50825a tip | |
77 | $ cd .. |
|
77 | $ cd .. | |
78 |
|
78 | |||
79 | #if no-outer-repo |
|
79 | #if no-outer-repo | |
80 |
|
80 | |||
81 | Implicit -R: |
|
81 | Implicit -R: | |
82 |
|
82 | |||
83 | $ hg ann a/a |
|
83 | $ hg ann a/a | |
84 | 0: a |
|
84 | 0: a | |
85 | $ hg ann a/a a/a |
|
85 | $ hg ann a/a a/a | |
86 | 0: a |
|
86 | 0: a | |
87 | $ hg ann a/a b/b |
|
87 | $ hg ann a/a b/b | |
88 | abort: no repository found in '$TESTTMP' (.hg not found) |
|
88 | abort: no repository found in '$TESTTMP' (.hg not found) | |
89 | [10] |
|
89 | [10] | |
90 | $ hg -R b ann a/a |
|
90 | $ hg -R b ann a/a | |
91 | abort: a/a not under root '$TESTTMP/b' |
|
91 | abort: a/a not under root '$TESTTMP/b' | |
92 | (consider using '--cwd b') |
|
92 | (consider using '--cwd b') | |
93 | [255] |
|
93 | [255] | |
94 | $ hg log |
|
94 | $ hg log | |
95 | abort: no repository found in '$TESTTMP' (.hg not found) |
|
95 | abort: no repository found in '$TESTTMP' (.hg not found) | |
96 | [10] |
|
96 | [10] | |
97 |
|
97 | |||
98 | #endif |
|
98 | #endif | |
99 |
|
99 | |||
100 | Abbreviation of long option: |
|
100 | Abbreviation of long option: | |
101 |
|
101 | |||
102 | $ hg --repo c tip |
|
102 | $ hg --repo c tip | |
103 | changeset: 1:b6c483daf290 |
|
103 | changeset: 1:b6c483daf290 | |
104 | tag: tip |
|
104 | tag: tip | |
105 | parent: -1:000000000000 |
|
105 | parent: -1:000000000000 | |
106 | user: test |
|
106 | user: test | |
107 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
107 | date: Thu Jan 01 00:00:01 1970 +0000 | |
108 | summary: b |
|
108 | summary: b | |
109 |
|
109 | |||
110 |
|
110 | |||
111 | earlygetopt with duplicate options (36d23de02da1): |
|
111 | earlygetopt with duplicate options (36d23de02da1): | |
112 |
|
112 | |||
113 | $ hg --cwd a --cwd b --cwd c tip |
|
113 | $ hg --cwd a --cwd b --cwd c tip | |
114 | changeset: 1:b6c483daf290 |
|
114 | changeset: 1:b6c483daf290 | |
115 | tag: tip |
|
115 | tag: tip | |
116 | parent: -1:000000000000 |
|
116 | parent: -1:000000000000 | |
117 | user: test |
|
117 | user: test | |
118 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
118 | date: Thu Jan 01 00:00:01 1970 +0000 | |
119 | summary: b |
|
119 | summary: b | |
120 |
|
120 | |||
121 | $ hg --repo c --repository b -R a tip |
|
121 | $ hg --repo c --repository b -R a tip | |
122 | changeset: 0:8580ff50825a |
|
122 | changeset: 0:8580ff50825a | |
123 | tag: tip |
|
123 | tag: tip | |
124 | user: test |
|
124 | user: test | |
125 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
125 | date: Thu Jan 01 00:00:01 1970 +0000 | |
126 | summary: a |
|
126 | summary: a | |
127 |
|
127 | |||
128 |
|
128 | |||
129 | earlygetopt short option without following space: |
|
129 | earlygetopt short option without following space: | |
130 |
|
130 | |||
131 | $ hg -q -Rb tip |
|
131 | $ hg -q -Rb tip | |
132 | 0:b6c483daf290 |
|
132 | 0:b6c483daf290 | |
133 |
|
133 | |||
134 | earlygetopt with illegal abbreviations: |
|
134 | earlygetopt with illegal abbreviations: | |
135 |
|
135 | |||
136 | $ hg --confi "foo.bar=baz" |
|
136 | $ hg --confi "foo.bar=baz" | |
137 | abort: option --config may not be abbreviated |
|
137 | abort: option --config may not be abbreviated | |
138 | [10] |
|
138 | [10] | |
139 | $ hg --cw a tip |
|
139 | $ hg --cw a tip | |
140 | abort: option --cwd may not be abbreviated |
|
140 | abort: option --cwd may not be abbreviated | |
141 | [10] |
|
141 | [10] | |
142 | $ hg --rep a tip |
|
142 | $ hg --rep a tip | |
143 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo |
|
143 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo | |
144 | [10] |
|
144 | [10] | |
145 | $ hg --repositor a tip |
|
145 | $ hg --repositor a tip | |
146 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo |
|
146 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo | |
147 | [10] |
|
147 | [10] | |
148 | $ hg -qR a tip |
|
148 | $ hg -qR a tip | |
149 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo |
|
149 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo | |
150 | [10] |
|
150 | [10] | |
151 | $ hg -qRa tip |
|
151 | $ hg -qRa tip | |
152 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo |
|
152 | abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo | |
153 | [10] |
|
153 | [10] | |
154 |
|
154 | |||
155 | Testing --cwd: |
|
155 | Testing --cwd: | |
156 |
|
156 | |||
157 | $ hg --cwd a parents |
|
157 | $ hg --cwd a parents | |
158 | changeset: 0:8580ff50825a |
|
158 | changeset: 0:8580ff50825a | |
159 | tag: tip |
|
159 | tag: tip | |
160 | user: test |
|
160 | user: test | |
161 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
161 | date: Thu Jan 01 00:00:01 1970 +0000 | |
162 | summary: a |
|
162 | summary: a | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | Testing -y/--noninteractive - just be sure it is parsed: |
|
165 | Testing -y/--noninteractive - just be sure it is parsed: | |
166 |
|
166 | |||
167 | $ hg --cwd a tip -q --noninteractive |
|
167 | $ hg --cwd a tip -q --noninteractive | |
168 | 0:8580ff50825a |
|
168 | 0:8580ff50825a | |
169 | $ hg --cwd a tip -q -y |
|
169 | $ hg --cwd a tip -q -y | |
170 | 0:8580ff50825a |
|
170 | 0:8580ff50825a | |
171 |
|
171 | |||
172 | Testing -q/--quiet: |
|
172 | Testing -q/--quiet: | |
173 |
|
173 | |||
174 | $ hg -R a -q tip |
|
174 | $ hg -R a -q tip | |
175 | 0:8580ff50825a |
|
175 | 0:8580ff50825a | |
176 | $ hg -R b -q tip |
|
176 | $ hg -R b -q tip | |
177 | 0:b6c483daf290 |
|
177 | 0:b6c483daf290 | |
178 | $ hg -R c --quiet parents |
|
178 | $ hg -R c --quiet parents | |
179 | 0:8580ff50825a |
|
179 | 0:8580ff50825a | |
180 | 1:b6c483daf290 |
|
180 | 1:b6c483daf290 | |
181 |
|
181 | |||
182 | Testing -v/--verbose: |
|
182 | Testing -v/--verbose: | |
183 |
|
183 | |||
184 | $ hg --cwd c head -v |
|
184 | $ hg --cwd c head -v | |
185 | changeset: 1:b6c483daf290 |
|
185 | changeset: 1:b6c483daf290 | |
186 | tag: tip |
|
186 | tag: tip | |
187 | parent: -1:000000000000 |
|
187 | parent: -1:000000000000 | |
188 | user: test |
|
188 | user: test | |
189 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
189 | date: Thu Jan 01 00:00:01 1970 +0000 | |
190 | files: b |
|
190 | files: b | |
191 | description: |
|
191 | description: | |
192 | b |
|
192 | b | |
193 |
|
193 | |||
194 |
|
194 | |||
195 | changeset: 0:8580ff50825a |
|
195 | changeset: 0:8580ff50825a | |
196 | user: test |
|
196 | user: test | |
197 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
197 | date: Thu Jan 01 00:00:01 1970 +0000 | |
198 | files: a |
|
198 | files: a | |
199 | description: |
|
199 | description: | |
200 | a |
|
200 | a | |
201 |
|
201 | |||
202 |
|
202 | |||
203 | $ hg --cwd b tip --verbose |
|
203 | $ hg --cwd b tip --verbose | |
204 | changeset: 0:b6c483daf290 |
|
204 | changeset: 0:b6c483daf290 | |
205 | tag: tip |
|
205 | tag: tip | |
206 | user: test |
|
206 | user: test | |
207 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
207 | date: Thu Jan 01 00:00:01 1970 +0000 | |
208 | files: b |
|
208 | files: b | |
209 | description: |
|
209 | description: | |
210 | b |
|
210 | b | |
211 |
|
211 | |||
212 |
|
212 | |||
213 |
|
213 | |||
214 | Testing --config: |
|
214 | Testing --config: | |
215 |
|
215 | |||
216 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo |
|
216 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo | |
217 | quuxfoo |
|
217 | quuxfoo | |
218 | $ hg --cwd c --config '' tip -q |
|
218 | $ hg --cwd c --config '' tip -q | |
219 | abort: malformed --config option: '' (use --config section.name=value) |
|
219 | abort: malformed --config option: '' (use --config section.name=value) | |
220 | [10] |
|
220 | [10] | |
221 | $ hg --cwd c --config a.b tip -q |
|
221 | $ hg --cwd c --config a.b tip -q | |
222 | abort: malformed --config option: 'a.b' (use --config section.name=value) |
|
222 | abort: malformed --config option: 'a.b' (use --config section.name=value) | |
223 | [10] |
|
223 | [10] | |
224 | $ hg --cwd c --config a tip -q |
|
224 | $ hg --cwd c --config a tip -q | |
225 | abort: malformed --config option: 'a' (use --config section.name=value) |
|
225 | abort: malformed --config option: 'a' (use --config section.name=value) | |
226 | [10] |
|
226 | [10] | |
227 | $ hg --cwd c --config a.= tip -q |
|
227 | $ hg --cwd c --config a.= tip -q | |
228 | abort: malformed --config option: 'a.=' (use --config section.name=value) |
|
228 | abort: malformed --config option: 'a.=' (use --config section.name=value) | |
229 | [10] |
|
229 | [10] | |
230 | $ hg --cwd c --config .b= tip -q |
|
230 | $ hg --cwd c --config .b= tip -q | |
231 | abort: malformed --config option: '.b=' (use --config section.name=value) |
|
231 | abort: malformed --config option: '.b=' (use --config section.name=value) | |
232 | [10] |
|
232 | [10] | |
233 |
|
233 | |||
234 | Testing --debug: |
|
234 | Testing --debug: | |
235 |
|
235 | |||
236 | $ hg --cwd c log --debug |
|
236 | $ hg --cwd c log --debug | |
237 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a |
|
237 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a | |
238 | tag: tip |
|
238 | tag: tip | |
239 | phase: public |
|
239 | phase: public | |
240 | parent: -1:0000000000000000000000000000000000000000 |
|
240 | parent: -1:0000000000000000000000000000000000000000 | |
241 | parent: -1:0000000000000000000000000000000000000000 |
|
241 | parent: -1:0000000000000000000000000000000000000000 | |
242 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 |
|
242 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 | |
243 | user: test |
|
243 | user: test | |
244 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
244 | date: Thu Jan 01 00:00:01 1970 +0000 | |
245 | files+: b |
|
245 | files+: b | |
246 | extra: branch=default |
|
246 | extra: branch=default | |
247 | description: |
|
247 | description: | |
248 | b |
|
248 | b | |
249 |
|
249 | |||
250 |
|
250 | |||
251 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
251 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab | |
252 | phase: public |
|
252 | phase: public | |
253 | parent: -1:0000000000000000000000000000000000000000 |
|
253 | parent: -1:0000000000000000000000000000000000000000 | |
254 | parent: -1:0000000000000000000000000000000000000000 |
|
254 | parent: -1:0000000000000000000000000000000000000000 | |
255 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
255 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
256 | user: test |
|
256 | user: test | |
257 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
257 | date: Thu Jan 01 00:00:01 1970 +0000 | |
258 | files+: a |
|
258 | files+: a | |
259 | extra: branch=default |
|
259 | extra: branch=default | |
260 | description: |
|
260 | description: | |
261 | a |
|
261 | a | |
262 |
|
262 | |||
263 |
|
263 | |||
264 |
|
264 | |||
265 | Testing --traceback: |
|
265 | Testing --traceback: | |
266 |
|
266 | |||
267 | #if no-chg |
|
267 | #if no-chg no-rhg | |
268 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' |
|
268 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' | |
269 | Traceback (most recent call last): |
|
269 | Traceback (most recent call last): | |
270 | Traceback (most recent call last): (py3 !) |
|
270 | Traceback (most recent call last): (py3 !) | |
271 | #else |
|
271 | #else | |
272 | Traceback for '--config' errors not supported with chg. |
|
272 | Traceback for '--config' errors not supported with chg. | |
273 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' |
|
273 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' | |
274 | [1] |
|
274 | [1] | |
275 | #endif |
|
275 | #endif | |
276 |
|
276 | |||
277 | Testing --time: |
|
277 | Testing --time: | |
278 |
|
278 | |||
279 | $ hg --cwd a --time id |
|
279 | $ hg --cwd a --time id | |
280 | 8580ff50825a tip |
|
280 | 8580ff50825a tip | |
281 | time: real * (glob) |
|
281 | time: real * (glob) | |
282 |
|
282 | |||
283 | Testing --version: |
|
283 | Testing --version: | |
284 |
|
284 | |||
285 | $ hg --version -q |
|
285 | $ hg --version -q | |
286 | Mercurial Distributed SCM * (glob) |
|
286 | Mercurial Distributed SCM * (glob) | |
287 |
|
287 | |||
288 | hide outer repo |
|
288 | hide outer repo | |
289 | $ hg init |
|
289 | $ hg init | |
290 |
|
290 | |||
291 | Testing -h/--help: |
|
291 | Testing -h/--help: | |
292 |
|
292 | |||
293 | #if no-extraextensions |
|
293 | #if no-extraextensions | |
294 |
|
294 | |||
295 | $ hg -h |
|
295 | $ hg -h | |
296 | Mercurial Distributed SCM |
|
296 | Mercurial Distributed SCM | |
297 |
|
297 | |||
298 | list of commands: |
|
298 | list of commands: | |
299 |
|
299 | |||
300 | Repository creation: |
|
300 | Repository creation: | |
301 |
|
301 | |||
302 | clone make a copy of an existing repository |
|
302 | clone make a copy of an existing repository | |
303 | init create a new repository in the given directory |
|
303 | init create a new repository in the given directory | |
304 |
|
304 | |||
305 | Remote repository management: |
|
305 | Remote repository management: | |
306 |
|
306 | |||
307 | incoming show new changesets found in source |
|
307 | incoming show new changesets found in source | |
308 | outgoing show changesets not found in the destination |
|
308 | outgoing show changesets not found in the destination | |
309 | paths show aliases for remote repositories |
|
309 | paths show aliases for remote repositories | |
310 | pull pull changes from the specified source |
|
310 | pull pull changes from the specified source | |
311 | push push changes to the specified destination |
|
311 | push push changes to the specified destination | |
312 | serve start stand-alone webserver |
|
312 | serve start stand-alone webserver | |
313 |
|
313 | |||
314 | Change creation: |
|
314 | Change creation: | |
315 |
|
315 | |||
316 | commit commit the specified files or all outstanding changes |
|
316 | commit commit the specified files or all outstanding changes | |
317 |
|
317 | |||
318 | Change manipulation: |
|
318 | Change manipulation: | |
319 |
|
319 | |||
320 | backout reverse effect of earlier changeset |
|
320 | backout reverse effect of earlier changeset | |
321 | graft copy changes from other branches onto the current branch |
|
321 | graft copy changes from other branches onto the current branch | |
322 | merge merge another revision into working directory |
|
322 | merge merge another revision into working directory | |
323 |
|
323 | |||
324 | Change organization: |
|
324 | Change organization: | |
325 |
|
325 | |||
326 | bookmarks create a new bookmark or list existing bookmarks |
|
326 | bookmarks create a new bookmark or list existing bookmarks | |
327 | branch set or show the current branch name |
|
327 | branch set or show the current branch name | |
328 | branches list repository named branches |
|
328 | branches list repository named branches | |
329 | phase set or show the current phase name |
|
329 | phase set or show the current phase name | |
330 | tag add one or more tags for the current or given revision |
|
330 | tag add one or more tags for the current or given revision | |
331 | tags list repository tags |
|
331 | tags list repository tags | |
332 |
|
332 | |||
333 | File content management: |
|
333 | File content management: | |
334 |
|
334 | |||
335 | annotate show changeset information by line for each file |
|
335 | annotate show changeset information by line for each file | |
336 | cat output the current or given revision of files |
|
336 | cat output the current or given revision of files | |
337 | copy mark files as copied for the next commit |
|
337 | copy mark files as copied for the next commit | |
338 | diff diff repository (or selected files) |
|
338 | diff diff repository (or selected files) | |
339 | grep search for a pattern in specified files |
|
339 | grep search for a pattern in specified files | |
340 |
|
340 | |||
341 | Change navigation: |
|
341 | Change navigation: | |
342 |
|
342 | |||
343 | bisect subdivision search of changesets |
|
343 | bisect subdivision search of changesets | |
344 | heads show branch heads |
|
344 | heads show branch heads | |
345 | identify identify the working directory or specified revision |
|
345 | identify identify the working directory or specified revision | |
346 | log show revision history of entire repository or files |
|
346 | log show revision history of entire repository or files | |
347 |
|
347 | |||
348 | Working directory management: |
|
348 | Working directory management: | |
349 |
|
349 | |||
350 | add add the specified files on the next commit |
|
350 | add add the specified files on the next commit | |
351 | addremove add all new files, delete all missing files |
|
351 | addremove add all new files, delete all missing files | |
352 | files list tracked files |
|
352 | files list tracked files | |
353 | forget forget the specified files on the next commit |
|
353 | forget forget the specified files on the next commit | |
354 | purge removes files not tracked by Mercurial |
|
354 | purge removes files not tracked by Mercurial | |
355 | remove remove the specified files on the next commit |
|
355 | remove remove the specified files on the next commit | |
356 | rename rename files; equivalent of copy + remove |
|
356 | rename rename files; equivalent of copy + remove | |
357 | resolve redo merges or set/view the merge status of files |
|
357 | resolve redo merges or set/view the merge status of files | |
358 | revert restore files to their checkout state |
|
358 | revert restore files to their checkout state | |
359 | root print the root (top) of the current working directory |
|
359 | root print the root (top) of the current working directory | |
360 | shelve save and set aside changes from the working directory |
|
360 | shelve save and set aside changes from the working directory | |
361 | status show changed files in the working directory |
|
361 | status show changed files in the working directory | |
362 | summary summarize working directory state |
|
362 | summary summarize working directory state | |
363 | unshelve restore a shelved change to the working directory |
|
363 | unshelve restore a shelved change to the working directory | |
364 | update update working directory (or switch revisions) |
|
364 | update update working directory (or switch revisions) | |
365 |
|
365 | |||
366 | Change import/export: |
|
366 | Change import/export: | |
367 |
|
367 | |||
368 | archive create an unversioned archive of a repository revision |
|
368 | archive create an unversioned archive of a repository revision | |
369 | bundle create a bundle file |
|
369 | bundle create a bundle file | |
370 | export dump the header and diffs for one or more changesets |
|
370 | export dump the header and diffs for one or more changesets | |
371 | import import an ordered set of patches |
|
371 | import import an ordered set of patches | |
372 | unbundle apply one or more bundle files |
|
372 | unbundle apply one or more bundle files | |
373 |
|
373 | |||
374 | Repository maintenance: |
|
374 | Repository maintenance: | |
375 |
|
375 | |||
376 | manifest output the current or given revision of the project manifest |
|
376 | manifest output the current or given revision of the project manifest | |
377 | recover roll back an interrupted transaction |
|
377 | recover roll back an interrupted transaction | |
378 | verify verify the integrity of the repository |
|
378 | verify verify the integrity of the repository | |
379 |
|
379 | |||
380 | Help: |
|
380 | Help: | |
381 |
|
381 | |||
382 | config show combined config settings from all hgrc files |
|
382 | config show combined config settings from all hgrc files | |
383 | help show help for a given topic or a help overview |
|
383 | help show help for a given topic or a help overview | |
384 | version output version and copyright information |
|
384 | version output version and copyright information | |
385 |
|
385 | |||
386 | additional help topics: |
|
386 | additional help topics: | |
387 |
|
387 | |||
388 | Mercurial identifiers: |
|
388 | Mercurial identifiers: | |
389 |
|
389 | |||
390 | filesets Specifying File Sets |
|
390 | filesets Specifying File Sets | |
391 | hgignore Syntax for Mercurial Ignore Files |
|
391 | hgignore Syntax for Mercurial Ignore Files | |
392 | patterns File Name Patterns |
|
392 | patterns File Name Patterns | |
393 | revisions Specifying Revisions |
|
393 | revisions Specifying Revisions | |
394 | urls URL Paths |
|
394 | urls URL Paths | |
395 |
|
395 | |||
396 | Mercurial output: |
|
396 | Mercurial output: | |
397 |
|
397 | |||
398 | color Colorizing Outputs |
|
398 | color Colorizing Outputs | |
399 | dates Date Formats |
|
399 | dates Date Formats | |
400 | diffs Diff Formats |
|
400 | diffs Diff Formats | |
401 | templating Template Usage |
|
401 | templating Template Usage | |
402 |
|
402 | |||
403 | Mercurial configuration: |
|
403 | Mercurial configuration: | |
404 |
|
404 | |||
405 | config Configuration Files |
|
405 | config Configuration Files | |
406 | environment Environment Variables |
|
406 | environment Environment Variables | |
407 | extensions Using Additional Features |
|
407 | extensions Using Additional Features | |
408 | flags Command-line flags |
|
408 | flags Command-line flags | |
409 | hgweb Configuring hgweb |
|
409 | hgweb Configuring hgweb | |
410 | merge-tools Merge Tools |
|
410 | merge-tools Merge Tools | |
411 | pager Pager Support |
|
411 | pager Pager Support | |
412 |
|
412 | |||
413 | Concepts: |
|
413 | Concepts: | |
414 |
|
414 | |||
415 | bundlespec Bundle File Formats |
|
415 | bundlespec Bundle File Formats | |
416 | glossary Glossary |
|
416 | glossary Glossary | |
417 | phases Working with Phases |
|
417 | phases Working with Phases | |
418 | subrepos Subrepositories |
|
418 | subrepos Subrepositories | |
419 |
|
419 | |||
420 | Miscellaneous: |
|
420 | Miscellaneous: | |
421 |
|
421 | |||
422 | deprecated Deprecated Features |
|
422 | deprecated Deprecated Features | |
423 | internals Technical implementation topics |
|
423 | internals Technical implementation topics | |
424 | scripting Using Mercurial from scripts and automation |
|
424 | scripting Using Mercurial from scripts and automation | |
425 |
|
425 | |||
426 | (use 'hg help -v' to show built-in aliases and global options) |
|
426 | (use 'hg help -v' to show built-in aliases and global options) | |
427 |
|
427 | |||
428 | $ hg --help |
|
428 | $ hg --help | |
429 | Mercurial Distributed SCM |
|
429 | Mercurial Distributed SCM | |
430 |
|
430 | |||
431 | list of commands: |
|
431 | list of commands: | |
432 |
|
432 | |||
433 | Repository creation: |
|
433 | Repository creation: | |
434 |
|
434 | |||
435 | clone make a copy of an existing repository |
|
435 | clone make a copy of an existing repository | |
436 | init create a new repository in the given directory |
|
436 | init create a new repository in the given directory | |
437 |
|
437 | |||
438 | Remote repository management: |
|
438 | Remote repository management: | |
439 |
|
439 | |||
440 | incoming show new changesets found in source |
|
440 | incoming show new changesets found in source | |
441 | outgoing show changesets not found in the destination |
|
441 | outgoing show changesets not found in the destination | |
442 | paths show aliases for remote repositories |
|
442 | paths show aliases for remote repositories | |
443 | pull pull changes from the specified source |
|
443 | pull pull changes from the specified source | |
444 | push push changes to the specified destination |
|
444 | push push changes to the specified destination | |
445 | serve start stand-alone webserver |
|
445 | serve start stand-alone webserver | |
446 |
|
446 | |||
447 | Change creation: |
|
447 | Change creation: | |
448 |
|
448 | |||
449 | commit commit the specified files or all outstanding changes |
|
449 | commit commit the specified files or all outstanding changes | |
450 |
|
450 | |||
451 | Change manipulation: |
|
451 | Change manipulation: | |
452 |
|
452 | |||
453 | backout reverse effect of earlier changeset |
|
453 | backout reverse effect of earlier changeset | |
454 | graft copy changes from other branches onto the current branch |
|
454 | graft copy changes from other branches onto the current branch | |
455 | merge merge another revision into working directory |
|
455 | merge merge another revision into working directory | |
456 |
|
456 | |||
457 | Change organization: |
|
457 | Change organization: | |
458 |
|
458 | |||
459 | bookmarks create a new bookmark or list existing bookmarks |
|
459 | bookmarks create a new bookmark or list existing bookmarks | |
460 | branch set or show the current branch name |
|
460 | branch set or show the current branch name | |
461 | branches list repository named branches |
|
461 | branches list repository named branches | |
462 | phase set or show the current phase name |
|
462 | phase set or show the current phase name | |
463 | tag add one or more tags for the current or given revision |
|
463 | tag add one or more tags for the current or given revision | |
464 | tags list repository tags |
|
464 | tags list repository tags | |
465 |
|
465 | |||
466 | File content management: |
|
466 | File content management: | |
467 |
|
467 | |||
468 | annotate show changeset information by line for each file |
|
468 | annotate show changeset information by line for each file | |
469 | cat output the current or given revision of files |
|
469 | cat output the current or given revision of files | |
470 | copy mark files as copied for the next commit |
|
470 | copy mark files as copied for the next commit | |
471 | diff diff repository (or selected files) |
|
471 | diff diff repository (or selected files) | |
472 | grep search for a pattern in specified files |
|
472 | grep search for a pattern in specified files | |
473 |
|
473 | |||
474 | Change navigation: |
|
474 | Change navigation: | |
475 |
|
475 | |||
476 | bisect subdivision search of changesets |
|
476 | bisect subdivision search of changesets | |
477 | heads show branch heads |
|
477 | heads show branch heads | |
478 | identify identify the working directory or specified revision |
|
478 | identify identify the working directory or specified revision | |
479 | log show revision history of entire repository or files |
|
479 | log show revision history of entire repository or files | |
480 |
|
480 | |||
481 | Working directory management: |
|
481 | Working directory management: | |
482 |
|
482 | |||
483 | add add the specified files on the next commit |
|
483 | add add the specified files on the next commit | |
484 | addremove add all new files, delete all missing files |
|
484 | addremove add all new files, delete all missing files | |
485 | files list tracked files |
|
485 | files list tracked files | |
486 | forget forget the specified files on the next commit |
|
486 | forget forget the specified files on the next commit | |
487 | purge removes files not tracked by Mercurial |
|
487 | purge removes files not tracked by Mercurial | |
488 | remove remove the specified files on the next commit |
|
488 | remove remove the specified files on the next commit | |
489 | rename rename files; equivalent of copy + remove |
|
489 | rename rename files; equivalent of copy + remove | |
490 | resolve redo merges or set/view the merge status of files |
|
490 | resolve redo merges or set/view the merge status of files | |
491 | revert restore files to their checkout state |
|
491 | revert restore files to their checkout state | |
492 | root print the root (top) of the current working directory |
|
492 | root print the root (top) of the current working directory | |
493 | shelve save and set aside changes from the working directory |
|
493 | shelve save and set aside changes from the working directory | |
494 | status show changed files in the working directory |
|
494 | status show changed files in the working directory | |
495 | summary summarize working directory state |
|
495 | summary summarize working directory state | |
496 | unshelve restore a shelved change to the working directory |
|
496 | unshelve restore a shelved change to the working directory | |
497 | update update working directory (or switch revisions) |
|
497 | update update working directory (or switch revisions) | |
498 |
|
498 | |||
499 | Change import/export: |
|
499 | Change import/export: | |
500 |
|
500 | |||
501 | archive create an unversioned archive of a repository revision |
|
501 | archive create an unversioned archive of a repository revision | |
502 | bundle create a bundle file |
|
502 | bundle create a bundle file | |
503 | export dump the header and diffs for one or more changesets |
|
503 | export dump the header and diffs for one or more changesets | |
504 | import import an ordered set of patches |
|
504 | import import an ordered set of patches | |
505 | unbundle apply one or more bundle files |
|
505 | unbundle apply one or more bundle files | |
506 |
|
506 | |||
507 | Repository maintenance: |
|
507 | Repository maintenance: | |
508 |
|
508 | |||
509 | manifest output the current or given revision of the project manifest |
|
509 | manifest output the current or given revision of the project manifest | |
510 | recover roll back an interrupted transaction |
|
510 | recover roll back an interrupted transaction | |
511 | verify verify the integrity of the repository |
|
511 | verify verify the integrity of the repository | |
512 |
|
512 | |||
513 | Help: |
|
513 | Help: | |
514 |
|
514 | |||
515 | config show combined config settings from all hgrc files |
|
515 | config show combined config settings from all hgrc files | |
516 | help show help for a given topic or a help overview |
|
516 | help show help for a given topic or a help overview | |
517 | version output version and copyright information |
|
517 | version output version and copyright information | |
518 |
|
518 | |||
519 | additional help topics: |
|
519 | additional help topics: | |
520 |
|
520 | |||
521 | Mercurial identifiers: |
|
521 | Mercurial identifiers: | |
522 |
|
522 | |||
523 | filesets Specifying File Sets |
|
523 | filesets Specifying File Sets | |
524 | hgignore Syntax for Mercurial Ignore Files |
|
524 | hgignore Syntax for Mercurial Ignore Files | |
525 | patterns File Name Patterns |
|
525 | patterns File Name Patterns | |
526 | revisions Specifying Revisions |
|
526 | revisions Specifying Revisions | |
527 | urls URL Paths |
|
527 | urls URL Paths | |
528 |
|
528 | |||
529 | Mercurial output: |
|
529 | Mercurial output: | |
530 |
|
530 | |||
531 | color Colorizing Outputs |
|
531 | color Colorizing Outputs | |
532 | dates Date Formats |
|
532 | dates Date Formats | |
533 | diffs Diff Formats |
|
533 | diffs Diff Formats | |
534 | templating Template Usage |
|
534 | templating Template Usage | |
535 |
|
535 | |||
536 | Mercurial configuration: |
|
536 | Mercurial configuration: | |
537 |
|
537 | |||
538 | config Configuration Files |
|
538 | config Configuration Files | |
539 | environment Environment Variables |
|
539 | environment Environment Variables | |
540 | extensions Using Additional Features |
|
540 | extensions Using Additional Features | |
541 | flags Command-line flags |
|
541 | flags Command-line flags | |
542 | hgweb Configuring hgweb |
|
542 | hgweb Configuring hgweb | |
543 | merge-tools Merge Tools |
|
543 | merge-tools Merge Tools | |
544 | pager Pager Support |
|
544 | pager Pager Support | |
545 |
|
545 | |||
546 | Concepts: |
|
546 | Concepts: | |
547 |
|
547 | |||
548 | bundlespec Bundle File Formats |
|
548 | bundlespec Bundle File Formats | |
549 | glossary Glossary |
|
549 | glossary Glossary | |
550 | phases Working with Phases |
|
550 | phases Working with Phases | |
551 | subrepos Subrepositories |
|
551 | subrepos Subrepositories | |
552 |
|
552 | |||
553 | Miscellaneous: |
|
553 | Miscellaneous: | |
554 |
|
554 | |||
555 | deprecated Deprecated Features |
|
555 | deprecated Deprecated Features | |
556 | internals Technical implementation topics |
|
556 | internals Technical implementation topics | |
557 | scripting Using Mercurial from scripts and automation |
|
557 | scripting Using Mercurial from scripts and automation | |
558 |
|
558 | |||
559 | (use 'hg help -v' to show built-in aliases and global options) |
|
559 | (use 'hg help -v' to show built-in aliases and global options) | |
560 |
|
560 | |||
561 | #endif |
|
561 | #endif | |
562 |
|
562 | |||
563 | Not tested: --debugger |
|
563 | Not tested: --debugger | |
564 |
|
564 |
@@ -1,308 +1,308 b'' | |||||
1 | Use hgrc within $TESTTMP |
|
1 | Use hgrc within $TESTTMP | |
2 |
|
2 | |||
3 | $ HGRCPATH=`pwd`/hgrc |
|
3 | $ HGRCPATH=`pwd`/hgrc | |
4 | $ export HGRCPATH |
|
4 | $ export HGRCPATH | |
5 |
|
5 | |||
6 | hide outer repo |
|
6 | hide outer repo | |
7 | $ hg init |
|
7 | $ hg init | |
8 |
|
8 | |||
9 | Use an alternate var for scribbling on hgrc to keep check-code from |
|
9 | Use an alternate var for scribbling on hgrc to keep check-code from | |
10 | complaining about the important settings we may be overwriting: |
|
10 | complaining about the important settings we may be overwriting: | |
11 |
|
11 | |||
12 | $ HGRC=`pwd`/hgrc |
|
12 | $ HGRC=`pwd`/hgrc | |
13 | $ export HGRC |
|
13 | $ export HGRC | |
14 |
|
14 | |||
15 | Basic syntax error |
|
15 | Basic syntax error | |
16 |
|
16 | |||
17 | $ echo "invalid" > $HGRC |
|
17 | $ echo "invalid" > $HGRC | |
18 | $ hg version |
|
18 | $ hg version | |
19 | config error at $TESTTMP/hgrc:1: invalid |
|
19 | config error at $TESTTMP/hgrc:1: invalid | |
20 | [255] |
|
20 | [255] | |
21 | $ echo "" > $HGRC |
|
21 | $ echo "" > $HGRC | |
22 |
|
22 | |||
23 | Issue1199: Can't use '%' in hgrc (eg url encoded username) |
|
23 | Issue1199: Can't use '%' in hgrc (eg url encoded username) | |
24 |
|
24 | |||
25 | $ hg init "foo%bar" |
|
25 | $ hg init "foo%bar" | |
26 | $ hg clone "foo%bar" foobar |
|
26 | $ hg clone "foo%bar" foobar | |
27 | updating to branch default |
|
27 | updating to branch default | |
28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
29 | $ cd foobar |
|
29 | $ cd foobar | |
30 | $ cat .hg/hgrc |
|
30 | $ cat .hg/hgrc | |
31 | # example repository config (see 'hg help config' for more info) |
|
31 | # example repository config (see 'hg help config' for more info) | |
32 | [paths] |
|
32 | [paths] | |
33 | default = $TESTTMP/foo%bar |
|
33 | default = $TESTTMP/foo%bar | |
34 |
|
34 | |||
35 | # path aliases to other clones of this repo in URLs or filesystem paths |
|
35 | # path aliases to other clones of this repo in URLs or filesystem paths | |
36 | # (see 'hg help config.paths' for more info) |
|
36 | # (see 'hg help config.paths' for more info) | |
37 | # |
|
37 | # | |
38 | # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork |
|
38 | # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork | |
39 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork |
|
39 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork | |
40 | # my-clone = /home/jdoe/jdoes-clone |
|
40 | # my-clone = /home/jdoe/jdoes-clone | |
41 |
|
41 | |||
42 | [ui] |
|
42 | [ui] | |
43 | # name and email (local to this repository, optional), e.g. |
|
43 | # name and email (local to this repository, optional), e.g. | |
44 | # username = Jane Doe <jdoe@example.com> |
|
44 | # username = Jane Doe <jdoe@example.com> | |
45 | $ hg paths |
|
45 | $ hg paths | |
46 | default = $TESTTMP/foo%bar |
|
46 | default = $TESTTMP/foo%bar | |
47 | $ hg showconfig |
|
47 | $ hg showconfig | |
48 | bundle.mainreporoot=$TESTTMP/foobar |
|
48 | bundle.mainreporoot=$TESTTMP/foobar | |
49 | paths.default=$TESTTMP/foo%bar |
|
49 | paths.default=$TESTTMP/foo%bar | |
50 | $ cd .. |
|
50 | $ cd .. | |
51 |
|
51 | |||
52 | Check %include |
|
52 | Check %include | |
53 |
|
53 | |||
54 | $ echo '[section]' > $TESTTMP/included |
|
54 | $ echo '[section]' > $TESTTMP/included | |
55 | $ echo 'option = value' >> $TESTTMP/included |
|
55 | $ echo 'option = value' >> $TESTTMP/included | |
56 | $ echo '%include $TESTTMP/included' >> $HGRC |
|
56 | $ echo '%include $TESTTMP/included' >> $HGRC | |
57 | $ hg showconfig section |
|
57 | $ hg showconfig section | |
58 | section.option=value |
|
58 | section.option=value | |
59 | #if unix-permissions no-root |
|
59 | #if unix-permissions no-root | |
60 | $ chmod u-r $TESTTMP/included |
|
60 | $ chmod u-r $TESTTMP/included | |
61 | $ hg showconfig section |
|
61 | $ hg showconfig section | |
62 | config error at $TESTTMP/hgrc:2: cannot include $TESTTMP/included (Permission denied) |
|
62 | config error at $TESTTMP/hgrc:2: cannot include $TESTTMP/included (Permission denied*) (glob) | |
63 | [255] |
|
63 | [255] | |
64 | #endif |
|
64 | #endif | |
65 |
|
65 | |||
66 | issue1829: wrong indentation |
|
66 | issue1829: wrong indentation | |
67 |
|
67 | |||
68 | $ echo '[foo]' > $HGRC |
|
68 | $ echo '[foo]' > $HGRC | |
69 | $ echo ' x = y' >> $HGRC |
|
69 | $ echo ' x = y' >> $HGRC | |
70 | $ hg version |
|
70 | $ hg version | |
71 | config error at $TESTTMP/hgrc:2: unexpected leading whitespace: x = y |
|
71 | config error at $TESTTMP/hgrc:2: unexpected leading whitespace: x = y | |
72 | [255] |
|
72 | [255] | |
73 |
|
73 | |||
74 | $ "$PYTHON" -c "from __future__ import print_function; print('[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n')" \ |
|
74 | $ "$PYTHON" -c "from __future__ import print_function; print('[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n')" \ | |
75 | > > $HGRC |
|
75 | > > $HGRC | |
76 | $ hg showconfig foo |
|
76 | $ hg showconfig foo | |
77 | foo.bar=a\nb\nc\nde\nfg |
|
77 | foo.bar=a\nb\nc\nde\nfg | |
78 | foo.baz=bif cb |
|
78 | foo.baz=bif cb | |
79 |
|
79 | |||
80 | $ FAKEPATH=/path/to/nowhere |
|
80 | $ FAKEPATH=/path/to/nowhere | |
81 | $ export FAKEPATH |
|
81 | $ export FAKEPATH | |
82 | $ echo '%include $FAKEPATH/no-such-file' > $HGRC |
|
82 | $ echo '%include $FAKEPATH/no-such-file' > $HGRC | |
83 | $ hg version |
|
83 | $ hg version | |
84 | Mercurial Distributed SCM (version *) (glob) |
|
84 | Mercurial Distributed SCM (version *) (glob) | |
85 | (see https://mercurial-scm.org for more information) |
|
85 | (see https://mercurial-scm.org for more information) | |
86 |
|
86 | |||
87 | Copyright (C) 2005-* Matt Mackall and others (glob) |
|
87 | Copyright (C) 2005-* Matt Mackall and others (glob) | |
88 | This is free software; see the source for copying conditions. There is NO |
|
88 | This is free software; see the source for copying conditions. There is NO | |
89 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
89 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
90 | $ unset FAKEPATH |
|
90 | $ unset FAKEPATH | |
91 |
|
91 | |||
92 | make sure global options given on the cmdline take precedence |
|
92 | make sure global options given on the cmdline take precedence | |
93 |
|
93 | |||
94 | $ hg showconfig --config ui.verbose=True --quiet |
|
94 | $ hg showconfig --config ui.verbose=True --quiet | |
95 | bundle.mainreporoot=$TESTTMP |
|
95 | bundle.mainreporoot=$TESTTMP | |
96 | ui.verbose=False |
|
96 | ui.verbose=False | |
97 | ui.debug=False |
|
97 | ui.debug=False | |
98 | ui.quiet=True |
|
98 | ui.quiet=True | |
99 |
|
99 | |||
100 | $ touch foobar/untracked |
|
100 | $ touch foobar/untracked | |
101 | $ cat >> foobar/.hg/hgrc <<EOF |
|
101 | $ cat >> foobar/.hg/hgrc <<EOF | |
102 | > [ui] |
|
102 | > [ui] | |
103 | > verbose=True |
|
103 | > verbose=True | |
104 | > EOF |
|
104 | > EOF | |
105 | $ hg -R foobar st -q |
|
105 | $ hg -R foobar st -q | |
106 |
|
106 | |||
107 | username expansion |
|
107 | username expansion | |
108 |
|
108 | |||
109 | $ olduser=$HGUSER |
|
109 | $ olduser=$HGUSER | |
110 | $ unset HGUSER |
|
110 | $ unset HGUSER | |
111 |
|
111 | |||
112 | $ FAKEUSER='John Doe' |
|
112 | $ FAKEUSER='John Doe' | |
113 | $ export FAKEUSER |
|
113 | $ export FAKEUSER | |
114 | $ echo '[ui]' > $HGRC |
|
114 | $ echo '[ui]' > $HGRC | |
115 | $ echo 'username = $FAKEUSER' >> $HGRC |
|
115 | $ echo 'username = $FAKEUSER' >> $HGRC | |
116 |
|
116 | |||
117 | $ hg init usertest |
|
117 | $ hg init usertest | |
118 | $ cd usertest |
|
118 | $ cd usertest | |
119 | $ touch bar |
|
119 | $ touch bar | |
120 | $ hg commit --addremove --quiet -m "added bar" |
|
120 | $ hg commit --addremove --quiet -m "added bar" | |
121 | $ hg log --template "{author}\n" |
|
121 | $ hg log --template "{author}\n" | |
122 | John Doe |
|
122 | John Doe | |
123 | $ cd .. |
|
123 | $ cd .. | |
124 |
|
124 | |||
125 | $ hg showconfig |
|
125 | $ hg showconfig | |
126 | bundle.mainreporoot=$TESTTMP |
|
126 | bundle.mainreporoot=$TESTTMP | |
127 | ui.username=$FAKEUSER |
|
127 | ui.username=$FAKEUSER | |
128 |
|
128 | |||
129 | $ unset FAKEUSER |
|
129 | $ unset FAKEUSER | |
130 | $ HGUSER=$olduser |
|
130 | $ HGUSER=$olduser | |
131 | $ export HGUSER |
|
131 | $ export HGUSER | |
132 |
|
132 | |||
133 | showconfig with multiple arguments |
|
133 | showconfig with multiple arguments | |
134 |
|
134 | |||
135 | $ echo "[alias]" > $HGRC |
|
135 | $ echo "[alias]" > $HGRC | |
136 | $ echo "log = log -g" >> $HGRC |
|
136 | $ echo "log = log -g" >> $HGRC | |
137 | $ echo "[defaults]" >> $HGRC |
|
137 | $ echo "[defaults]" >> $HGRC | |
138 | $ echo "identify = -n" >> $HGRC |
|
138 | $ echo "identify = -n" >> $HGRC | |
139 | $ hg showconfig alias defaults |
|
139 | $ hg showconfig alias defaults | |
140 | alias.log=log -g |
|
140 | alias.log=log -g | |
141 | defaults.identify=-n |
|
141 | defaults.identify=-n | |
142 | $ hg showconfig alias alias |
|
142 | $ hg showconfig alias alias | |
143 | alias.log=log -g |
|
143 | alias.log=log -g | |
144 | $ hg showconfig alias.log alias.log |
|
144 | $ hg showconfig alias.log alias.log | |
145 | alias.log=log -g |
|
145 | alias.log=log -g | |
146 | $ hg showconfig alias defaults.identify |
|
146 | $ hg showconfig alias defaults.identify | |
147 | alias.log=log -g |
|
147 | alias.log=log -g | |
148 | defaults.identify=-n |
|
148 | defaults.identify=-n | |
149 | $ hg showconfig alias.log defaults.identify |
|
149 | $ hg showconfig alias.log defaults.identify | |
150 | alias.log=log -g |
|
150 | alias.log=log -g | |
151 | defaults.identify=-n |
|
151 | defaults.identify=-n | |
152 |
|
152 | |||
153 | HGPLAIN |
|
153 | HGPLAIN | |
154 |
|
154 | |||
155 | $ echo "[ui]" > $HGRC |
|
155 | $ echo "[ui]" > $HGRC | |
156 | $ echo "debug=true" >> $HGRC |
|
156 | $ echo "debug=true" >> $HGRC | |
157 | $ echo "fallbackencoding=ASCII" >> $HGRC |
|
157 | $ echo "fallbackencoding=ASCII" >> $HGRC | |
158 | $ echo "quiet=true" >> $HGRC |
|
158 | $ echo "quiet=true" >> $HGRC | |
159 | $ echo "slash=true" >> $HGRC |
|
159 | $ echo "slash=true" >> $HGRC | |
160 | $ echo "traceback=true" >> $HGRC |
|
160 | $ echo "traceback=true" >> $HGRC | |
161 | $ echo "verbose=true" >> $HGRC |
|
161 | $ echo "verbose=true" >> $HGRC | |
162 | $ echo "style=~/.hgstyle" >> $HGRC |
|
162 | $ echo "style=~/.hgstyle" >> $HGRC | |
163 | $ echo "logtemplate={node}" >> $HGRC |
|
163 | $ echo "logtemplate={node}" >> $HGRC | |
164 | $ echo "[defaults]" >> $HGRC |
|
164 | $ echo "[defaults]" >> $HGRC | |
165 | $ echo "identify=-n" >> $HGRC |
|
165 | $ echo "identify=-n" >> $HGRC | |
166 | $ echo "[alias]" >> $HGRC |
|
166 | $ echo "[alias]" >> $HGRC | |
167 | $ echo "log=log -g" >> $HGRC |
|
167 | $ echo "log=log -g" >> $HGRC | |
168 |
|
168 | |||
169 | customized hgrc |
|
169 | customized hgrc | |
170 |
|
170 | |||
171 | $ hg showconfig |
|
171 | $ hg showconfig | |
172 | read config from: $TESTTMP/hgrc |
|
172 | read config from: $TESTTMP/hgrc | |
173 | $TESTTMP/hgrc:13: alias.log=log -g |
|
173 | $TESTTMP/hgrc:13: alias.log=log -g | |
174 | repo: bundle.mainreporoot=$TESTTMP |
|
174 | repo: bundle.mainreporoot=$TESTTMP | |
175 | $TESTTMP/hgrc:11: defaults.identify=-n |
|
175 | $TESTTMP/hgrc:11: defaults.identify=-n | |
176 | $TESTTMP/hgrc:2: ui.debug=true |
|
176 | $TESTTMP/hgrc:2: ui.debug=true | |
177 | $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII |
|
177 | $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII | |
178 | $TESTTMP/hgrc:4: ui.quiet=true |
|
178 | $TESTTMP/hgrc:4: ui.quiet=true | |
179 | $TESTTMP/hgrc:5: ui.slash=true |
|
179 | $TESTTMP/hgrc:5: ui.slash=true | |
180 | $TESTTMP/hgrc:6: ui.traceback=true |
|
180 | $TESTTMP/hgrc:6: ui.traceback=true | |
181 | $TESTTMP/hgrc:7: ui.verbose=true |
|
181 | $TESTTMP/hgrc:7: ui.verbose=true | |
182 | $TESTTMP/hgrc:8: ui.style=~/.hgstyle |
|
182 | $TESTTMP/hgrc:8: ui.style=~/.hgstyle | |
183 | $TESTTMP/hgrc:9: ui.logtemplate={node} |
|
183 | $TESTTMP/hgrc:9: ui.logtemplate={node} | |
184 |
|
184 | |||
185 | plain hgrc |
|
185 | plain hgrc | |
186 |
|
186 | |||
187 | $ HGPLAIN=; export HGPLAIN |
|
187 | $ HGPLAIN=; export HGPLAIN | |
188 | $ hg showconfig --config ui.traceback=True --debug |
|
188 | $ hg showconfig --config ui.traceback=True --debug | |
189 | read config from: $TESTTMP/hgrc |
|
189 | read config from: $TESTTMP/hgrc | |
190 | repo: bundle.mainreporoot=$TESTTMP |
|
190 | repo: bundle.mainreporoot=$TESTTMP | |
191 | --config: ui.traceback=True |
|
191 | --config: ui.traceback=True | |
192 | --verbose: ui.verbose=False |
|
192 | --verbose: ui.verbose=False | |
193 | --debug: ui.debug=True |
|
193 | --debug: ui.debug=True | |
194 | --quiet: ui.quiet=False |
|
194 | --quiet: ui.quiet=False | |
195 |
|
195 | |||
196 | with environment variables |
|
196 | with environment variables | |
197 |
|
197 | |||
198 | $ PAGER=p1 EDITOR=e1 VISUAL=e2 hg showconfig --debug |
|
198 | $ PAGER=p1 EDITOR=e1 VISUAL=e2 hg showconfig --debug | |
199 | read config from: $TESTTMP/hgrc |
|
199 | read config from: $TESTTMP/hgrc | |
200 | repo: bundle.mainreporoot=$TESTTMP |
|
200 | repo: bundle.mainreporoot=$TESTTMP | |
201 | $PAGER: pager.pager=p1 |
|
201 | $PAGER: pager.pager=p1 | |
202 | $VISUAL: ui.editor=e2 |
|
202 | $VISUAL: ui.editor=e2 | |
203 | --verbose: ui.verbose=False |
|
203 | --verbose: ui.verbose=False | |
204 | --debug: ui.debug=True |
|
204 | --debug: ui.debug=True | |
205 | --quiet: ui.quiet=False |
|
205 | --quiet: ui.quiet=False | |
206 |
|
206 | |||
207 | plain mode with exceptions |
|
207 | plain mode with exceptions | |
208 |
|
208 | |||
209 | $ cat > plain.py <<EOF |
|
209 | $ cat > plain.py <<EOF | |
210 | > from mercurial import commands, extensions |
|
210 | > from mercurial import commands, extensions | |
211 | > def _config(orig, ui, repo, *values, **opts): |
|
211 | > def _config(orig, ui, repo, *values, **opts): | |
212 | > ui.write(b'plain: %r\n' % ui.plain()) |
|
212 | > ui.write(b'plain: %r\n' % ui.plain()) | |
213 | > return orig(ui, repo, *values, **opts) |
|
213 | > return orig(ui, repo, *values, **opts) | |
214 | > def uisetup(ui): |
|
214 | > def uisetup(ui): | |
215 | > extensions.wrapcommand(commands.table, b'config', _config) |
|
215 | > extensions.wrapcommand(commands.table, b'config', _config) | |
216 | > EOF |
|
216 | > EOF | |
217 | $ echo "[extensions]" >> $HGRC |
|
217 | $ echo "[extensions]" >> $HGRC | |
218 | $ echo "plain=./plain.py" >> $HGRC |
|
218 | $ echo "plain=./plain.py" >> $HGRC | |
219 | $ HGPLAINEXCEPT=; export HGPLAINEXCEPT |
|
219 | $ HGPLAINEXCEPT=; export HGPLAINEXCEPT | |
220 | $ hg showconfig --config ui.traceback=True --debug |
|
220 | $ hg showconfig --config ui.traceback=True --debug | |
221 | plain: True |
|
221 | plain: True | |
222 | read config from: $TESTTMP/hgrc |
|
222 | read config from: $TESTTMP/hgrc | |
223 | repo: bundle.mainreporoot=$TESTTMP |
|
223 | repo: bundle.mainreporoot=$TESTTMP | |
224 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
224 | $TESTTMP/hgrc:15: extensions.plain=./plain.py | |
225 | --config: ui.traceback=True |
|
225 | --config: ui.traceback=True | |
226 | --verbose: ui.verbose=False |
|
226 | --verbose: ui.verbose=False | |
227 | --debug: ui.debug=True |
|
227 | --debug: ui.debug=True | |
228 | --quiet: ui.quiet=False |
|
228 | --quiet: ui.quiet=False | |
229 | $ unset HGPLAIN |
|
229 | $ unset HGPLAIN | |
230 | $ hg showconfig --config ui.traceback=True --debug |
|
230 | $ hg showconfig --config ui.traceback=True --debug | |
231 | plain: True |
|
231 | plain: True | |
232 | read config from: $TESTTMP/hgrc |
|
232 | read config from: $TESTTMP/hgrc | |
233 | repo: bundle.mainreporoot=$TESTTMP |
|
233 | repo: bundle.mainreporoot=$TESTTMP | |
234 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
234 | $TESTTMP/hgrc:15: extensions.plain=./plain.py | |
235 | --config: ui.traceback=True |
|
235 | --config: ui.traceback=True | |
236 | --verbose: ui.verbose=False |
|
236 | --verbose: ui.verbose=False | |
237 | --debug: ui.debug=True |
|
237 | --debug: ui.debug=True | |
238 | --quiet: ui.quiet=False |
|
238 | --quiet: ui.quiet=False | |
239 | $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT |
|
239 | $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT | |
240 | $ hg showconfig --config ui.traceback=True --debug |
|
240 | $ hg showconfig --config ui.traceback=True --debug | |
241 | plain: True |
|
241 | plain: True | |
242 | read config from: $TESTTMP/hgrc |
|
242 | read config from: $TESTTMP/hgrc | |
243 | repo: bundle.mainreporoot=$TESTTMP |
|
243 | repo: bundle.mainreporoot=$TESTTMP | |
244 | $TESTTMP/hgrc:15: extensions.plain=./plain.py |
|
244 | $TESTTMP/hgrc:15: extensions.plain=./plain.py | |
245 | --config: ui.traceback=True |
|
245 | --config: ui.traceback=True | |
246 | --verbose: ui.verbose=False |
|
246 | --verbose: ui.verbose=False | |
247 | --debug: ui.debug=True |
|
247 | --debug: ui.debug=True | |
248 | --quiet: ui.quiet=False |
|
248 | --quiet: ui.quiet=False | |
249 |
|
249 | |||
250 | source of paths is not mangled |
|
250 | source of paths is not mangled | |
251 |
|
251 | |||
252 | $ cat >> $HGRCPATH <<EOF |
|
252 | $ cat >> $HGRCPATH <<EOF | |
253 | > [paths] |
|
253 | > [paths] | |
254 | > foo = bar |
|
254 | > foo = bar | |
255 | > EOF |
|
255 | > EOF | |
256 | $ hg showconfig --debug paths |
|
256 | $ hg showconfig --debug paths | |
257 | plain: True |
|
257 | plain: True | |
258 | read config from: $TESTTMP/hgrc |
|
258 | read config from: $TESTTMP/hgrc | |
259 | $TESTTMP/hgrc:17: paths.foo=$TESTTMP/bar |
|
259 | $TESTTMP/hgrc:17: paths.foo=$TESTTMP/bar | |
260 |
|
260 | |||
261 | Test we can skip the user configuration |
|
261 | Test we can skip the user configuration | |
262 |
|
262 | |||
263 | $ cat >> .hg/hgrc <<EOF |
|
263 | $ cat >> .hg/hgrc <<EOF | |
264 | > [paths] |
|
264 | > [paths] | |
265 | > elephant = babar |
|
265 | > elephant = babar | |
266 | > EOF |
|
266 | > EOF | |
267 | $ hg path |
|
267 | $ hg path | |
268 | elephant = $TESTTMP/babar |
|
268 | elephant = $TESTTMP/babar | |
269 | foo = $TESTTMP/bar |
|
269 | foo = $TESTTMP/bar | |
270 | $ HGRCSKIPREPO=1 hg path |
|
270 | $ HGRCSKIPREPO=1 hg path | |
271 | foo = $TESTTMP/bar |
|
271 | foo = $TESTTMP/bar | |
272 |
|
272 | |||
273 | $ cat >> .hg/hgrc <<EOF |
|
273 | $ cat >> .hg/hgrc <<EOF | |
274 | > [broken |
|
274 | > [broken | |
275 | > EOF |
|
275 | > EOF | |
276 |
|
276 | |||
277 | $ hg path |
|
277 | $ hg path | |
278 | config error at $TESTTMP/.hg/hgrc:3: [broken |
|
278 | config error at $TESTTMP/.hg/hgrc:3: [broken | |
279 | [255] |
|
279 | [255] | |
280 | $ HGRCSKIPREPO=1 hg path |
|
280 | $ HGRCSKIPREPO=1 hg path | |
281 | foo = $TESTTMP/bar |
|
281 | foo = $TESTTMP/bar | |
282 |
|
282 | |||
283 | Check that hgweb respect HGRCSKIPREPO=1 |
|
283 | Check that hgweb respect HGRCSKIPREPO=1 | |
284 |
|
284 | |||
285 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
285 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
286 | config error at $TESTTMP/.hg/hgrc:3: [broken |
|
286 | config error at $TESTTMP/.hg/hgrc:3: [broken | |
287 | [255] |
|
287 | [255] | |
288 | $ test -f hg.pid && (cat hg.pid >> $DAEMON_PIDS) |
|
288 | $ test -f hg.pid && (cat hg.pid >> $DAEMON_PIDS) | |
289 | [1] |
|
289 | [1] | |
290 | $ killdaemons.py |
|
290 | $ killdaemons.py | |
291 | $ test -f access.log && cat access.log |
|
291 | $ test -f access.log && cat access.log | |
292 | [1] |
|
292 | [1] | |
293 | $ test -f errors.log && cat errors.log |
|
293 | $ test -f errors.log && cat errors.log | |
294 | [1] |
|
294 | [1] | |
295 |
|
295 | |||
296 | $ HGRCSKIPREPO=1 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
296 | $ HGRCSKIPREPO=1 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
297 | $ cat hg.pid >> $DAEMON_PIDS |
|
297 | $ cat hg.pid >> $DAEMON_PIDS | |
298 | $ killdaemons.py |
|
298 | $ killdaemons.py | |
299 | $ cat access.log |
|
299 | $ cat access.log | |
300 | $ cat errors.log |
|
300 | $ cat errors.log | |
301 |
|
301 | |||
302 | Check that zeroconf respect HGRCSKIPREPO=1 |
|
302 | Check that zeroconf respect HGRCSKIPREPO=1 | |
303 |
|
303 | |||
304 | $ hg paths --config extensions.zeroconf= |
|
304 | $ hg paths --config extensions.zeroconf= | |
305 | config error at $TESTTMP/.hg/hgrc:3: [broken |
|
305 | config error at $TESTTMP/.hg/hgrc:3: [broken | |
306 | [255] |
|
306 | [255] | |
307 | $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf= |
|
307 | $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf= | |
308 | foo = $TESTTMP/bar |
|
308 | foo = $TESTTMP/bar |
@@ -1,707 +1,729 b'' | |||||
1 | #testcases sshv1 sshv2 |
|
1 | #testcases sshv1 sshv2 | |
2 |
|
2 | |||
3 | #if sshv2 |
|
3 | #if sshv2 | |
4 | $ cat >> $HGRCPATH << EOF |
|
4 | $ cat >> $HGRCPATH << EOF | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > sshpeer.advertise-v2 = true |
|
6 | > sshpeer.advertise-v2 = true | |
7 | > sshserver.support-v2 = true |
|
7 | > sshserver.support-v2 = true | |
8 | > EOF |
|
8 | > EOF | |
9 | #endif |
|
9 | #endif | |
10 |
|
10 | |||
11 | This test tries to exercise the ssh functionality with a dummy script |
|
11 | This test tries to exercise the ssh functionality with a dummy script | |
12 |
|
12 | |||
13 | creating 'remote' repo |
|
13 | creating 'remote' repo | |
14 |
|
14 | |||
15 | $ hg init remote |
|
15 | $ hg init remote | |
16 | $ cd remote |
|
16 | $ cd remote | |
17 | $ echo this > foo |
|
17 | $ echo this > foo | |
18 | $ echo this > fooO |
|
18 | $ echo this > fooO | |
19 | $ hg ci -A -m "init" foo fooO |
|
19 | $ hg ci -A -m "init" foo fooO | |
20 |
|
20 | |||
21 | insert a closed branch (issue4428) |
|
21 | insert a closed branch (issue4428) | |
22 |
|
22 | |||
23 | $ hg up null |
|
23 | $ hg up null | |
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
25 | $ hg branch closed |
|
25 | $ hg branch closed | |
26 | marked working directory as branch closed |
|
26 | marked working directory as branch closed | |
27 | (branches are permanent and global, did you want a bookmark?) |
|
27 | (branches are permanent and global, did you want a bookmark?) | |
28 | $ hg ci -mc0 |
|
28 | $ hg ci -mc0 | |
29 | $ hg ci --close-branch -mc1 |
|
29 | $ hg ci --close-branch -mc1 | |
30 | $ hg up -q default |
|
30 | $ hg up -q default | |
31 |
|
31 | |||
32 | configure for serving |
|
32 | configure for serving | |
33 |
|
33 | |||
34 | $ cat <<EOF > .hg/hgrc |
|
34 | $ cat <<EOF > .hg/hgrc | |
35 | > [server] |
|
35 | > [server] | |
36 | > uncompressed = True |
|
36 | > uncompressed = True | |
37 | > |
|
37 | > | |
38 | > [hooks] |
|
38 | > [hooks] | |
39 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" |
|
39 | > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog" | |
40 | > EOF |
|
40 | > EOF | |
41 | $ cd $TESTTMP |
|
41 | $ cd $TESTTMP | |
42 |
|
42 | |||
43 | repo not found error |
|
43 | repo not found error | |
44 |
|
44 | |||
45 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
45 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
46 | remote: abort: repository nonexistent not found |
|
46 | remote: abort: repository nonexistent not found | |
47 | abort: no suitable response from remote hg |
|
47 | abort: no suitable response from remote hg | |
48 | [255] |
|
48 | [255] | |
49 | $ hg clone -q -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local |
|
49 | $ hg clone -q -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local | |
50 | remote: abort: repository nonexistent not found |
|
50 | remote: abort: repository nonexistent not found | |
51 | abort: no suitable response from remote hg |
|
51 | abort: no suitable response from remote hg | |
52 | [255] |
|
52 | [255] | |
53 |
|
53 | |||
54 | non-existent absolute path |
|
54 | non-existent absolute path | |
55 |
|
55 | |||
56 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local |
|
56 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local | |
57 | remote: abort: repository $TESTTMP/nonexistent not found |
|
57 | remote: abort: repository $TESTTMP/nonexistent not found | |
58 | abort: no suitable response from remote hg |
|
58 | abort: no suitable response from remote hg | |
59 | [255] |
|
59 | [255] | |
60 |
|
60 | |||
61 | clone remote via stream |
|
61 | clone remote via stream | |
62 |
|
62 | |||
63 | #if no-reposimplestore |
|
63 | #if no-reposimplestore | |
64 |
|
64 | |||
65 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream |
|
65 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream | |
66 | streaming all changes |
|
66 | streaming all changes | |
67 | 8 files to transfer, 827 bytes of data |
|
67 | 8 files to transfer, 827 bytes of data | |
68 | transferred 827 bytes in * seconds (*) (glob) |
|
68 | transferred 827 bytes in * seconds (*) (glob) | |
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 local-stream |
|
71 | $ cd local-stream | |
72 | $ hg verify |
|
72 | $ hg verify | |
73 | checking changesets |
|
73 | checking changesets | |
74 | checking manifests |
|
74 | checking manifests | |
75 | crosschecking files in changesets and manifests |
|
75 | crosschecking files in changesets and manifests | |
76 | checking files |
|
76 | checking files | |
77 | checked 3 changesets with 2 changes to 2 files |
|
77 | checked 3 changesets with 2 changes to 2 files | |
78 | $ hg branches |
|
78 | $ hg branches | |
79 | default 0:1160648e36ce |
|
79 | default 0:1160648e36ce | |
80 | $ cd $TESTTMP |
|
80 | $ cd $TESTTMP | |
81 |
|
81 | |||
82 | clone bookmarks via stream |
|
82 | clone bookmarks via stream | |
83 |
|
83 | |||
84 | $ hg -R local-stream book mybook |
|
84 | $ hg -R local-stream book mybook | |
85 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 |
|
85 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2 | |
86 | streaming all changes |
|
86 | streaming all changes | |
87 | 16 files to transfer, * of data (glob) |
|
87 | 16 files to transfer, * of data (glob) | |
88 | transferred * in * seconds (*) (glob) |
|
88 | transferred * in * seconds (*) (glob) | |
89 | updating to branch default |
|
89 | updating to branch default | |
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | $ cd stream2 |
|
91 | $ cd stream2 | |
92 | $ hg book |
|
92 | $ hg book | |
93 | mybook 0:1160648e36ce |
|
93 | mybook 0:1160648e36ce | |
94 | $ cd $TESTTMP |
|
94 | $ cd $TESTTMP | |
95 | $ rm -rf local-stream stream2 |
|
95 | $ rm -rf local-stream stream2 | |
96 |
|
96 | |||
97 | #endif |
|
97 | #endif | |
98 |
|
98 | |||
99 | clone remote via pull |
|
99 | clone remote via pull | |
100 |
|
100 | |||
101 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local |
|
101 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local | |
102 | requesting all changes |
|
102 | requesting all changes | |
103 | adding changesets |
|
103 | adding changesets | |
104 | adding manifests |
|
104 | adding manifests | |
105 | adding file changes |
|
105 | adding file changes | |
106 | added 3 changesets with 2 changes to 2 files |
|
106 | added 3 changesets with 2 changes to 2 files | |
107 | new changesets 1160648e36ce:ad076bfb429d |
|
107 | new changesets 1160648e36ce:ad076bfb429d | |
108 | updating to branch default |
|
108 | updating to branch default | |
109 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
109 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
110 |
|
110 | |||
111 | verify |
|
111 | verify | |
112 |
|
112 | |||
113 | $ cd local |
|
113 | $ cd local | |
114 | $ hg verify |
|
114 | $ hg verify | |
115 | checking changesets |
|
115 | checking changesets | |
116 | checking manifests |
|
116 | checking manifests | |
117 | crosschecking files in changesets and manifests |
|
117 | crosschecking files in changesets and manifests | |
118 | checking files |
|
118 | checking files | |
119 | checked 3 changesets with 2 changes to 2 files |
|
119 | checked 3 changesets with 2 changes to 2 files | |
120 | $ cat >> .hg/hgrc <<EOF |
|
120 | $ cat >> .hg/hgrc <<EOF | |
121 | > [hooks] |
|
121 | > [hooks] | |
122 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" |
|
122 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |
123 | > EOF |
|
123 | > EOF | |
124 |
|
124 | |||
125 | empty default pull |
|
125 | empty default pull | |
126 |
|
126 | |||
127 | $ hg paths |
|
127 | $ hg paths | |
128 | default = ssh://user@dummy/remote |
|
128 | default = ssh://user@dummy/remote | |
129 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
129 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
130 | pulling from ssh://user@dummy/remote |
|
130 | pulling from ssh://user@dummy/remote | |
131 | searching for changes |
|
131 | searching for changes | |
132 | no changes found |
|
132 | no changes found | |
133 |
|
133 | |||
134 | pull from wrong ssh URL |
|
134 | pull from wrong ssh URL | |
135 |
|
135 | |||
136 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist |
|
136 | $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist | |
137 | pulling from ssh://user@dummy/doesnotexist |
|
137 | pulling from ssh://user@dummy/doesnotexist | |
138 | remote: abort: repository doesnotexist not found |
|
138 | remote: abort: repository doesnotexist not found | |
139 | abort: no suitable response from remote hg |
|
139 | abort: no suitable response from remote hg | |
140 | [255] |
|
140 | [255] | |
141 |
|
141 | |||
142 | local change |
|
142 | local change | |
143 |
|
143 | |||
144 | $ echo bleah > foo |
|
144 | $ echo bleah > foo | |
145 | $ hg ci -m "add" |
|
145 | $ hg ci -m "add" | |
146 |
|
146 | |||
147 | updating rc |
|
147 | updating rc | |
148 |
|
148 | |||
149 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
149 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
150 | $ echo "[ui]" >> .hg/hgrc |
|
150 | $ echo "[ui]" >> .hg/hgrc | |
151 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc |
|
151 | $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc | |
152 |
|
152 | |||
153 | find outgoing |
|
153 | find outgoing | |
154 |
|
154 | |||
155 | $ hg out ssh://user@dummy/remote |
|
155 | $ hg out ssh://user@dummy/remote | |
156 | comparing with ssh://user@dummy/remote |
|
156 | comparing with ssh://user@dummy/remote | |
157 | searching for changes |
|
157 | searching for changes | |
158 | changeset: 3:a28a9d1a809c |
|
158 | changeset: 3:a28a9d1a809c | |
159 | tag: tip |
|
159 | tag: tip | |
160 | parent: 0:1160648e36ce |
|
160 | parent: 0:1160648e36ce | |
161 | user: test |
|
161 | user: test | |
162 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
162 | date: Thu Jan 01 00:00:00 1970 +0000 | |
163 | summary: add |
|
163 | summary: add | |
164 |
|
164 | |||
165 |
|
165 | |||
166 | find incoming on the remote side |
|
166 | find incoming on the remote side | |
167 |
|
167 | |||
168 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local |
|
168 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local | |
169 | comparing with ssh://user@dummy/local |
|
169 | comparing with ssh://user@dummy/local | |
170 | searching for changes |
|
170 | searching for changes | |
171 | changeset: 3:a28a9d1a809c |
|
171 | changeset: 3:a28a9d1a809c | |
172 | tag: tip |
|
172 | tag: tip | |
173 | parent: 0:1160648e36ce |
|
173 | parent: 0:1160648e36ce | |
174 | user: test |
|
174 | user: test | |
175 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
175 | date: Thu Jan 01 00:00:00 1970 +0000 | |
176 | summary: add |
|
176 | summary: add | |
177 |
|
177 | |||
178 |
|
178 | |||
179 | find incoming on the remote side (using absolute path) |
|
179 | find incoming on the remote side (using absolute path) | |
180 |
|
180 | |||
181 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" |
|
181 | $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`" | |
182 | comparing with ssh://user@dummy/$TESTTMP/local |
|
182 | comparing with ssh://user@dummy/$TESTTMP/local | |
183 | searching for changes |
|
183 | searching for changes | |
184 | changeset: 3:a28a9d1a809c |
|
184 | changeset: 3:a28a9d1a809c | |
185 | tag: tip |
|
185 | tag: tip | |
186 | parent: 0:1160648e36ce |
|
186 | parent: 0:1160648e36ce | |
187 | user: test |
|
187 | user: test | |
188 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
188 | date: Thu Jan 01 00:00:00 1970 +0000 | |
189 | summary: add |
|
189 | summary: add | |
190 |
|
190 | |||
191 |
|
191 | |||
192 | push |
|
192 | push | |
193 |
|
193 | |||
194 | $ hg push |
|
194 | $ hg push | |
195 | pushing to ssh://user@dummy/remote |
|
195 | pushing to ssh://user@dummy/remote | |
196 | searching for changes |
|
196 | searching for changes | |
197 | remote: adding changesets |
|
197 | remote: adding changesets | |
198 | remote: adding manifests |
|
198 | remote: adding manifests | |
199 | remote: adding file changes |
|
199 | remote: adding file changes | |
200 | remote: added 1 changesets with 1 changes to 1 files |
|
200 | remote: added 1 changesets with 1 changes to 1 files | |
201 | $ cd $TESTTMP/remote |
|
201 | $ cd $TESTTMP/remote | |
202 |
|
202 | |||
203 | check remote tip |
|
203 | check remote tip | |
204 |
|
204 | |||
205 | $ hg tip |
|
205 | $ hg tip | |
206 | changeset: 3:a28a9d1a809c |
|
206 | changeset: 3:a28a9d1a809c | |
207 | tag: tip |
|
207 | tag: tip | |
208 | parent: 0:1160648e36ce |
|
208 | parent: 0:1160648e36ce | |
209 | user: test |
|
209 | user: test | |
210 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
210 | date: Thu Jan 01 00:00:00 1970 +0000 | |
211 | summary: add |
|
211 | summary: add | |
212 |
|
212 | |||
213 | $ hg verify |
|
213 | $ hg verify | |
214 | checking changesets |
|
214 | checking changesets | |
215 | checking manifests |
|
215 | checking manifests | |
216 | crosschecking files in changesets and manifests |
|
216 | crosschecking files in changesets and manifests | |
217 | checking files |
|
217 | checking files | |
218 | checked 4 changesets with 3 changes to 2 files |
|
218 | checked 4 changesets with 3 changes to 2 files | |
219 | $ hg cat -r tip foo |
|
219 | $ hg cat -r tip foo | |
220 | bleah |
|
220 | bleah | |
221 | $ echo z > z |
|
221 | $ echo z > z | |
222 | $ hg ci -A -m z z |
|
222 | $ hg ci -A -m z z | |
223 | created new head |
|
223 | created new head | |
224 |
|
224 | |||
225 | test pushkeys and bookmarks |
|
225 | test pushkeys and bookmarks | |
226 |
|
226 | |||
227 | $ cd $TESTTMP/local |
|
227 | $ cd $TESTTMP/local | |
228 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces |
|
228 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces | |
229 | bookmarks |
|
229 | bookmarks | |
230 | namespaces |
|
230 | namespaces | |
231 | phases |
|
231 | phases | |
232 | $ hg book foo -r 0 |
|
232 | $ hg book foo -r 0 | |
233 | $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default` |
|
233 | $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default` | |
234 | comparing with ssh://user@dummy/remote |
|
234 | comparing with ssh://user@dummy/remote | |
235 | searching for changed bookmarks |
|
235 | searching for changed bookmarks | |
236 | foo 1160648e36ce |
|
236 | foo 1160648e36ce | |
237 | $ hg push -B foo |
|
237 | $ hg push -B foo | |
238 | pushing to ssh://user@dummy/remote |
|
238 | pushing to ssh://user@dummy/remote | |
239 | searching for changes |
|
239 | searching for changes | |
240 | no changes found |
|
240 | no changes found | |
241 | exporting bookmark foo |
|
241 | exporting bookmark foo | |
242 | [1] |
|
242 | [1] | |
243 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks |
|
243 | $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks | |
244 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
244 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
245 | $ hg book -f foo |
|
245 | $ hg book -f foo | |
246 | $ hg push --traceback |
|
246 | $ hg push --traceback | |
247 | pushing to ssh://user@dummy/remote |
|
247 | pushing to ssh://user@dummy/remote | |
248 | searching for changes |
|
248 | searching for changes | |
249 | no changes found |
|
249 | no changes found | |
250 | updating bookmark foo |
|
250 | updating bookmark foo | |
251 | [1] |
|
251 | [1] | |
252 | $ hg book -d foo |
|
252 | $ hg book -d foo | |
253 | $ hg in -B |
|
253 | $ hg in -B | |
254 | comparing with ssh://user@dummy/remote |
|
254 | comparing with ssh://user@dummy/remote | |
255 | searching for changed bookmarks |
|
255 | searching for changed bookmarks | |
256 | foo a28a9d1a809c |
|
256 | foo a28a9d1a809c | |
257 | $ hg book -f -r 0 foo |
|
257 | $ hg book -f -r 0 foo | |
258 | $ hg pull -B foo |
|
258 | $ hg pull -B foo | |
259 | pulling from ssh://user@dummy/remote |
|
259 | pulling from ssh://user@dummy/remote | |
260 | no changes found |
|
260 | no changes found | |
261 | updating bookmark foo |
|
261 | updating bookmark foo | |
262 | $ hg book -d foo |
|
262 | $ hg book -d foo | |
263 | $ hg push -B foo |
|
263 | $ hg push -B foo | |
264 | pushing to ssh://user@dummy/remote |
|
264 | pushing to ssh://user@dummy/remote | |
265 | searching for changes |
|
265 | searching for changes | |
266 | no changes found |
|
266 | no changes found | |
267 | deleting remote bookmark foo |
|
267 | deleting remote bookmark foo | |
268 | [1] |
|
268 | [1] | |
269 |
|
269 | |||
270 | a bad, evil hook that prints to stdout |
|
270 | a bad, evil hook that prints to stdout | |
271 |
|
271 | |||
272 | $ cat <<EOF > $TESTTMP/badhook |
|
272 | $ cat <<EOF > $TESTTMP/badhook | |
273 | > import sys |
|
273 | > import sys | |
274 | > sys.stdout.write("KABOOM\n") |
|
274 | > sys.stdout.write("KABOOM\n") | |
275 | > sys.stdout.flush() |
|
275 | > sys.stdout.flush() | |
276 | > EOF |
|
276 | > EOF | |
277 |
|
277 | |||
278 | $ cat <<EOF > $TESTTMP/badpyhook.py |
|
278 | $ cat <<EOF > $TESTTMP/badpyhook.py | |
279 | > import sys |
|
279 | > import sys | |
280 | > def hook(ui, repo, hooktype, **kwargs): |
|
280 | > def hook(ui, repo, hooktype, **kwargs): | |
281 | > sys.stdout.write("KABOOM IN PROCESS\n") |
|
281 | > sys.stdout.write("KABOOM IN PROCESS\n") | |
282 | > sys.stdout.flush() |
|
282 | > sys.stdout.flush() | |
283 | > EOF |
|
283 | > EOF | |
284 |
|
284 | |||
285 | $ cat <<EOF >> ../remote/.hg/hgrc |
|
285 | $ cat <<EOF >> ../remote/.hg/hgrc | |
286 | > [hooks] |
|
286 | > [hooks] | |
287 | > changegroup.stdout = "$PYTHON" $TESTTMP/badhook |
|
287 | > changegroup.stdout = "$PYTHON" $TESTTMP/badhook | |
288 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook |
|
288 | > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook | |
289 | > EOF |
|
289 | > EOF | |
290 | $ echo r > r |
|
290 | $ echo r > r | |
291 | $ hg ci -A -m z r |
|
291 | $ hg ci -A -m z r | |
292 |
|
292 | |||
293 | push should succeed even though it has an unexpected response |
|
293 | push should succeed even though it has an unexpected response | |
294 |
|
294 | |||
295 | $ hg push |
|
295 | $ hg push | |
296 | pushing to ssh://user@dummy/remote |
|
296 | pushing to ssh://user@dummy/remote | |
297 | searching for changes |
|
297 | searching for changes | |
298 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
298 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
299 | remote: adding changesets |
|
299 | remote: adding changesets | |
300 | remote: adding manifests |
|
300 | remote: adding manifests | |
301 | remote: adding file changes |
|
301 | remote: adding file changes | |
302 | remote: added 1 changesets with 1 changes to 1 files |
|
302 | remote: added 1 changesets with 1 changes to 1 files | |
303 | remote: KABOOM |
|
303 | remote: KABOOM | |
304 | remote: KABOOM IN PROCESS |
|
304 | remote: KABOOM IN PROCESS | |
305 | $ hg -R ../remote heads |
|
305 | $ hg -R ../remote heads | |
306 | changeset: 5:1383141674ec |
|
306 | changeset: 5:1383141674ec | |
307 | tag: tip |
|
307 | tag: tip | |
308 | parent: 3:a28a9d1a809c |
|
308 | parent: 3:a28a9d1a809c | |
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: z |
|
311 | summary: z | |
312 |
|
312 | |||
313 | changeset: 4:6c0482d977a3 |
|
313 | changeset: 4:6c0482d977a3 | |
314 | parent: 0:1160648e36ce |
|
314 | parent: 0:1160648e36ce | |
315 | user: test |
|
315 | user: test | |
316 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
316 | date: Thu Jan 01 00:00:00 1970 +0000 | |
317 | summary: z |
|
317 | summary: z | |
318 |
|
318 | |||
319 |
|
319 | |||
320 | #if chg |
|
320 | #if chg | |
321 |
|
321 | |||
322 | try again with remote chg, which should succeed as well |
|
322 | try again with remote chg, which should succeed as well | |
323 |
|
323 | |||
324 | $ hg rollback -R ../remote |
|
324 | $ hg rollback -R ../remote | |
325 | repository tip rolled back to revision 4 (undo serve) |
|
325 | repository tip rolled back to revision 4 (undo serve) | |
326 |
|
326 | |||
327 | $ hg push --config ui.remotecmd=chg |
|
327 | $ hg push --config ui.remotecmd=chg | |
328 | pushing to ssh://user@dummy/remote |
|
328 | pushing to ssh://user@dummy/remote | |
329 | searching for changes |
|
329 | searching for changes | |
330 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 |
|
330 | remote has heads on branch 'default' that are not known locally: 6c0482d977a3 | |
331 | remote: adding changesets |
|
331 | remote: adding changesets | |
332 | remote: adding manifests |
|
332 | remote: adding manifests | |
333 | remote: adding file changes |
|
333 | remote: adding file changes | |
334 | remote: added 1 changesets with 1 changes to 1 files (py3 !) |
|
334 | remote: added 1 changesets with 1 changes to 1 files (py3 !) | |
335 | remote: KABOOM |
|
335 | remote: KABOOM | |
336 | remote: KABOOM IN PROCESS |
|
336 | remote: KABOOM IN PROCESS | |
337 | remote: added 1 changesets with 1 changes to 1 files (no-py3 !) |
|
337 | remote: added 1 changesets with 1 changes to 1 files (no-py3 !) | |
338 |
|
338 | |||
339 | #endif |
|
339 | #endif | |
340 |
|
340 | |||
341 | clone bookmarks |
|
341 | clone bookmarks | |
342 |
|
342 | |||
343 | $ hg -R ../remote bookmark test |
|
343 | $ hg -R ../remote bookmark test | |
344 | $ hg -R ../remote bookmarks |
|
344 | $ hg -R ../remote bookmarks | |
345 | * test 4:6c0482d977a3 |
|
345 | * test 4:6c0482d977a3 | |
346 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks |
|
346 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks | |
347 | requesting all changes |
|
347 | requesting all changes | |
348 | adding changesets |
|
348 | adding changesets | |
349 | adding manifests |
|
349 | adding manifests | |
350 | adding file changes |
|
350 | adding file changes | |
351 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
351 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
352 | new changesets 1160648e36ce:1383141674ec |
|
352 | new changesets 1160648e36ce:1383141674ec | |
353 | updating to branch default |
|
353 | updating to branch default | |
354 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
354 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
355 | $ hg -R local-bookmarks bookmarks |
|
355 | $ hg -R local-bookmarks bookmarks | |
356 | test 4:6c0482d977a3 |
|
356 | test 4:6c0482d977a3 | |
357 |
|
357 | |||
358 | passwords in ssh urls are not supported |
|
358 | passwords in ssh urls are not supported | |
359 | (we use a glob here because different Python versions give different |
|
359 | (we use a glob here because different Python versions give different | |
360 | results here) |
|
360 | results here) | |
361 |
|
361 | |||
362 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
362 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
363 | pushing to ssh://user:*@dummy/remote (glob) |
|
363 | pushing to ssh://user:*@dummy/remote (glob) | |
364 | abort: password in URL not supported |
|
364 | abort: password in URL not supported | |
365 | [255] |
|
365 | [255] | |
366 |
|
366 | |||
367 | $ cd $TESTTMP |
|
367 | $ cd $TESTTMP | |
368 |
|
368 | |||
369 | hide outer repo |
|
369 | hide outer repo | |
370 | $ hg init |
|
370 | $ hg init | |
371 |
|
371 | |||
372 | Test remote paths with spaces (issue2983): |
|
372 | Test remote paths with spaces (issue2983): | |
373 |
|
373 | |||
374 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
374 | $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
375 | $ touch "$TESTTMP/a repo/test" |
|
375 | $ touch "$TESTTMP/a repo/test" | |
376 | $ hg -R 'a repo' commit -A -m "test" |
|
376 | $ hg -R 'a repo' commit -A -m "test" | |
377 | adding test |
|
377 | adding test | |
378 | $ hg -R 'a repo' tag tag |
|
378 | $ hg -R 'a repo' tag tag | |
379 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
379 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
380 | 73649e48688a |
|
380 | 73649e48688a | |
381 |
|
381 | |||
382 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" |
|
382 | $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO" | |
383 | abort: unknown revision 'noNoNO' |
|
383 | abort: unknown revision 'noNoNO' | |
384 | [255] |
|
384 | [255] | |
385 |
|
385 | |||
386 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): |
|
386 | Test (non-)escaping of remote paths with spaces when cloning (issue3145): | |
387 |
|
387 | |||
388 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" |
|
388 | $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo" | |
389 | destination directory: a repo |
|
389 | destination directory: a repo | |
390 | abort: destination 'a repo' is not empty |
|
390 | abort: destination 'a repo' is not empty | |
391 | [10] |
|
391 | [10] | |
392 |
|
392 | |||
|
393 | #if no-rhg | |||
393 | Make sure hg is really paranoid in serve --stdio mode. It used to be |
|
394 | Make sure hg is really paranoid in serve --stdio mode. It used to be | |
394 | possible to get a debugger REPL by specifying a repo named --debugger. |
|
395 | possible to get a debugger REPL by specifying a repo named --debugger. | |
395 | $ hg -R --debugger serve --stdio |
|
396 | $ hg -R --debugger serve --stdio | |
396 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] |
|
397 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] | |
397 | [255] |
|
398 | [255] | |
398 | $ hg -R --config=ui.debugger=yes serve --stdio |
|
399 | $ hg -R --config=ui.debugger=yes serve --stdio | |
399 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] |
|
400 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] | |
400 | [255] |
|
401 | [255] | |
401 | Abbreviations of 'serve' also don't work, to avoid shenanigans. |
|
402 | Abbreviations of 'serve' also don't work, to avoid shenanigans. | |
402 | $ hg -R narf serv --stdio |
|
403 | $ hg -R narf serv --stdio | |
403 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] |
|
404 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |
404 | [255] |
|
405 | [255] | |
|
406 | #else | |||
|
407 | rhg aborts early on -R without a repository at that path | |||
|
408 | $ hg -R --debugger serve --stdio | |||
|
409 | abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio'] (missing-correct-output !) | |||
|
410 | abort: repository --debugger not found (known-bad-output !) | |||
|
411 | [255] | |||
|
412 | $ hg -R --config=ui.debugger=yes serve --stdio | |||
|
413 | abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio'] (missing-correct-output !) | |||
|
414 | abort: repository --config=ui.debugger=yes not found (known-bad-output !) | |||
|
415 | [255] | |||
|
416 | $ hg -R narf serv --stdio | |||
|
417 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] (missing-correct-output !) | |||
|
418 | abort: repository narf not found (known-bad-output !) | |||
|
419 | [255] | |||
|
420 | If the repo does exist, rhg finds an unsupported command and falls back to Python | |||
|
421 | which still does the right thing | |||
|
422 | $ hg init narf | |||
|
423 | $ hg -R narf serv --stdio | |||
|
424 | abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio'] | |||
|
425 | [255] | |||
|
426 | #endif | |||
405 |
|
427 | |||
406 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might |
|
428 | Test hg-ssh using a helper script that will restore PYTHONPATH (which might | |
407 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right |
|
429 | have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right | |
408 | parameters: |
|
430 | parameters: | |
409 |
|
431 | |||
410 | $ cat > ssh.sh << EOF |
|
432 | $ cat > ssh.sh << EOF | |
411 | > userhost="\$1" |
|
433 | > userhost="\$1" | |
412 | > SSH_ORIGINAL_COMMAND="\$2" |
|
434 | > SSH_ORIGINAL_COMMAND="\$2" | |
413 | > export SSH_ORIGINAL_COMMAND |
|
435 | > export SSH_ORIGINAL_COMMAND | |
414 | > PYTHONPATH="$PYTHONPATH" |
|
436 | > PYTHONPATH="$PYTHONPATH" | |
415 | > export PYTHONPATH |
|
437 | > export PYTHONPATH | |
416 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" |
|
438 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo" | |
417 | > EOF |
|
439 | > EOF | |
418 |
|
440 | |||
419 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" |
|
441 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo" | |
420 | 73649e48688a |
|
442 | 73649e48688a | |
421 |
|
443 | |||
422 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" |
|
444 | $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo" | |
423 | remote: Illegal repository "$TESTTMP/a'repo" |
|
445 | remote: Illegal repository "$TESTTMP/a'repo" | |
424 | abort: no suitable response from remote hg |
|
446 | abort: no suitable response from remote hg | |
425 | [255] |
|
447 | [255] | |
426 |
|
448 | |||
427 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" |
|
449 | $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo" | |
428 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" |
|
450 | remote: Illegal command "hacking -R 'a'\''repo' serve --stdio" | |
429 | abort: no suitable response from remote hg |
|
451 | abort: no suitable response from remote hg | |
430 | [255] |
|
452 | [255] | |
431 |
|
453 | |||
432 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" |
|
454 | $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" "$PYTHON" "$TESTDIR/../contrib/hg-ssh" | |
433 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation |
|
455 | Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation | |
434 | [255] |
|
456 | [255] | |
435 |
|
457 | |||
436 | Test hg-ssh in read-only mode: |
|
458 | Test hg-ssh in read-only mode: | |
437 |
|
459 | |||
438 | $ cat > ssh.sh << EOF |
|
460 | $ cat > ssh.sh << EOF | |
439 | > userhost="\$1" |
|
461 | > userhost="\$1" | |
440 | > SSH_ORIGINAL_COMMAND="\$2" |
|
462 | > SSH_ORIGINAL_COMMAND="\$2" | |
441 | > export SSH_ORIGINAL_COMMAND |
|
463 | > export SSH_ORIGINAL_COMMAND | |
442 | > PYTHONPATH="$PYTHONPATH" |
|
464 | > PYTHONPATH="$PYTHONPATH" | |
443 | > export PYTHONPATH |
|
465 | > export PYTHONPATH | |
444 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" |
|
466 | > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote" | |
445 | > EOF |
|
467 | > EOF | |
446 |
|
468 | |||
447 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local |
|
469 | $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local | |
448 | requesting all changes |
|
470 | requesting all changes | |
449 | adding changesets |
|
471 | adding changesets | |
450 | adding manifests |
|
472 | adding manifests | |
451 | adding file changes |
|
473 | adding file changes | |
452 | added 6 changesets with 5 changes to 4 files (+1 heads) |
|
474 | added 6 changesets with 5 changes to 4 files (+1 heads) | |
453 | new changesets 1160648e36ce:1383141674ec |
|
475 | new changesets 1160648e36ce:1383141674ec | |
454 | updating to branch default |
|
476 | updating to branch default | |
455 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
477 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
456 |
|
478 | |||
457 | $ cd read-only-local |
|
479 | $ cd read-only-local | |
458 | $ echo "baz" > bar |
|
480 | $ echo "baz" > bar | |
459 | $ hg ci -A -m "unpushable commit" bar |
|
481 | $ hg ci -A -m "unpushable commit" bar | |
460 | $ hg push --ssh "sh ../ssh.sh" |
|
482 | $ hg push --ssh "sh ../ssh.sh" | |
461 | pushing to ssh://user@dummy/*/remote (glob) |
|
483 | pushing to ssh://user@dummy/*/remote (glob) | |
462 | searching for changes |
|
484 | searching for changes | |
463 | remote: Permission denied |
|
485 | remote: Permission denied | |
464 | remote: pretxnopen.hg-ssh hook failed |
|
486 | remote: pretxnopen.hg-ssh hook failed | |
465 | abort: push failed on remote |
|
487 | abort: push failed on remote | |
466 | [255] |
|
488 | [255] | |
467 |
|
489 | |||
468 | $ cd $TESTTMP |
|
490 | $ cd $TESTTMP | |
469 |
|
491 | |||
470 | stderr from remote commands should be printed before stdout from local code (issue4336) |
|
492 | stderr from remote commands should be printed before stdout from local code (issue4336) | |
471 |
|
493 | |||
472 | $ hg clone remote stderr-ordering |
|
494 | $ hg clone remote stderr-ordering | |
473 | updating to branch default |
|
495 | updating to branch default | |
474 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
496 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
475 | $ cd stderr-ordering |
|
497 | $ cd stderr-ordering | |
476 | $ cat >> localwrite.py << EOF |
|
498 | $ cat >> localwrite.py << EOF | |
477 | > from mercurial import exchange, extensions |
|
499 | > from mercurial import exchange, extensions | |
478 | > |
|
500 | > | |
479 | > def wrappedpush(orig, repo, *args, **kwargs): |
|
501 | > def wrappedpush(orig, repo, *args, **kwargs): | |
480 | > res = orig(repo, *args, **kwargs) |
|
502 | > res = orig(repo, *args, **kwargs) | |
481 | > repo.ui.write(b'local stdout\n') |
|
503 | > repo.ui.write(b'local stdout\n') | |
482 | > repo.ui.flush() |
|
504 | > repo.ui.flush() | |
483 | > return res |
|
505 | > return res | |
484 | > |
|
506 | > | |
485 | > def extsetup(ui): |
|
507 | > def extsetup(ui): | |
486 | > extensions.wrapfunction(exchange, b'push', wrappedpush) |
|
508 | > extensions.wrapfunction(exchange, b'push', wrappedpush) | |
487 | > EOF |
|
509 | > EOF | |
488 |
|
510 | |||
489 | $ cat >> .hg/hgrc << EOF |
|
511 | $ cat >> .hg/hgrc << EOF | |
490 | > [paths] |
|
512 | > [paths] | |
491 | > default-push = ssh://user@dummy/remote |
|
513 | > default-push = ssh://user@dummy/remote | |
492 | > [ui] |
|
514 | > [ui] | |
493 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" |
|
515 | > ssh = "$PYTHON" "$TESTDIR/dummyssh" | |
494 | > [extensions] |
|
516 | > [extensions] | |
495 | > localwrite = localwrite.py |
|
517 | > localwrite = localwrite.py | |
496 | > EOF |
|
518 | > EOF | |
497 |
|
519 | |||
498 | $ echo localwrite > foo |
|
520 | $ echo localwrite > foo | |
499 | $ hg commit -m 'testing localwrite' |
|
521 | $ hg commit -m 'testing localwrite' | |
500 | $ hg push |
|
522 | $ hg push | |
501 | pushing to ssh://user@dummy/remote |
|
523 | pushing to ssh://user@dummy/remote | |
502 | searching for changes |
|
524 | searching for changes | |
503 | remote: adding changesets |
|
525 | remote: adding changesets | |
504 | remote: adding manifests |
|
526 | remote: adding manifests | |
505 | remote: adding file changes |
|
527 | remote: adding file changes | |
506 | remote: added 1 changesets with 1 changes to 1 files |
|
528 | remote: added 1 changesets with 1 changes to 1 files | |
507 | remote: KABOOM |
|
529 | remote: KABOOM | |
508 | remote: KABOOM IN PROCESS |
|
530 | remote: KABOOM IN PROCESS | |
509 | local stdout |
|
531 | local stdout | |
510 |
|
532 | |||
511 | debug output |
|
533 | debug output | |
512 |
|
534 | |||
513 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes |
|
535 | $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes | |
514 | pulling from ssh://user@dummy/remote |
|
536 | pulling from ssh://user@dummy/remote | |
515 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) |
|
537 | running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re) | |
516 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) |
|
538 | sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !) | |
517 | devel-peer-request: hello+between |
|
539 | devel-peer-request: hello+between | |
518 | devel-peer-request: pairs: 81 bytes |
|
540 | devel-peer-request: pairs: 81 bytes | |
519 | sending hello command |
|
541 | sending hello command | |
520 | sending between command |
|
542 | sending between command | |
521 | remote: 444 (sshv1 !) |
|
543 | remote: 444 (sshv1 !) | |
522 | protocol upgraded to exp-ssh-v2-0003 (sshv2 !) |
|
544 | protocol upgraded to exp-ssh-v2-0003 (sshv2 !) | |
523 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
545 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
524 | remote: 1 (sshv1 !) |
|
546 | remote: 1 (sshv1 !) | |
525 | devel-peer-request: protocaps |
|
547 | devel-peer-request: protocaps | |
526 | devel-peer-request: caps: * bytes (glob) |
|
548 | devel-peer-request: caps: * bytes (glob) | |
527 | sending protocaps command |
|
549 | sending protocaps command | |
528 | query 1; heads |
|
550 | query 1; heads | |
529 | devel-peer-request: batched-content |
|
551 | devel-peer-request: batched-content | |
530 | devel-peer-request: - heads (0 arguments) |
|
552 | devel-peer-request: - heads (0 arguments) | |
531 | devel-peer-request: - known (1 arguments) |
|
553 | devel-peer-request: - known (1 arguments) | |
532 | devel-peer-request: batch |
|
554 | devel-peer-request: batch | |
533 | devel-peer-request: cmds: 141 bytes |
|
555 | devel-peer-request: cmds: 141 bytes | |
534 | sending batch command |
|
556 | sending batch command | |
535 | searching for changes |
|
557 | searching for changes | |
536 | all remote heads known locally |
|
558 | all remote heads known locally | |
537 | no changes found |
|
559 | no changes found | |
538 | devel-peer-request: getbundle |
|
560 | devel-peer-request: getbundle | |
539 | devel-peer-request: bookmarks: 1 bytes |
|
561 | devel-peer-request: bookmarks: 1 bytes | |
540 | devel-peer-request: bundlecaps: 270 bytes |
|
562 | devel-peer-request: bundlecaps: 270 bytes | |
541 | devel-peer-request: cg: 1 bytes |
|
563 | devel-peer-request: cg: 1 bytes | |
542 | devel-peer-request: common: 122 bytes |
|
564 | devel-peer-request: common: 122 bytes | |
543 | devel-peer-request: heads: 122 bytes |
|
565 | devel-peer-request: heads: 122 bytes | |
544 | devel-peer-request: listkeys: 9 bytes |
|
566 | devel-peer-request: listkeys: 9 bytes | |
545 | devel-peer-request: phases: 1 bytes |
|
567 | devel-peer-request: phases: 1 bytes | |
546 | sending getbundle command |
|
568 | sending getbundle command | |
547 | bundle2-input-bundle: with-transaction |
|
569 | bundle2-input-bundle: with-transaction | |
548 | bundle2-input-part: "bookmarks" supported |
|
570 | bundle2-input-part: "bookmarks" supported | |
549 | bundle2-input-part: total payload size 26 |
|
571 | bundle2-input-part: total payload size 26 | |
550 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
572 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
551 | bundle2-input-part: total payload size 45 |
|
573 | bundle2-input-part: total payload size 45 | |
552 | bundle2-input-part: "phase-heads" supported |
|
574 | bundle2-input-part: "phase-heads" supported | |
553 | bundle2-input-part: total payload size 72 |
|
575 | bundle2-input-part: total payload size 72 | |
554 | bundle2-input-bundle: 3 parts total |
|
576 | bundle2-input-bundle: 3 parts total | |
555 | checking for updated bookmarks |
|
577 | checking for updated bookmarks | |
556 |
|
578 | |||
557 | $ cd $TESTTMP |
|
579 | $ cd $TESTTMP | |
558 |
|
580 | |||
559 | $ cat dummylog |
|
581 | $ cat dummylog | |
560 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
582 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
561 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
583 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
562 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio |
|
584 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio | |
563 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
585 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
564 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) |
|
586 | Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !) | |
565 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
587 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
566 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) |
|
588 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !) | |
567 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio |
|
589 | Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio | |
568 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
590 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
569 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
591 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
570 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
592 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
571 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
593 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
572 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
594 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
573 | HG_HOOKNAME=changegroup |
|
595 | HG_HOOKNAME=changegroup | |
574 | HG_HOOKTYPE=changegroup |
|
596 | HG_HOOKTYPE=changegroup | |
575 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
597 | HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
576 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 |
|
598 | HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 | |
577 | HG_SOURCE=serve |
|
599 | HG_SOURCE=serve | |
578 | HG_TXNID=TXN:$ID$ |
|
600 | HG_TXNID=TXN:$ID$ | |
579 | HG_TXNNAME=serve |
|
601 | HG_TXNNAME=serve | |
580 | HG_URL=remote:ssh:$LOCALIP |
|
602 | HG_URL=remote:ssh:$LOCALIP | |
581 |
|
603 | |||
582 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
604 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
583 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
605 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
584 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
606 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
585 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
607 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
586 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
608 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
587 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
609 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
588 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
610 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
589 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
611 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
590 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
612 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
591 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
613 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
592 | HG_HOOKNAME=changegroup |
|
614 | HG_HOOKNAME=changegroup | |
593 | HG_HOOKTYPE=changegroup |
|
615 | HG_HOOKTYPE=changegroup | |
594 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
616 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 | |
595 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 |
|
617 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 | |
596 | HG_SOURCE=serve |
|
618 | HG_SOURCE=serve | |
597 | HG_TXNID=TXN:$ID$ |
|
619 | HG_TXNID=TXN:$ID$ | |
598 | HG_TXNNAME=serve |
|
620 | HG_TXNNAME=serve | |
599 | HG_URL=remote:ssh:$LOCALIP |
|
621 | HG_URL=remote:ssh:$LOCALIP | |
600 |
|
622 | |||
601 | Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !) |
|
623 | Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !) | |
602 | changegroup-in-remote hook: HG_BUNDLE2=1 (chg !) |
|
624 | changegroup-in-remote hook: HG_BUNDLE2=1 (chg !) | |
603 | HG_HOOKNAME=changegroup (chg !) |
|
625 | HG_HOOKNAME=changegroup (chg !) | |
604 | HG_HOOKTYPE=changegroup (chg !) |
|
626 | HG_HOOKTYPE=changegroup (chg !) | |
605 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) |
|
627 | HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) | |
606 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) |
|
628 | HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !) | |
607 | HG_SOURCE=serve (chg !) |
|
629 | HG_SOURCE=serve (chg !) | |
608 | HG_TXNID=TXN:$ID$ (chg !) |
|
630 | HG_TXNID=TXN:$ID$ (chg !) | |
609 | HG_TXNNAME=serve (chg !) |
|
631 | HG_TXNNAME=serve (chg !) | |
610 | HG_URL=remote:ssh:$LOCALIP (chg !) |
|
632 | HG_URL=remote:ssh:$LOCALIP (chg !) | |
611 | (chg !) |
|
633 | (chg !) | |
612 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
634 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
613 | Got arguments 1:user@dummy 2:hg init 'a repo' |
|
635 | Got arguments 1:user@dummy 2:hg init 'a repo' | |
614 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
636 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
615 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
637 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
616 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
638 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
617 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio |
|
639 | Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio | |
618 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
640 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
619 | changegroup-in-remote hook: HG_BUNDLE2=1 |
|
641 | changegroup-in-remote hook: HG_BUNDLE2=1 | |
620 | HG_HOOKNAME=changegroup |
|
642 | HG_HOOKNAME=changegroup | |
621 | HG_HOOKTYPE=changegroup |
|
643 | HG_HOOKTYPE=changegroup | |
622 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
644 | HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
623 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 |
|
645 | HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 | |
624 | HG_SOURCE=serve |
|
646 | HG_SOURCE=serve | |
625 | HG_TXNID=TXN:$ID$ |
|
647 | HG_TXNID=TXN:$ID$ | |
626 | HG_TXNNAME=serve |
|
648 | HG_TXNNAME=serve | |
627 | HG_URL=remote:ssh:$LOCALIP |
|
649 | HG_URL=remote:ssh:$LOCALIP | |
628 |
|
650 | |||
629 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
651 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
630 |
|
652 | |||
631 |
|
653 | |||
632 | remote hook failure is attributed to remote |
|
654 | remote hook failure is attributed to remote | |
633 |
|
655 | |||
634 | $ cat > $TESTTMP/failhook << EOF |
|
656 | $ cat > $TESTTMP/failhook << EOF | |
635 | > def hook(ui, repo, **kwargs): |
|
657 | > def hook(ui, repo, **kwargs): | |
636 | > ui.write(b'hook failure!\n') |
|
658 | > ui.write(b'hook failure!\n') | |
637 | > ui.flush() |
|
659 | > ui.flush() | |
638 | > return 1 |
|
660 | > return 1 | |
639 | > EOF |
|
661 | > EOF | |
640 |
|
662 | |||
641 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc |
|
663 | $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc | |
642 |
|
664 | |||
643 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout |
|
665 | $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout | |
644 | $ cd hookout |
|
666 | $ cd hookout | |
645 | $ touch hookfailure |
|
667 | $ touch hookfailure | |
646 | $ hg -q commit -A -m 'remote hook failure' |
|
668 | $ hg -q commit -A -m 'remote hook failure' | |
647 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push |
|
669 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push | |
648 | pushing to ssh://user@dummy/remote |
|
670 | pushing to ssh://user@dummy/remote | |
649 | searching for changes |
|
671 | searching for changes | |
650 | remote: adding changesets |
|
672 | remote: adding changesets | |
651 | remote: adding manifests |
|
673 | remote: adding manifests | |
652 | remote: adding file changes |
|
674 | remote: adding file changes | |
653 | remote: hook failure! |
|
675 | remote: hook failure! | |
654 | remote: transaction abort! |
|
676 | remote: transaction abort! | |
655 | remote: rollback completed |
|
677 | remote: rollback completed | |
656 | remote: pretxnchangegroup.fail hook failed |
|
678 | remote: pretxnchangegroup.fail hook failed | |
657 | abort: push failed on remote |
|
679 | abort: push failed on remote | |
658 | [255] |
|
680 | [255] | |
659 |
|
681 | |||
660 | abort during pull is properly reported as such |
|
682 | abort during pull is properly reported as such | |
661 |
|
683 | |||
662 | $ echo morefoo >> ../remote/foo |
|
684 | $ echo morefoo >> ../remote/foo | |
663 | $ hg -R ../remote commit --message "more foo to be pulled" |
|
685 | $ hg -R ../remote commit --message "more foo to be pulled" | |
664 | $ cat >> ../remote/.hg/hgrc << EOF |
|
686 | $ cat >> ../remote/.hg/hgrc << EOF | |
665 | > [extensions] |
|
687 | > [extensions] | |
666 | > crash = ${TESTDIR}/crashgetbundler.py |
|
688 | > crash = ${TESTDIR}/crashgetbundler.py | |
667 | > EOF |
|
689 | > EOF | |
668 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull |
|
690 | $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull | |
669 | pulling from ssh://user@dummy/remote |
|
691 | pulling from ssh://user@dummy/remote | |
670 | searching for changes |
|
692 | searching for changes | |
671 | remote: abort: this is an exercise |
|
693 | remote: abort: this is an exercise | |
672 | abort: pull failed on remote |
|
694 | abort: pull failed on remote | |
673 | [255] |
|
695 | [255] | |
674 |
|
696 | |||
675 | abort with no error hint when there is a ssh problem when pulling |
|
697 | abort with no error hint when there is a ssh problem when pulling | |
676 |
|
698 | |||
677 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" |
|
699 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" | |
678 | pulling from ssh://brokenrepository/ |
|
700 | pulling from ssh://brokenrepository/ | |
679 | abort: no suitable response from remote hg |
|
701 | abort: no suitable response from remote hg | |
680 | [255] |
|
702 | [255] | |
681 |
|
703 | |||
682 | abort with configured error hint when there is a ssh problem when pulling |
|
704 | abort with configured error hint when there is a ssh problem when pulling | |
683 |
|
705 | |||
684 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ |
|
706 | $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ | |
685 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" |
|
707 | > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html" | |
686 | pulling from ssh://brokenrepository/ |
|
708 | pulling from ssh://brokenrepository/ | |
687 | abort: no suitable response from remote hg |
|
709 | abort: no suitable response from remote hg | |
688 | (Please see http://company/internalwiki/ssh.html) |
|
710 | (Please see http://company/internalwiki/ssh.html) | |
689 | [255] |
|
711 | [255] | |
690 |
|
712 | |||
691 | test that custom environment is passed down to ssh executable |
|
713 | test that custom environment is passed down to ssh executable | |
692 | $ cat >>dumpenv <<EOF |
|
714 | $ cat >>dumpenv <<EOF | |
693 | > #! /bin/sh |
|
715 | > #! /bin/sh | |
694 | > echo \$VAR >&2 |
|
716 | > echo \$VAR >&2 | |
695 | > EOF |
|
717 | > EOF | |
696 | $ chmod +x dumpenv |
|
718 | $ chmod +x dumpenv | |
697 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" |
|
719 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" | |
698 | pulling from ssh://something/ |
|
720 | pulling from ssh://something/ | |
699 | remote: |
|
721 | remote: | |
700 | abort: no suitable response from remote hg |
|
722 | abort: no suitable response from remote hg | |
701 | [255] |
|
723 | [255] | |
702 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 |
|
724 | $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17 | |
703 | pulling from ssh://something/ |
|
725 | pulling from ssh://something/ | |
704 | remote: 17 |
|
726 | remote: 17 | |
705 | abort: no suitable response from remote hg |
|
727 | abort: no suitable response from remote hg | |
706 | [255] |
|
728 | [255] | |
707 |
|
729 |
General Comments 0
You need to be logged in to leave comments.
Login now