##// END OF EJS Templates
pyoxidizer: skip for ZeroConf related test for now...
marmoute -
r48660:cce9e7d2 stable
parent child Browse files
Show More
@@ -1,307 +1,318 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*) (glob)
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-* Olivia Mackall and others (glob)
87 Copyright (C) 2005-* Olivia 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 --source paths
256 $ hg showconfig --source paths
257 plain: True
257 plain: True
258 $TESTTMP/hgrc:17: paths.foo=bar
258 $TESTTMP/hgrc:17: paths.foo=bar
259
259
260 Test we can skip the user configuration
260 Test we can skip the user configuration
261
261
262 $ cat >> .hg/hgrc <<EOF
262 $ cat >> .hg/hgrc <<EOF
263 > [paths]
263 > [paths]
264 > elephant = babar
264 > elephant = babar
265 > EOF
265 > EOF
266 $ hg path
266 $ hg path
267 elephant = $TESTTMP/babar
267 elephant = $TESTTMP/babar
268 foo = $TESTTMP/bar
268 foo = $TESTTMP/bar
269 $ HGRCSKIPREPO=1 hg path
269 $ HGRCSKIPREPO=1 hg path
270 foo = $TESTTMP/bar
270 foo = $TESTTMP/bar
271
271
272 $ cat >> .hg/hgrc <<EOF
272 $ cat >> .hg/hgrc <<EOF
273 > [broken
273 > [broken
274 > EOF
274 > EOF
275
275
276 $ hg path
276 $ hg path
277 config error at $TESTTMP/.hg/hgrc:3: [broken
277 config error at $TESTTMP/.hg/hgrc:3: [broken
278 [255]
278 [255]
279 $ HGRCSKIPREPO=1 hg path
279 $ HGRCSKIPREPO=1 hg path
280 foo = $TESTTMP/bar
280 foo = $TESTTMP/bar
281
281
282 Check that hgweb respect HGRCSKIPREPO=1
282 Check that hgweb respect HGRCSKIPREPO=1
283
283
284 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
284 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
285 config error at $TESTTMP/.hg/hgrc:3: [broken
285 config error at $TESTTMP/.hg/hgrc:3: [broken
286 [255]
286 [255]
287 $ test -f hg.pid && (cat hg.pid >> $DAEMON_PIDS)
287 $ test -f hg.pid && (cat hg.pid >> $DAEMON_PIDS)
288 [1]
288 [1]
289 $ killdaemons.py
289 $ killdaemons.py
290 $ test -f access.log && cat access.log
290 $ test -f access.log && cat access.log
291 [1]
291 [1]
292 $ test -f errors.log && cat errors.log
292 $ test -f errors.log && cat errors.log
293 [1]
293 [1]
294
294
295 $ HGRCSKIPREPO=1 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
295 $ HGRCSKIPREPO=1 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
296 $ cat hg.pid >> $DAEMON_PIDS
296 $ cat hg.pid >> $DAEMON_PIDS
297 $ killdaemons.py
297 $ killdaemons.py
298 $ cat access.log
298 $ cat access.log
299 $ cat errors.log
299 $ cat errors.log
300
300
301 Check that zeroconf respect HGRCSKIPREPO=1
301 Check that zeroconf respect HGRCSKIPREPO=1
302
302
303 $ hg paths --config extensions.zeroconf=
303 $ hg paths --config extensions.zeroconf=
304 config error at $TESTTMP/.hg/hgrc:3: [broken
304 config error at $TESTTMP/.hg/hgrc:3: [broken
305 [255]
305 [255]
306
307 XXX-PYOXIDIZER Pyoxidizer build have trouble with zeroconf for unclear reason,
308 we accept the bad output for now as this is the last thing in the way of
309 testing the pyoxidizer build.
310
311 #if no-pyoxidizer
306 $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf=
312 $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf=
307 foo = $TESTTMP/bar
313 foo = $TESTTMP/bar
314 #else
315 $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf=
316 abort: An invalid argument was supplied (known-bad-output !)
317 [255]
318 #endif
@@ -1,521 +1,532 b''
1 $ hg init a
1 $ hg init a
2 $ hg clone a b
2 $ hg clone a b
3 updating to branch default
3 updating to branch default
4 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
5 $ cd a
5 $ cd a
6
6
7 with no paths:
7 with no paths:
8
8
9 $ hg paths
9 $ hg paths
10 $ hg paths unknown
10 $ hg paths unknown
11 not found!
11 not found!
12 [1]
12 [1]
13 $ hg paths -Tjson
13 $ hg paths -Tjson
14 [
14 [
15 ]
15 ]
16
16
17 with paths:
17 with paths:
18
18
19 $ echo '[paths]' >> .hg/hgrc
19 $ echo '[paths]' >> .hg/hgrc
20 $ echo 'dupe = ../b#tip' >> .hg/hgrc
20 $ echo 'dupe = ../b#tip' >> .hg/hgrc
21 $ echo 'expand = $SOMETHING/bar' >> .hg/hgrc
21 $ echo 'expand = $SOMETHING/bar' >> .hg/hgrc
22 $ hg in dupe
22 $ hg in dupe
23 comparing with $TESTTMP/b
23 comparing with $TESTTMP/b
24 no changes found
24 no changes found
25 [1]
25 [1]
26 $ cd ..
26 $ cd ..
27 $ hg -R a in dupe
27 $ hg -R a in dupe
28 comparing with $TESTTMP/b
28 comparing with $TESTTMP/b
29 no changes found
29 no changes found
30 [1]
30 [1]
31 $ cd a
31 $ cd a
32 $ hg paths
32 $ hg paths
33 dupe = $TESTTMP/b#tip
33 dupe = $TESTTMP/b#tip
34 expand = $TESTTMP/a/$SOMETHING/bar
34 expand = $TESTTMP/a/$SOMETHING/bar
35 $ SOMETHING=foo hg paths
35 $ SOMETHING=foo hg paths
36 dupe = $TESTTMP/b#tip
36 dupe = $TESTTMP/b#tip
37 expand = $TESTTMP/a/foo/bar
37 expand = $TESTTMP/a/foo/bar
38 #if msys
38 #if msys
39 $ SOMETHING=//foo hg paths
39 $ SOMETHING=//foo hg paths
40 dupe = $TESTTMP/b#tip
40 dupe = $TESTTMP/b#tip
41 expand = /foo/bar
41 expand = /foo/bar
42 #else
42 #else
43 $ SOMETHING=/foo hg paths
43 $ SOMETHING=/foo hg paths
44 dupe = $TESTTMP/b#tip
44 dupe = $TESTTMP/b#tip
45 expand = /foo/bar
45 expand = /foo/bar
46 #endif
46 #endif
47 $ hg paths -q
47 $ hg paths -q
48 dupe
48 dupe
49 expand
49 expand
50 $ hg paths dupe
50 $ hg paths dupe
51 $TESTTMP/b#tip
51 $TESTTMP/b#tip
52 $ hg paths -q dupe
52 $ hg paths -q dupe
53 $ hg paths unknown
53 $ hg paths unknown
54 not found!
54 not found!
55 [1]
55 [1]
56 $ hg paths -q unknown
56 $ hg paths -q unknown
57 [1]
57 [1]
58
58
59 formatter output with paths:
59 formatter output with paths:
60
60
61 $ echo 'dupe:pushurl = https://example.com/dupe' >> .hg/hgrc
61 $ echo 'dupe:pushurl = https://example.com/dupe' >> .hg/hgrc
62 $ hg paths -Tjson | sed 's|\\\\|\\|g'
62 $ hg paths -Tjson | sed 's|\\\\|\\|g'
63 [
63 [
64 {
64 {
65 "name": "dupe",
65 "name": "dupe",
66 "pushurl": "https://example.com/dupe",
66 "pushurl": "https://example.com/dupe",
67 "url": "$TESTTMP/b#tip"
67 "url": "$TESTTMP/b#tip"
68 },
68 },
69 {
69 {
70 "name": "expand",
70 "name": "expand",
71 "url": "$TESTTMP/a/$SOMETHING/bar"
71 "url": "$TESTTMP/a/$SOMETHING/bar"
72 }
72 }
73 ]
73 ]
74 $ hg paths -Tjson dupe | sed 's|\\\\|\\|g'
74 $ hg paths -Tjson dupe | sed 's|\\\\|\\|g'
75 [
75 [
76 {
76 {
77 "name": "dupe",
77 "name": "dupe",
78 "pushurl": "https://example.com/dupe",
78 "pushurl": "https://example.com/dupe",
79 "url": "$TESTTMP/b#tip"
79 "url": "$TESTTMP/b#tip"
80 }
80 }
81 ]
81 ]
82 $ hg paths -Tjson -q unknown
82 $ hg paths -Tjson -q unknown
83 [
83 [
84 ]
84 ]
85 [1]
85 [1]
86
86
87 log template:
87 log template:
88
88
89 (behaves as a {name: path-string} dict by default)
89 (behaves as a {name: path-string} dict by default)
90
90
91 $ hg log -rnull -T '{peerurls}\n'
91 $ hg log -rnull -T '{peerurls}\n'
92 dupe=$TESTTMP/b#tip expand=$TESTTMP/a/$SOMETHING/bar
92 dupe=$TESTTMP/b#tip expand=$TESTTMP/a/$SOMETHING/bar
93 $ hg log -rnull -T '{join(peerurls, "\n")}\n'
93 $ hg log -rnull -T '{join(peerurls, "\n")}\n'
94 dupe=$TESTTMP/b#tip
94 dupe=$TESTTMP/b#tip
95 expand=$TESTTMP/a/$SOMETHING/bar
95 expand=$TESTTMP/a/$SOMETHING/bar
96 $ hg log -rnull -T '{peerurls % "{name}: {url}\n"}'
96 $ hg log -rnull -T '{peerurls % "{name}: {url}\n"}'
97 dupe: $TESTTMP/b#tip
97 dupe: $TESTTMP/b#tip
98 expand: $TESTTMP/a/$SOMETHING/bar
98 expand: $TESTTMP/a/$SOMETHING/bar
99 $ hg log -rnull -T '{get(peerurls, "dupe")}\n'
99 $ hg log -rnull -T '{get(peerurls, "dupe")}\n'
100 $TESTTMP/b#tip
100 $TESTTMP/b#tip
101 #if windows
101 #if windows
102 $ hg log -rnull -T '{peerurls % "{urls|json}\n"}'
102 $ hg log -rnull -T '{peerurls % "{urls|json}\n"}'
103 [{"pushurl": "https://example.com/dupe", "url": "$STR_REPR_TESTTMP\\b#tip"}]
103 [{"pushurl": "https://example.com/dupe", "url": "$STR_REPR_TESTTMP\\b#tip"}]
104 [{"url": "$STR_REPR_TESTTMP\\a\\$SOMETHING\\bar"}]
104 [{"url": "$STR_REPR_TESTTMP\\a\\$SOMETHING\\bar"}]
105 #else
105 #else
106 $ hg log -rnull -T '{peerurls % "{urls|json}\n"}'
106 $ hg log -rnull -T '{peerurls % "{urls|json}\n"}'
107 [{"pushurl": "https://example.com/dupe", "url": "$TESTTMP/b#tip"}]
107 [{"pushurl": "https://example.com/dupe", "url": "$TESTTMP/b#tip"}]
108 [{"url": "$TESTTMP/a/$SOMETHING/bar"}]
108 [{"url": "$TESTTMP/a/$SOMETHING/bar"}]
109 #endif
109 #endif
110
110
111 (sub options can be populated by map/dot operation)
111 (sub options can be populated by map/dot operation)
112
112
113 $ hg log -rnull \
113 $ hg log -rnull \
114 > -T '{get(peerurls, "dupe") % "url: {url}\npushurl: {pushurl}\n"}'
114 > -T '{get(peerurls, "dupe") % "url: {url}\npushurl: {pushurl}\n"}'
115 url: $TESTTMP/b#tip
115 url: $TESTTMP/b#tip
116 pushurl: https://example.com/dupe
116 pushurl: https://example.com/dupe
117 $ hg log -rnull -T '{peerurls.dupe.pushurl}\n'
117 $ hg log -rnull -T '{peerurls.dupe.pushurl}\n'
118 https://example.com/dupe
118 https://example.com/dupe
119
119
120 (in JSON, it's a dict of urls)
120 (in JSON, it's a dict of urls)
121
121
122 $ hg log -rnull -T '{peerurls|json}\n' | sed 's|\\\\|/|g'
122 $ hg log -rnull -T '{peerurls|json}\n' | sed 's|\\\\|/|g'
123 {"dupe": "$TESTTMP/b#tip", "expand": "$TESTTMP/a/$SOMETHING/bar"}
123 {"dupe": "$TESTTMP/b#tip", "expand": "$TESTTMP/a/$SOMETHING/bar"}
124
124
125 password should be masked in plain output, but not in machine-readable/template
125 password should be masked in plain output, but not in machine-readable/template
126 output:
126 output:
127
127
128 $ echo 'insecure = http://foo:insecure@example.com/' >> .hg/hgrc
128 $ echo 'insecure = http://foo:insecure@example.com/' >> .hg/hgrc
129 $ hg paths insecure
129 $ hg paths insecure
130 http://foo:***@example.com/
130 http://foo:***@example.com/
131 $ hg paths -Tjson insecure
131 $ hg paths -Tjson insecure
132 [
132 [
133 {
133 {
134 "name": "insecure",
134 "name": "insecure",
135 "url": "http://foo:insecure@example.com/"
135 "url": "http://foo:insecure@example.com/"
136 }
136 }
137 ]
137 ]
138 $ hg log -rnull -T '{get(peerurls, "insecure")}\n'
138 $ hg log -rnull -T '{get(peerurls, "insecure")}\n'
139 http://foo:insecure@example.com/
139 http://foo:insecure@example.com/
140
140
141 zeroconf wraps ui.configitems(), which shouldn't crash at least:
141 zeroconf wraps ui.configitems(), which shouldn't crash at least:
142
142
143 XXX-PYOXIDIZER Pyoxidizer build have trouble with zeroconf for unclear reason,
144 we accept the bad output for now as this is the last thing in the way of
145 testing the pyoxidizer build.
146
147 #if no-pyoxidizer
143 $ hg paths --config extensions.zeroconf=
148 $ hg paths --config extensions.zeroconf=
144 dupe = $TESTTMP/b#tip
149 dupe = $TESTTMP/b#tip
145 dupe:pushurl = https://example.com/dupe
150 dupe:pushurl = https://example.com/dupe
146 expand = $TESTTMP/a/$SOMETHING/bar
151 expand = $TESTTMP/a/$SOMETHING/bar
147 insecure = http://foo:***@example.com/
152 insecure = http://foo:***@example.com/
153 #else
154 $ hg paths --config extensions.zeroconf=
155 abort: An invalid argument was supplied (known-bad-output !)
156 [255]
157 #endif
158
148
159
149 $ cd ..
160 $ cd ..
150
161
151 sub-options for an undeclared path are ignored
162 sub-options for an undeclared path are ignored
152
163
153 $ hg init suboptions
164 $ hg init suboptions
154 $ cd suboptions
165 $ cd suboptions
155
166
156 $ cat > .hg/hgrc << EOF
167 $ cat > .hg/hgrc << EOF
157 > [paths]
168 > [paths]
158 > path0 = https://example.com/path0
169 > path0 = https://example.com/path0
159 > path1:pushurl = https://example.com/path1
170 > path1:pushurl = https://example.com/path1
160 > EOF
171 > EOF
161 $ hg paths
172 $ hg paths
162 path0 = https://example.com/path0
173 path0 = https://example.com/path0
163
174
164 unknown sub-options aren't displayed
175 unknown sub-options aren't displayed
165
176
166 $ cat > .hg/hgrc << EOF
177 $ cat > .hg/hgrc << EOF
167 > [paths]
178 > [paths]
168 > path0 = https://example.com/path0
179 > path0 = https://example.com/path0
169 > path0:foo = https://example.com/path1
180 > path0:foo = https://example.com/path1
170 > EOF
181 > EOF
171
182
172 $ hg paths
183 $ hg paths
173 path0 = https://example.com/path0
184 path0 = https://example.com/path0
174
185
175 :pushurl must be a URL
186 :pushurl must be a URL
176
187
177 $ cat > .hg/hgrc << EOF
188 $ cat > .hg/hgrc << EOF
178 > [paths]
189 > [paths]
179 > default = /path/to/nothing
190 > default = /path/to/nothing
180 > default:pushurl = /not/a/url
191 > default:pushurl = /not/a/url
181 > EOF
192 > EOF
182
193
183 $ hg paths
194 $ hg paths
184 (paths.default:pushurl not a URL; ignoring: "/not/a/url")
195 (paths.default:pushurl not a URL; ignoring: "/not/a/url")
185 default = /path/to/nothing
196 default = /path/to/nothing
186
197
187 #fragment is not allowed in :pushurl
198 #fragment is not allowed in :pushurl
188
199
189 $ cat > .hg/hgrc << EOF
200 $ cat > .hg/hgrc << EOF
190 > [paths]
201 > [paths]
191 > default = https://example.com/repo
202 > default = https://example.com/repo
192 > invalid = https://example.com/repo
203 > invalid = https://example.com/repo
193 > invalid:pushurl = https://example.com/repo#branch
204 > invalid:pushurl = https://example.com/repo#branch
194 > EOF
205 > EOF
195
206
196 $ hg paths
207 $ hg paths
197 ("#fragment" in paths.invalid:pushurl not supported; ignoring)
208 ("#fragment" in paths.invalid:pushurl not supported; ignoring)
198 default = https://example.com/repo
209 default = https://example.com/repo
199 invalid = https://example.com/repo
210 invalid = https://example.com/repo
200 invalid:pushurl = https://example.com/repo
211 invalid:pushurl = https://example.com/repo
201
212
202 $ cd ..
213 $ cd ..
203
214
204 'file:' disables [paths] entries for clone destination
215 'file:' disables [paths] entries for clone destination
205
216
206 $ cat >> $HGRCPATH <<EOF
217 $ cat >> $HGRCPATH <<EOF
207 > [paths]
218 > [paths]
208 > gpath1 = http://hg.example.com
219 > gpath1 = http://hg.example.com
209 > EOF
220 > EOF
210
221
211 $ hg clone a gpath1
222 $ hg clone a gpath1
212 abort: cannot create new http repository
223 abort: cannot create new http repository
213 [255]
224 [255]
214
225
215 $ hg clone a file:gpath1
226 $ hg clone a file:gpath1
216 updating to branch default
227 updating to branch default
217 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
218 $ cd gpath1
229 $ cd gpath1
219 $ hg -q id
230 $ hg -q id
220 000000000000
231 000000000000
221
232
222 $ cd ..
233 $ cd ..
223
234
224 Testing path referencing other paths
235 Testing path referencing other paths
225 ====================================
236 ====================================
226
237
227 basic setup
238 basic setup
228 -----------
239 -----------
229
240
230 $ ls -1
241 $ ls -1
231 a
242 a
232 b
243 b
233 gpath1
244 gpath1
234 suboptions
245 suboptions
235 $ hg init chained_path
246 $ hg init chained_path
236 $ cd chained_path
247 $ cd chained_path
237 $ cat << EOF > .hg/hgrc
248 $ cat << EOF > .hg/hgrc
238 > [paths]
249 > [paths]
239 > default=../a
250 > default=../a
240 > other_default=path://default
251 > other_default=path://default
241 > path_with_branch=../branchy#foo
252 > path_with_branch=../branchy#foo
242 > other_branch=path://path_with_branch
253 > other_branch=path://path_with_branch
243 > other_branched=path://path_with_branch#default
254 > other_branched=path://path_with_branch#default
244 > pushdest=../push-dest
255 > pushdest=../push-dest
245 > pushdest:pushrev=default
256 > pushdest:pushrev=default
246 > pushdest2=path://pushdest
257 > pushdest2=path://pushdest
247 > pushdest-overwrite=path://pushdest
258 > pushdest-overwrite=path://pushdest
248 > pushdest-overwrite:pushrev=foo
259 > pushdest-overwrite:pushrev=foo
249 > EOF
260 > EOF
250
261
251 $ hg init ../branchy
262 $ hg init ../branchy
252 $ hg init ../push-dest
263 $ hg init ../push-dest
253 $ hg debugbuilddag -R ../branchy '.:base+3<base@foo+5'
264 $ hg debugbuilddag -R ../branchy '.:base+3<base@foo+5'
254 $ hg log -G -T '{branch}\n' -R ../branchy
265 $ hg log -G -T '{branch}\n' -R ../branchy
255 o foo
266 o foo
256 |
267 |
257 o foo
268 o foo
258 |
269 |
259 o foo
270 o foo
260 |
271 |
261 o foo
272 o foo
262 |
273 |
263 o foo
274 o foo
264 |
275 |
265 | o default
276 | o default
266 | |
277 | |
267 | o default
278 | o default
268 | |
279 | |
269 | o default
280 | o default
270 |/
281 |/
271 o default
282 o default
272
283
273
284
274 $ hg paths
285 $ hg paths
275 default = $TESTTMP/a
286 default = $TESTTMP/a
276 gpath1 = http://hg.example.com/
287 gpath1 = http://hg.example.com/
277 other_branch = $TESTTMP/branchy#foo
288 other_branch = $TESTTMP/branchy#foo
278 other_branched = $TESTTMP/branchy#default
289 other_branched = $TESTTMP/branchy#default
279 other_default = $TESTTMP/a
290 other_default = $TESTTMP/a
280 path_with_branch = $TESTTMP/branchy#foo
291 path_with_branch = $TESTTMP/branchy#foo
281 pushdest = $TESTTMP/push-dest
292 pushdest = $TESTTMP/push-dest
282 pushdest:pushrev = default
293 pushdest:pushrev = default
283 pushdest-overwrite = $TESTTMP/push-dest
294 pushdest-overwrite = $TESTTMP/push-dest
284 pushdest-overwrite:pushrev = foo
295 pushdest-overwrite:pushrev = foo
285 pushdest2 = $TESTTMP/push-dest
296 pushdest2 = $TESTTMP/push-dest
286 pushdest2:pushrev = default
297 pushdest2:pushrev = default
287
298
288 test basic chaining
299 test basic chaining
289 -------------------
300 -------------------
290
301
291 $ hg path other_default
302 $ hg path other_default
292 $TESTTMP/a
303 $TESTTMP/a
293 $ hg pull default
304 $ hg pull default
294 pulling from $TESTTMP/a
305 pulling from $TESTTMP/a
295 no changes found
306 no changes found
296 $ hg pull other_default
307 $ hg pull other_default
297 pulling from $TESTTMP/a
308 pulling from $TESTTMP/a
298 no changes found
309 no changes found
299
310
300 test inheritance of the #fragment part
311 test inheritance of the #fragment part
301 --------------------------------------
312 --------------------------------------
302
313
303 $ hg pull path_with_branch
314 $ hg pull path_with_branch
304 pulling from $TESTTMP/branchy
315 pulling from $TESTTMP/branchy
305 adding changesets
316 adding changesets
306 adding manifests
317 adding manifests
307 adding file changes
318 adding file changes
308 added 6 changesets with 0 changes to 0 files
319 added 6 changesets with 0 changes to 0 files
309 new changesets 1ea73414a91b:bcebb50b77de
320 new changesets 1ea73414a91b:bcebb50b77de
310 (run 'hg update' to get a working copy)
321 (run 'hg update' to get a working copy)
311 $ hg pull other_branch
322 $ hg pull other_branch
312 pulling from $TESTTMP/branchy
323 pulling from $TESTTMP/branchy
313 no changes found
324 no changes found
314 $ hg pull other_branched
325 $ hg pull other_branched
315 pulling from $TESTTMP/branchy
326 pulling from $TESTTMP/branchy
316 searching for changes
327 searching for changes
317 adding changesets
328 adding changesets
318 adding manifests
329 adding manifests
319 adding file changes
330 adding file changes
320 added 3 changesets with 0 changes to 0 files (+1 heads)
331 added 3 changesets with 0 changes to 0 files (+1 heads)
321 new changesets 66f7d451a68b:2dc09a01254d
332 new changesets 66f7d451a68b:2dc09a01254d
322 (run 'hg heads' to see heads)
333 (run 'hg heads' to see heads)
323
334
324 test inheritance of the suboptions
335 test inheritance of the suboptions
325 ----------------------------------
336 ----------------------------------
326
337
327 $ hg push pushdest
338 $ hg push pushdest
328 pushing to $TESTTMP/push-dest
339 pushing to $TESTTMP/push-dest
329 searching for changes
340 searching for changes
330 adding changesets
341 adding changesets
331 adding manifests
342 adding manifests
332 adding file changes
343 adding file changes
333 added 4 changesets with 0 changes to 0 files
344 added 4 changesets with 0 changes to 0 files
334 $ hg push pushdest2
345 $ hg push pushdest2
335 pushing to $TESTTMP/push-dest
346 pushing to $TESTTMP/push-dest
336 searching for changes
347 searching for changes
337 no changes found
348 no changes found
338 [1]
349 [1]
339 $ hg push pushdest-overwrite --new-branch
350 $ hg push pushdest-overwrite --new-branch
340 pushing to $TESTTMP/push-dest
351 pushing to $TESTTMP/push-dest
341 searching for changes
352 searching for changes
342 adding changesets
353 adding changesets
343 adding manifests
354 adding manifests
344 adding file changes
355 adding file changes
345 added 5 changesets with 0 changes to 0 files (+1 heads)
356 added 5 changesets with 0 changes to 0 files (+1 heads)
346
357
347 Test chaining path:// definition
358 Test chaining path:// definition
348 --------------------------------
359 --------------------------------
349
360
350 This is currently unsupported, but feel free to implement the necessary
361 This is currently unsupported, but feel free to implement the necessary
351 dependency detection.
362 dependency detection.
352
363
353 $ cat << EOF >> .hg/hgrc
364 $ cat << EOF >> .hg/hgrc
354 > chain_path=path://other_default
365 > chain_path=path://other_default
355 > EOF
366 > EOF
356
367
357 $ hg id
368 $ hg id
358 000000000000
369 000000000000
359 $ hg path
370 $ hg path
360 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
371 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
361 [255]
372 [255]
362 $ hg pull chain_path
373 $ hg pull chain_path
363 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
374 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
364 [255]
375 [255]
365
376
366 Doing an actual circle should always be an issue
377 Doing an actual circle should always be an issue
367
378
368 $ cat << EOF >> .hg/hgrc
379 $ cat << EOF >> .hg/hgrc
369 > rock=path://cissors
380 > rock=path://cissors
370 > cissors=path://paper
381 > cissors=path://paper
371 > paper=://rock
382 > paper=://rock
372 > EOF
383 > EOF
373
384
374 $ hg id
385 $ hg id
375 000000000000
386 000000000000
376 $ hg path
387 $ hg path
377 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
388 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
378 [255]
389 [255]
379 $ hg pull chain_path
390 $ hg pull chain_path
380 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
391 abort: cannot use `path://other_default`, "other_default" is also defined as a `path://`
381 [255]
392 [255]
382
393
383 Test basic error cases
394 Test basic error cases
384 ----------------------
395 ----------------------
385
396
386 $ cat << EOF > .hg/hgrc
397 $ cat << EOF > .hg/hgrc
387 > [paths]
398 > [paths]
388 > error-missing=path://unknown
399 > error-missing=path://unknown
389 > EOF
400 > EOF
390 $ hg path
401 $ hg path
391 abort: cannot use `path://unknown`, "unknown" is not a known path
402 abort: cannot use `path://unknown`, "unknown" is not a known path
392 [255]
403 [255]
393 $ hg pull error-missing
404 $ hg pull error-missing
394 abort: cannot use `path://unknown`, "unknown" is not a known path
405 abort: cannot use `path://unknown`, "unknown" is not a known path
395 [255]
406 [255]
396
407
397 Test path pointing to multiple urls
408 Test path pointing to multiple urls
398 ===================================
409 ===================================
399
410
400 Simple cases
411 Simple cases
401 ------------
412 ------------
402 - one layer
413 - one layer
403 - one list
414 - one list
404 - no special option
415 - no special option
405
416
406 $ cat << EOF > .hg/hgrc
417 $ cat << EOF > .hg/hgrc
407 > [paths]
418 > [paths]
408 > one-path=foo
419 > one-path=foo
409 > multiple-path=foo,bar,baz,https://example.org/
420 > multiple-path=foo,bar,baz,https://example.org/
410 > multiple-path:multi-urls=yes
421 > multiple-path:multi-urls=yes
411 > EOF
422 > EOF
412 $ hg path
423 $ hg path
413 gpath1 = http://hg.example.com/
424 gpath1 = http://hg.example.com/
414 multiple-path = $TESTTMP/chained_path/foo
425 multiple-path = $TESTTMP/chained_path/foo
415 multiple-path:multi-urls = yes
426 multiple-path:multi-urls = yes
416 multiple-path = $TESTTMP/chained_path/bar
427 multiple-path = $TESTTMP/chained_path/bar
417 multiple-path:multi-urls = yes
428 multiple-path:multi-urls = yes
418 multiple-path = $TESTTMP/chained_path/baz
429 multiple-path = $TESTTMP/chained_path/baz
419 multiple-path:multi-urls = yes
430 multiple-path:multi-urls = yes
420 multiple-path = https://example.org/
431 multiple-path = https://example.org/
421 multiple-path:multi-urls = yes
432 multiple-path:multi-urls = yes
422 one-path = $TESTTMP/chained_path/foo
433 one-path = $TESTTMP/chained_path/foo
423
434
424 Reference to a list
435 Reference to a list
425 -------------------
436 -------------------
426
437
427 $ cat << EOF >> .hg/hgrc
438 $ cat << EOF >> .hg/hgrc
428 > ref-to-multi=path://multiple-path
439 > ref-to-multi=path://multiple-path
429 > EOF
440 > EOF
430 $ hg path | grep ref-to-multi
441 $ hg path | grep ref-to-multi
431 ref-to-multi = $TESTTMP/chained_path/foo
442 ref-to-multi = $TESTTMP/chained_path/foo
432 ref-to-multi:multi-urls = yes
443 ref-to-multi:multi-urls = yes
433 ref-to-multi = $TESTTMP/chained_path/bar
444 ref-to-multi = $TESTTMP/chained_path/bar
434 ref-to-multi:multi-urls = yes
445 ref-to-multi:multi-urls = yes
435 ref-to-multi = $TESTTMP/chained_path/baz
446 ref-to-multi = $TESTTMP/chained_path/baz
436 ref-to-multi:multi-urls = yes
447 ref-to-multi:multi-urls = yes
437 ref-to-multi = https://example.org/
448 ref-to-multi = https://example.org/
438 ref-to-multi:multi-urls = yes
449 ref-to-multi:multi-urls = yes
439
450
440 List with a reference
451 List with a reference
441 ---------------------
452 ---------------------
442
453
443 $ cat << EOF >> .hg/hgrc
454 $ cat << EOF >> .hg/hgrc
444 > multi-with-ref=path://one-path, ssh://babar@savannah/celeste-ville
455 > multi-with-ref=path://one-path, ssh://babar@savannah/celeste-ville
445 > multi-with-ref:multi-urls=yes
456 > multi-with-ref:multi-urls=yes
446 > EOF
457 > EOF
447 $ hg path | grep multi-with-ref
458 $ hg path | grep multi-with-ref
448 multi-with-ref = $TESTTMP/chained_path/foo
459 multi-with-ref = $TESTTMP/chained_path/foo
449 multi-with-ref:multi-urls = yes
460 multi-with-ref:multi-urls = yes
450 multi-with-ref = ssh://babar@savannah/celeste-ville
461 multi-with-ref = ssh://babar@savannah/celeste-ville
451 multi-with-ref:multi-urls = yes
462 multi-with-ref:multi-urls = yes
452
463
453 List with a reference to a list
464 List with a reference to a list
454 -------------------------------
465 -------------------------------
455
466
456 $ cat << EOF >> .hg/hgrc
467 $ cat << EOF >> .hg/hgrc
457 > multi-to-multi-ref = path://multiple-path, ssh://celeste@savannah/celeste-ville
468 > multi-to-multi-ref = path://multiple-path, ssh://celeste@savannah/celeste-ville
458 > multi-to-multi-ref:multi-urls = yes
469 > multi-to-multi-ref:multi-urls = yes
459 > EOF
470 > EOF
460 $ hg path | grep multi-to-multi-ref
471 $ hg path | grep multi-to-multi-ref
461 multi-to-multi-ref = $TESTTMP/chained_path/foo
472 multi-to-multi-ref = $TESTTMP/chained_path/foo
462 multi-to-multi-ref:multi-urls = yes
473 multi-to-multi-ref:multi-urls = yes
463 multi-to-multi-ref = $TESTTMP/chained_path/bar
474 multi-to-multi-ref = $TESTTMP/chained_path/bar
464 multi-to-multi-ref:multi-urls = yes
475 multi-to-multi-ref:multi-urls = yes
465 multi-to-multi-ref = $TESTTMP/chained_path/baz
476 multi-to-multi-ref = $TESTTMP/chained_path/baz
466 multi-to-multi-ref:multi-urls = yes
477 multi-to-multi-ref:multi-urls = yes
467 multi-to-multi-ref = https://example.org/
478 multi-to-multi-ref = https://example.org/
468 multi-to-multi-ref:multi-urls = yes
479 multi-to-multi-ref:multi-urls = yes
469 multi-to-multi-ref = ssh://celeste@savannah/celeste-ville
480 multi-to-multi-ref = ssh://celeste@savannah/celeste-ville
470 multi-to-multi-ref:multi-urls = yes
481 multi-to-multi-ref:multi-urls = yes
471
482
472 individual suboptions are inherited
483 individual suboptions are inherited
473 -----------------------------------
484 -----------------------------------
474
485
475 $ cat << EOF >> .hg/hgrc
486 $ cat << EOF >> .hg/hgrc
476 > with-pushurl = foo
487 > with-pushurl = foo
477 > with-pushurl:pushurl = http://foo.bar/
488 > with-pushurl:pushurl = http://foo.bar/
478 > with-pushrev = bar
489 > with-pushrev = bar
479 > with-pushrev:pushrev = draft()
490 > with-pushrev:pushrev = draft()
480 > with-both = toto
491 > with-both = toto
481 > with-both:pushurl = http://ta.ta
492 > with-both:pushurl = http://ta.ta
482 > with-both:pushrev = secret()
493 > with-both:pushrev = secret()
483 > ref-all-no-opts = path://with-pushurl, path://with-pushrev, path://with-both
494 > ref-all-no-opts = path://with-pushurl, path://with-pushrev, path://with-both
484 > ref-all-no-opts:multi-urls = yes
495 > ref-all-no-opts:multi-urls = yes
485 > with-overwrite = path://with-pushurl, path://with-pushrev, path://with-both
496 > with-overwrite = path://with-pushurl, path://with-pushrev, path://with-both
486 > with-overwrite:multi-urls = yes
497 > with-overwrite:multi-urls = yes
487 > with-overwrite:pushrev = public()
498 > with-overwrite:pushrev = public()
488 > EOF
499 > EOF
489 $ hg path | grep with-pushurl
500 $ hg path | grep with-pushurl
490 with-pushurl = $TESTTMP/chained_path/foo
501 with-pushurl = $TESTTMP/chained_path/foo
491 with-pushurl:pushurl = http://foo.bar/
502 with-pushurl:pushurl = http://foo.bar/
492 $ hg path | grep with-pushrev
503 $ hg path | grep with-pushrev
493 with-pushrev = $TESTTMP/chained_path/bar
504 with-pushrev = $TESTTMP/chained_path/bar
494 with-pushrev:pushrev = draft()
505 with-pushrev:pushrev = draft()
495 $ hg path | grep with-both
506 $ hg path | grep with-both
496 with-both = $TESTTMP/chained_path/toto
507 with-both = $TESTTMP/chained_path/toto
497 with-both:pushrev = secret()
508 with-both:pushrev = secret()
498 with-both:pushurl = http://ta.ta/
509 with-both:pushurl = http://ta.ta/
499 $ hg path | grep ref-all-no-opts
510 $ hg path | grep ref-all-no-opts
500 ref-all-no-opts = $TESTTMP/chained_path/foo
511 ref-all-no-opts = $TESTTMP/chained_path/foo
501 ref-all-no-opts:multi-urls = yes
512 ref-all-no-opts:multi-urls = yes
502 ref-all-no-opts:pushurl = http://foo.bar/
513 ref-all-no-opts:pushurl = http://foo.bar/
503 ref-all-no-opts = $TESTTMP/chained_path/bar
514 ref-all-no-opts = $TESTTMP/chained_path/bar
504 ref-all-no-opts:multi-urls = yes
515 ref-all-no-opts:multi-urls = yes
505 ref-all-no-opts:pushrev = draft()
516 ref-all-no-opts:pushrev = draft()
506 ref-all-no-opts = $TESTTMP/chained_path/toto
517 ref-all-no-opts = $TESTTMP/chained_path/toto
507 ref-all-no-opts:multi-urls = yes
518 ref-all-no-opts:multi-urls = yes
508 ref-all-no-opts:pushrev = secret()
519 ref-all-no-opts:pushrev = secret()
509 ref-all-no-opts:pushurl = http://ta.ta/
520 ref-all-no-opts:pushurl = http://ta.ta/
510 $ hg path | grep with-overwrite
521 $ hg path | grep with-overwrite
511 with-overwrite = $TESTTMP/chained_path/foo
522 with-overwrite = $TESTTMP/chained_path/foo
512 with-overwrite:multi-urls = yes
523 with-overwrite:multi-urls = yes
513 with-overwrite:pushrev = public()
524 with-overwrite:pushrev = public()
514 with-overwrite:pushurl = http://foo.bar/
525 with-overwrite:pushurl = http://foo.bar/
515 with-overwrite = $TESTTMP/chained_path/bar
526 with-overwrite = $TESTTMP/chained_path/bar
516 with-overwrite:multi-urls = yes
527 with-overwrite:multi-urls = yes
517 with-overwrite:pushrev = public()
528 with-overwrite:pushrev = public()
518 with-overwrite = $TESTTMP/chained_path/toto
529 with-overwrite = $TESTTMP/chained_path/toto
519 with-overwrite:multi-urls = yes
530 with-overwrite:multi-urls = yes
520 with-overwrite:pushrev = public()
531 with-overwrite:pushrev = public()
521 with-overwrite:pushurl = http://ta.ta/
532 with-overwrite:pushurl = http://ta.ta/
General Comments 0
You need to be logged in to leave comments. Login now