annotate tests/test-hgrc.t @ 47892:32aa80a8d162

dirstate-item: fix the declaration of the Cext `from_v1_meth` This method is apparently not called from anywhere since the declaration was garbage. We will start calling it in the next changeset. Differential Revision: https://phab.mercurial-scm.org/D11317
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 20 Aug 2021 18:11:49 +0200
parents cce9e7d2fb92
children 9987d14ad63f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
1 Use hgrc within $TESTTMP
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
2
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
3 $ HGRCPATH=`pwd`/hgrc
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
4 $ export HGRCPATH
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
5
37435
0c1b895511b9 tests: `hg init` after resetting HGRCPATH
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36460
diff changeset
6 hide outer repo
0c1b895511b9 tests: `hg init` after resetting HGRCPATH
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36460
diff changeset
7 $ hg init
0c1b895511b9 tests: `hg init` after resetting HGRCPATH
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36460
diff changeset
8
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
9 Use an alternate var for scribbling on hgrc to keep check-code from
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
10 complaining about the important settings we may be overwriting:
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
11
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
12 $ HGRC=`pwd`/hgrc
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
13 $ export HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
14
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
15 Basic syntax error
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
16
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
17 $ echo "invalid" > $HGRC
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
18 $ hg version
45894
9dc1351d0b5f errors: raise ConfigError on failure to parse config file
Martin von Zweigbergk <martinvonz@google.com>
parents: 45777
diff changeset
19 config error at $TESTTMP/hgrc:1: invalid
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
20 [255]
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
21 $ echo "" > $HGRC
1473
7d66ce9895fa make readconfig take a filename instead of a file pointer as argument
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
22
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
23 Issue1199: Can't use '%' in hgrc (eg url encoded username)
7044
e51c0f41f271 Escape '%' when writing to hgrc (issue1199)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 4659
diff changeset
24
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
25 $ hg init "foo%bar"
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
26 $ hg clone "foo%bar" foobar
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
27 updating to branch default
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
28 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
29 $ cd foobar
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
30 $ cat .hg/hgrc
29978
3d2ea1403c62 samplehgrcs: use single quotes in use warning
timeless <timeless@mozdev.org>
parents: 28611
diff changeset
31 # example repository config (see 'hg help config' for more info)
22837
2be7d5ebd4d0 config: use the same hgrc for a cloned repo as for an uninitted repo
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22380
diff changeset
32 [paths]
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 31686
diff changeset
33 default = $TESTTMP/foo%bar
22837
2be7d5ebd4d0 config: use the same hgrc for a cloned repo as for an uninitted repo
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22380
diff changeset
34
2be7d5ebd4d0 config: use the same hgrc for a cloned repo as for an uninitted repo
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22380
diff changeset
35 # path aliases to other clones of this repo in URLs or filesystem paths
29978
3d2ea1403c62 samplehgrcs: use single quotes in use warning
timeless <timeless@mozdev.org>
parents: 28611
diff changeset
36 # (see 'hg help config.paths' for more info)
22837
2be7d5ebd4d0 config: use the same hgrc for a cloned repo as for an uninitted repo
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22380
diff changeset
37 #
31064
4431add9aef9 ui: replace obsolete default-push with default:pushurl (issue5485)
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 30907
diff changeset
38 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
4431add9aef9 ui: replace obsolete default-push with default:pushurl (issue5485)
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 30907
diff changeset
39 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
4431add9aef9 ui: replace obsolete default-push with default:pushurl (issue5485)
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 30907
diff changeset
40 # my-clone = /home/jdoe/jdoes-clone
22837
2be7d5ebd4d0 config: use the same hgrc for a cloned repo as for an uninitted repo
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22380
diff changeset
41
2be7d5ebd4d0 config: use the same hgrc for a cloned repo as for an uninitted repo
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22380
diff changeset
42 [ui]
2be7d5ebd4d0 config: use the same hgrc for a cloned repo as for an uninitted repo
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents: 22380
diff changeset
43 # name and email (local to this repository, optional), e.g.
22380
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 22276
diff changeset
44 # username = Jane Doe <jdoe@example.com>
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
45 $ hg paths
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 31686
diff changeset
46 default = $TESTTMP/foo%bar
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
47 $ hg showconfig
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 31686
diff changeset
48 bundle.mainreporoot=$TESTTMP/foobar
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 31686
diff changeset
49 paths.default=$TESTTMP/foo%bar
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
50 $ cd ..
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
51
43276
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
52 Check %include
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
53
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
54 $ echo '[section]' > $TESTTMP/included
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
55 $ echo 'option = value' >> $TESTTMP/included
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
56 $ echo '%include $TESTTMP/included' >> $HGRC
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
57 $ hg showconfig section
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
58 section.option=value
44723
28aacddf3af0 tests: skip non-readable check for root
Joerg Sonnenberger <joerg@bec.de>
parents: 44246
diff changeset
59 #if unix-permissions no-root
43276
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
60 $ chmod u-r $TESTTMP/included
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
61 $ hg showconfig section
46737
e96a0a53de20 tests: Adapt expected output for minor differences with rhg
Simon Sapin <simon.sapin@octobus.net>
parents: 45894
diff changeset
62 config error at $TESTTMP/hgrc:2: cannot include $TESTTMP/included (Permission denied*) (glob)
43276
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
63 [255]
43279
726bd0b612a2 tests: avoid chmod on windows in hgrc tests
Denis Laxalde <denis@laxalde.org>
parents: 43276
diff changeset
64 #endif
43276
d201a637c971 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 39707
diff changeset
65
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
66 issue1829: wrong indentation
9470
ba75830d17a9 dispatch: catch ConfigError while constructing ui
Martin Geisler <mg@lazybytes.net>
parents: 7044
diff changeset
67
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
68 $ echo '[foo]' > $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
69 $ echo ' x = y' >> $HGRC
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
70 $ hg version
45894
9dc1351d0b5f errors: raise ConfigError on failure to parse config file
Martin von Zweigbergk <martinvonz@google.com>
parents: 45777
diff changeset
71 config error at $TESTTMP/hgrc:2: unexpected leading whitespace: x = y
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
72 [255]
10042
7cdd2a7db2c2 config: raise ConfigError on non-existing include files
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
73
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38073
diff changeset
74 $ "$PYTHON" -c "from __future__ import print_function; print('[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n')" \
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
75 > > $HGRC
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
76 $ hg showconfig foo
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
77 foo.bar=a\nb\nc\nde\nfg
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
78 foo.baz=bif cb
10295
44c923eeb81d config: handle short continuations (issue1999)
Matt Mackall <mpm@selenic.com>
parents: 10042
diff changeset
79
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
80 $ FAKEPATH=/path/to/nowhere
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
81 $ export FAKEPATH
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
82 $ echo '%include $FAKEPATH/no-such-file' > $HGRC
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
83 $ hg version
14491
a086b91ce7fb tests: glob version number in test-hgrc
Matt Mackall <mpm@selenic.com>
parents: 14489
diff changeset
84 Mercurial Distributed SCM (version *) (glob)
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 24191
diff changeset
85 (see https://mercurial-scm.org for more information)
14489
3a27faf9a999 tests: update for handling of missing hgrc includes
Matt Mackall <mpm@selenic.com>
parents: 14372
diff changeset
86
46819
d4ba4d51f85f contributor: change mentions of mpm to olivia
Raphaël Gomès <rgomes@octobus.net>
parents: 46737
diff changeset
87 Copyright (C) 2005-* Olivia Mackall and others (glob)
14489
3a27faf9a999 tests: update for handling of missing hgrc includes
Matt Mackall <mpm@selenic.com>
parents: 14372
diff changeset
88 This is free software; see the source for copying conditions. There is NO
3a27faf9a999 tests: update for handling of missing hgrc includes
Matt Mackall <mpm@selenic.com>
parents: 14372
diff changeset
89 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
90 $ unset FAKEPATH
10455
40dfd46d098f ui: add HGPLAIN environment variable for easier scripting
Brodie Rao <me+hg@dackz.net>
parents: 10296
diff changeset
91
14992
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
92 make sure global options given on the cmdline take precedence
14748
1b8c70c9f47c dispatch: make sure unspecified global ui options don't override old values
Idan Kamara <idankk86@gmail.com>
parents: 14491
diff changeset
93
1b8c70c9f47c dispatch: make sure unspecified global ui options don't override old values
Idan Kamara <idankk86@gmail.com>
parents: 14491
diff changeset
94 $ hg showconfig --config ui.verbose=True --quiet
17015
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16911
diff changeset
95 bundle.mainreporoot=$TESTTMP
14992
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
96 ui.verbose=False
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
97 ui.debug=False
14748
1b8c70c9f47c dispatch: make sure unspecified global ui options don't override old values
Idan Kamara <idankk86@gmail.com>
parents: 14491
diff changeset
98 ui.quiet=True
1b8c70c9f47c dispatch: make sure unspecified global ui options don't override old values
Idan Kamara <idankk86@gmail.com>
parents: 14491
diff changeset
99
14992
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
100 $ touch foobar/untracked
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
101 $ cat >> foobar/.hg/hgrc <<EOF
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
102 > [ui]
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
103 > verbose=True
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
104 > EOF
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
105 $ hg -R foobar st -q
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
106
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
107 username expansion
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
108
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
109 $ olduser=$HGUSER
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
110 $ unset HGUSER
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
111
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
112 $ FAKEUSER='John Doe'
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
113 $ export FAKEUSER
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
114 $ echo '[ui]' > $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
115 $ echo 'username = $FAKEUSER' >> $HGRC
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
116
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
117 $ hg init usertest
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
118 $ cd usertest
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
119 $ touch bar
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
120 $ hg commit --addremove --quiet -m "added bar"
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
121 $ hg log --template "{author}\n"
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
122 John Doe
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
123 $ cd ..
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
124
12109
51272b65b9b7 tests: remove useless sed in test-hgrc
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12014
diff changeset
125 $ hg showconfig
17015
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16911
diff changeset
126 bundle.mainreporoot=$TESTTMP
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
127 ui.username=$FAKEUSER
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
128
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
129 $ unset FAKEUSER
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
130 $ HGUSER=$olduser
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
131 $ export HGUSER
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
132
12697
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
133 showconfig with multiple arguments
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
134
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
135 $ echo "[alias]" > $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
136 $ echo "log = log -g" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
137 $ echo "[defaults]" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
138 $ echo "identify = -n" >> $HGRC
12697
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
139 $ hg showconfig alias defaults
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
140 alias.log=log -g
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
141 defaults.identify=-n
36416
07e207e88b42 showconfig: use set to filter sections and entry names
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
142 $ hg showconfig alias alias
07e207e88b42 showconfig: use set to filter sections and entry names
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
143 alias.log=log -g
07e207e88b42 showconfig: use set to filter sections and entry names
Yuya Nishihara <yuya@tcha.org>
parents: 35393
diff changeset
144 $ hg showconfig alias.log alias.log
36417
199443c55463 showconfig: allow multiple section.name selectors (issue5797)
Yuya Nishihara <yuya@tcha.org>
parents: 36416
diff changeset
145 alias.log=log -g
12697
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
146 $ hg showconfig alias defaults.identify
36417
199443c55463 showconfig: allow multiple section.name selectors (issue5797)
Yuya Nishihara <yuya@tcha.org>
parents: 36416
diff changeset
147 alias.log=log -g
199443c55463 showconfig: allow multiple section.name selectors (issue5797)
Yuya Nishihara <yuya@tcha.org>
parents: 36416
diff changeset
148 defaults.identify=-n
12697
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
149 $ hg showconfig alias.log defaults.identify
36417
199443c55463 showconfig: allow multiple section.name selectors (issue5797)
Yuya Nishihara <yuya@tcha.org>
parents: 36416
diff changeset
150 alias.log=log -g
199443c55463 showconfig: allow multiple section.name selectors (issue5797)
Yuya Nishihara <yuya@tcha.org>
parents: 36416
diff changeset
151 defaults.identify=-n
12697
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
152
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
153 HGPLAIN
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
154
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
155 $ echo "[ui]" > $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
156 $ echo "debug=true" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
157 $ echo "fallbackencoding=ASCII" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
158 $ echo "quiet=true" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
159 $ echo "slash=true" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
160 $ echo "traceback=true" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
161 $ echo "verbose=true" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
162 $ echo "style=~/.hgstyle" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
163 $ echo "logtemplate={node}" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
164 $ echo "[defaults]" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
165 $ echo "identify=-n" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
166 $ echo "[alias]" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
167 $ echo "log=log -g" >> $HGRC
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
168
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
169 customized hgrc
10455
40dfd46d098f ui: add HGPLAIN environment variable for easier scripting
Brodie Rao <me+hg@dackz.net>
parents: 10296
diff changeset
170
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
171 $ hg showconfig
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
172 read config from: $TESTTMP/hgrc
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
173 $TESTTMP/hgrc:13: alias.log=log -g
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
174 repo: bundle.mainreporoot=$TESTTMP
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
175 $TESTTMP/hgrc:11: defaults.identify=-n
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
176 $TESTTMP/hgrc:2: ui.debug=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
177 $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
178 $TESTTMP/hgrc:4: ui.quiet=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
179 $TESTTMP/hgrc:5: ui.slash=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
180 $TESTTMP/hgrc:6: ui.traceback=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
181 $TESTTMP/hgrc:7: ui.verbose=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
182 $TESTTMP/hgrc:8: ui.style=~/.hgstyle
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
183 $TESTTMP/hgrc:9: ui.logtemplate={node}
10455
40dfd46d098f ui: add HGPLAIN environment variable for easier scripting
Brodie Rao <me+hg@dackz.net>
parents: 10296
diff changeset
184
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
185 plain hgrc
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
186
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
187 $ HGPLAIN=; export HGPLAIN
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
188 $ hg showconfig --config ui.traceback=True --debug
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
189 read config from: $TESTTMP/hgrc
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
190 repo: bundle.mainreporoot=$TESTTMP
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
191 --config: ui.traceback=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
192 --verbose: ui.verbose=False
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
193 --debug: ui.debug=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
194 --quiet: ui.quiet=False
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
195
31686
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
196 with environment variables
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
197
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
198 $ PAGER=p1 EDITOR=e1 VISUAL=e2 hg showconfig --debug
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
199 read config from: $TESTTMP/hgrc
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
200 repo: bundle.mainreporoot=$TESTTMP
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
201 $PAGER: pager.pager=p1
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
202 $VISUAL: ui.editor=e2
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
203 --verbose: ui.verbose=False
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
204 --debug: ui.debug=True
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
205 --quiet: ui.quiet=False
fbc4eb8e2433 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com>
parents: 31064
diff changeset
206
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
207 plain mode with exceptions
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
208
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
209 $ cat > plain.py <<EOF
28611
6aa17f86d9f0 test-hgrc: do not print ui.plain() flag at uisetup()
Yuya Nishihara <yuya@tcha.org>
parents: 28610
diff changeset
210 > from mercurial import commands, extensions
6aa17f86d9f0 test-hgrc: do not print ui.plain() flag at uisetup()
Yuya Nishihara <yuya@tcha.org>
parents: 28610
diff changeset
211 > def _config(orig, ui, repo, *values, **opts):
38073
1a09886ab03a py3: add b'' prefixes in tests/test-hgrc.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37435
diff changeset
212 > ui.write(b'plain: %r\n' % ui.plain())
28611
6aa17f86d9f0 test-hgrc: do not print ui.plain() flag at uisetup()
Yuya Nishihara <yuya@tcha.org>
parents: 28610
diff changeset
213 > return orig(ui, repo, *values, **opts)
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
214 > def uisetup(ui):
38073
1a09886ab03a py3: add b'' prefixes in tests/test-hgrc.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37435
diff changeset
215 > extensions.wrapcommand(commands.table, b'config', _config)
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
216 > EOF
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
217 $ echo "[extensions]" >> $HGRC
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
218 $ echo "plain=./plain.py" >> $HGRC
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
219 $ HGPLAINEXCEPT=; export HGPLAINEXCEPT
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
220 $ hg showconfig --config ui.traceback=True --debug
14372
be0daa0eeb3e ui: test plain mode against exceptions
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 13849
diff changeset
221 plain: True
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
222 read config from: $TESTTMP/hgrc
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
223 repo: bundle.mainreporoot=$TESTTMP
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
224 $TESTTMP/hgrc:15: extensions.plain=./plain.py
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
225 --config: ui.traceback=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
226 --verbose: ui.verbose=False
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
227 --debug: ui.debug=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
228 --quiet: ui.quiet=False
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
229 $ unset HGPLAIN
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
230 $ hg showconfig --config ui.traceback=True --debug
14372
be0daa0eeb3e ui: test plain mode against exceptions
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 13849
diff changeset
231 plain: True
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
232 read config from: $TESTTMP/hgrc
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
233 repo: bundle.mainreporoot=$TESTTMP
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
234 $TESTTMP/hgrc:15: extensions.plain=./plain.py
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
235 --config: ui.traceback=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
236 --verbose: ui.verbose=False
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
237 --debug: ui.debug=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
238 --quiet: ui.quiet=False
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
239 $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
240 $ hg showconfig --config ui.traceback=True --debug
14372
be0daa0eeb3e ui: test plain mode against exceptions
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 13849
diff changeset
241 plain: True
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
242 read config from: $TESTTMP/hgrc
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
243 repo: bundle.mainreporoot=$TESTTMP
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
244 $TESTTMP/hgrc:15: extensions.plain=./plain.py
20788
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
245 --config: ui.traceback=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
246 --verbose: ui.verbose=False
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
247 --debug: ui.debug=True
f144928dd058 config: give a useful hint of source for the most common command line settings
Mads Kiilerich <madski@unity3d.com>
parents: 20227
diff changeset
248 --quiet: ui.quiet=False
20789
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
249
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
250 source of paths is not mangled
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
251
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
252 $ cat >> $HGRCPATH <<EOF
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
253 > [paths]
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
254 > foo = bar
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
255 > EOF
47071
3e381eb557f3 config: add --source option to include source of value
Martin von Zweigbergk <martinvonz@google.com>
parents: 46819
diff changeset
256 $ hg showconfig --source paths
20789
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
257 plain: True
47272
a671832a8e41 urlutil: move url "fixing" at the time of `ui.paths` initialization
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47071
diff changeset
258 $TESTTMP/hgrc:17: paths.foo=bar
44124
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
259
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
260 Test we can skip the user configuration
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
261
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
262 $ cat >> .hg/hgrc <<EOF
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
263 > [paths]
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
264 > elephant = babar
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
265 > EOF
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
266 $ hg path
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
267 elephant = $TESTTMP/babar
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
268 foo = $TESTTMP/bar
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
269 $ HGRCSKIPREPO=1 hg path
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
270 foo = $TESTTMP/bar
d56a2d6f34f0 hgrc: introduce HGRCSKIPREPO to skip reading the repository's hgrc
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 43919
diff changeset
271
44244
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
272 $ cat >> .hg/hgrc <<EOF
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
273 > [broken
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
274 > EOF
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
275
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
276 $ hg path
45894
9dc1351d0b5f errors: raise ConfigError on failure to parse config file
Martin von Zweigbergk <martinvonz@google.com>
parents: 45777
diff changeset
277 config error at $TESTTMP/.hg/hgrc:3: [broken
44244
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
278 [255]
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
279 $ HGRCSKIPREPO=1 hg path
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
280 foo = $TESTTMP/bar
ef11dfc56674 config: also respect HGRCSKIPREPO in `dispatch._getlocal`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44124
diff changeset
281
44245
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
282 Check that hgweb respect HGRCSKIPREPO=1
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
283
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
284 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
45894
9dc1351d0b5f errors: raise ConfigError on failure to parse config file
Martin von Zweigbergk <martinvonz@google.com>
parents: 45777
diff changeset
285 config error at $TESTTMP/.hg/hgrc:3: [broken
44245
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
286 [255]
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
287 $ test -f hg.pid && (cat hg.pid >> $DAEMON_PIDS)
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
288 [1]
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
289 $ killdaemons.py
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
290 $ test -f access.log && cat access.log
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
291 [1]
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
292 $ test -f errors.log && cat errors.log
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
293 [1]
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
294
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
295 $ HGRCSKIPREPO=1 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
296 $ cat hg.pid >> $DAEMON_PIDS
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
297 $ killdaemons.py
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
298 $ cat access.log
bf23d6ee7ec7 config: also respect HGRCSKIPREPO in hgwebdir_mod
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44244
diff changeset
299 $ cat errors.log
44246
eecc005229ff config: also respect HGRCSKIPREPO in the zeroconf extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44245
diff changeset
300
eecc005229ff config: also respect HGRCSKIPREPO in the zeroconf extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44245
diff changeset
301 Check that zeroconf respect HGRCSKIPREPO=1
eecc005229ff config: also respect HGRCSKIPREPO in the zeroconf extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44245
diff changeset
302
eecc005229ff config: also respect HGRCSKIPREPO in the zeroconf extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44245
diff changeset
303 $ hg paths --config extensions.zeroconf=
45894
9dc1351d0b5f errors: raise ConfigError on failure to parse config file
Martin von Zweigbergk <martinvonz@google.com>
parents: 45777
diff changeset
304 config error at $TESTTMP/.hg/hgrc:3: [broken
44246
eecc005229ff config: also respect HGRCSKIPREPO in the zeroconf extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44245
diff changeset
305 [255]
47852
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
306
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
307 XXX-PYOXIDIZER Pyoxidizer build have trouble with zeroconf for unclear reason,
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
308 we accept the bad output for now as this is the last thing in the way of
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
309 testing the pyoxidizer build.
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
310
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
311 #if no-pyoxidizer
44246
eecc005229ff config: also respect HGRCSKIPREPO in the zeroconf extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44245
diff changeset
312 $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf=
eecc005229ff config: also respect HGRCSKIPREPO in the zeroconf extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44245
diff changeset
313 foo = $TESTTMP/bar
47852
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
314 #else
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
315 $ HGRCSKIPREPO=1 hg paths --config extensions.zeroconf=
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
316 abort: An invalid argument was supplied (known-bad-output !)
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
317 [255]
cce9e7d2fb92 pyoxidizer: skip for ZeroConf related test for now
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47272
diff changeset
318 #endif