tests/test-hgrc.t
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 13 Oct 2016 12:50:27 +0200
changeset 30155 b7a966ce89ed
parent 29982 3d2ea1403c62
child 30522 ff7df4bb75de
permissions -rw-r--r--
changelog: disable delta chains This patch disables delta chains on changelogs. After this patch, new entries on changelogs - including existing changelogs - will be stored as the fulltext of that data (likely compressed). No delta computation will be performed. An overview of delta chains and data justifying this change follows. Revlogs try to store entries as a delta against a previous entry (either a parent revision in the case of generaldelta or the previous physical revision when not using generaldelta). Most of the time this is the correct thing to do: it frequently results in less CPU usage and smaller storage. Delta chains are most effective when the base revision being deltad against is similar to the current data. This tends to occur naturally for manifests and file data, since only small parts of each tend to change with each revision. Changelogs, however, are a different story. Changelog entries represent changesets/commits. And unless commits in a repository are homogonous (same author, changing same files, similar commit messages, etc), a delta from one entry to the next tends to be relatively large compared to the size of the entry. This means that delta chains tend to be short. How short? Here is the full vs delta revision breakdown on some real world repos: Repo % Full % Delta Max Length hg 45.8 54.2 6 mozilla-central 42.4 57.6 8 mozilla-unified 42.5 57.5 17 pypy 46.1 53.9 6 python-zstandard 46.1 53.9 3 (I threw in python-zstandard as an example of a repo that is homogonous. It contains a small Python project with changes all from the same author.) Contrast this with the manifest revlog for these repos, where 99+% of revisions are deltas and delta chains run into the thousands. So delta chains aren't as useful on changelogs. But even a short delta chain may provide benefits. Let's measure that. Delta chains may require less CPU to read revisions if the CPU time spent reading smaller deltas is less than the CPU time used to decompress larger individual entries. We can measure this via `hg perfrevlog -c -d 1` to iterate a revlog to resolve each revision's fulltext. Here are the results of that command on a repo using delta chains in its changelog and on a repo without delta chains: hg (forward) ! wall 0.407008 comb 0.410000 user 0.410000 sys 0.000000 (best of 25) ! wall 0.390061 comb 0.390000 user 0.390000 sys 0.000000 (best of 26) hg (reverse) ! wall 0.515221 comb 0.520000 user 0.520000 sys 0.000000 (best of 19) ! wall 0.400018 comb 0.400000 user 0.390000 sys 0.010000 (best of 25) mozilla-central (forward) ! wall 4.508296 comb 4.490000 user 4.490000 sys 0.000000 (best of 3) ! wall 4.370222 comb 4.370000 user 4.350000 sys 0.020000 (best of 3) mozilla-central (reverse) ! wall 5.758995 comb 5.760000 user 5.720000 sys 0.040000 (best of 3) ! wall 4.346503 comb 4.340000 user 4.320000 sys 0.020000 (best of 3) mozilla-unified (forward) ! wall 4.957088 comb 4.950000 user 4.940000 sys 0.010000 (best of 3) ! wall 4.660528 comb 4.650000 user 4.630000 sys 0.020000 (best of 3) mozilla-unified (reverse) ! wall 6.119827 comb 6.110000 user 6.090000 sys 0.020000 (best of 3) ! wall 4.675136 comb 4.670000 user 4.670000 sys 0.000000 (best of 3) pypy (forward) ! wall 1.231122 comb 1.240000 user 1.230000 sys 0.010000 (best of 8) ! wall 1.164896 comb 1.160000 user 1.160000 sys 0.000000 (best of 9) pypy (reverse) ! wall 1.467049 comb 1.460000 user 1.460000 sys 0.000000 (best of 7) ! wall 1.160200 comb 1.170000 user 1.160000 sys 0.010000 (best of 9) The data clearly shows that it takes less wall and CPU time to resolve revisions when there are no delta chains in the changelogs, regardless of the direction of traversal. Furthermore, not using a delta chain means that fulltext resolution in reverse is as fast as iterating forward. So not using delta chains on the changelog is a clear CPU win for reading operations. An example of a user-visible operation showing this speed-up is revset evaluation. Here are results for `hg perfrevset 'author(gps) or author(mpm)'`: hg ! wall 1.655506 comb 1.660000 user 1.650000 sys 0.010000 (best of 6) ! wall 1.612723 comb 1.610000 user 1.600000 sys 0.010000 (best of 7) mozilla-central ! wall 17.629826 comb 17.640000 user 17.600000 sys 0.040000 (best of 3) ! wall 17.311033 comb 17.300000 user 17.260000 sys 0.040000 (best of 3) What about 00changelog.i size? Repo Delta Chains No Delta Chains hg 7,033,250 6,976,771 mozilla-central 82,978,748 81,574,623 mozilla-unified 88,112,349 86,702,162 pypy 20,740,699 20,659,741 The data shows that removing delta chains from the changelog makes the changelog smaller. Delta chains are also used during changegroup generation. This operation essentially converts a series of revisions to one large delta chain. And changegroup generation is smart: if the delta in the revlog matches what the changegroup is emitting, it will reuse the delta instead of recalculating it. We can measure the impact removing changelog delta chains has on changegroup generation via `hg perfchangegroupchangelog`: hg ! wall 1.589245 comb 1.590000 user 1.590000 sys 0.000000 (best of 7) ! wall 1.788060 comb 1.790000 user 1.790000 sys 0.000000 (best of 6) mozilla-central ! wall 17.382585 comb 17.380000 user 17.340000 sys 0.040000 (best of 3) ! wall 20.161357 comb 20.160000 user 20.120000 sys 0.040000 (best of 3) mozilla-unified ! wall 18.722839 comb 18.720000 user 18.680000 sys 0.040000 (best of 3) ! wall 21.168075 comb 21.170000 user 21.130000 sys 0.040000 (best of 3) pypy ! wall 4.828317 comb 4.830000 user 4.820000 sys 0.010000 (best of 3) ! wall 5.415455 comb 5.420000 user 5.410000 sys 0.010000 (best of 3) The data shows eliminating delta chains makes the changelog part of changegroup generation slower. This is expected since we now have to compute deltas for revisions where we could recycle the delta before. It is worth putting this regression into context of overall changegroup times. Here is the rough total CPU time spent in changegroup generation for various repos while using delta chains on the changelog: Repo CPU Time (s) CPU Time w/ compression hg 4.50 7.05 mozilla-central 111.1 222.0 pypy 28.68 75.5 Before compression, removing delta chains from the changegroup adds ~4.4% overhead to hg changegroup generation, 1.3% to mozilla-central, and 2.0% to pypy. When you factor in zlib compression, these percentages are roughly divided by 2. While the increased CPU usage for changegroup generation is unfortunate, I think it is acceptable because the percentage is small, server operators (those likely impacted most by this) have other mechanisms to mitigate CPU consumption (namely reducing zlib compression level and pre-generated clone bundles), and because there is room to optimize this in the future. For example, we could use the nullid as the base revision, effectively encoding the full revision for each entry in the changegroup. When doing this, `hg perfchangegroupchangelog` nearly halves: mozilla-unified ! wall 21.168075 comb 21.170000 user 21.130000 sys 0.040000 (best of 3) ! wall 11.196461 comb 11.200000 user 11.190000 sys 0.010000 (best of 3) This looks very promising as a future optimization opportunity. It's worth that the changes in test-acl.t to the changegroup part size. This is because revision 6 in the changegroup had a delta chain of length 2 before and after this patch the base revision is nullrev. When the base revision is nullrev, cg2packer.deltaparent() hardcodes the *previous* revision from the changegroup as the delta parent. This caused the delta in the changegroup to switch base revisions, the delta to change, and the size to change accordingly. While the size increased in this case, I think sizes will remain the same on average, as the delta base for changelog revisions doesn't matter too much (as this patch shows). So, I don't consider this a regression.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17015
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16911
diff changeset
     1
hide outer repo
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16911
diff changeset
     2
  $ hg init
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16911
diff changeset
     3
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
     4
Use hgrc within $TESTTMP
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
     5
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
     6
  $ HGRCPATH=`pwd`/hgrc
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
     7
  $ export HGRCPATH
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
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
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
    19
  hg: parse 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
29982
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]
23056
d898c7e8c301 tests: add "(glob)" to paths in test-hgrc.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
    33
  default = $TESTTMP/foo%bar (glob)
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
29982
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
  #
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
    38
  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
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
    39
  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
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
    40
  # my-clone     = /home/jdoe/jdoes-clone
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
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15372
diff changeset
    46
  default = $TESTTMP/foo%bar (glob)
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
    47
  $ hg showconfig
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15372
diff changeset
    48
  bundle.mainreporoot=$TESTTMP/foobar (glob)
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
    49
  extensions.chgserver= (?)
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 15372
diff changeset
    50
  paths.default=$TESTTMP/foo%bar (glob)
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    51
  $ cd ..
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    52
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    53
issue1829: wrong indentation
9470
ba75830d17a9 dispatch: catch ConfigError while constructing ui
Martin Geisler <mg@lazybytes.net>
parents: 7044
diff changeset
    54
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
    55
  $ 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
    56
  $ 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
    57
  $ hg version
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
    58
  hg: parse error at $TESTTMP/hgrc:2:   x = y
22276
b13b99d39a46 config: highlight parse error caused by leading spaces (issue3214)
Razvan Cojocaru <razvan.cojocaru93@gmail.com>
parents: 20789
diff changeset
    59
  unexpected leading whitespace
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
    60
  [255]
10042
7cdd2a7db2c2 config: raise ConfigError on non-existing include files
Martin Geisler <mg@lazybytes.net>
parents: 9470
diff changeset
    61
22947
c63a09b6b337 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents: 22837
diff changeset
    62
  $ $PYTHON -c "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
    63
  > > $HGRC
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    64
  $ hg showconfig foo
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    65
  foo.bar=a\nb\nc\nde\nfg
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    66
  foo.baz=bif cb
10295
44c923eeb81d config: handle short continuations (issue1999)
Matt Mackall <mpm@selenic.com>
parents: 10042
diff changeset
    67
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    68
  $ FAKEPATH=/path/to/nowhere
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    69
  $ 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
    70
  $ 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
    71
  $ hg version
14491
a086b91ce7fb tests: glob version number in test-hgrc
Matt Mackall <mpm@selenic.com>
parents: 14489
diff changeset
    72
  Mercurial Distributed SCM (version *) (glob)
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 24191
diff changeset
    73
  (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
    74
  
27925
f6d73c8756e2 copyright: update to 2016
timeless <timeless@mozdev.org>
parents: 26421
diff changeset
    75
  Copyright (C) 2005-2016 Matt Mackall and others
14489
3a27faf9a999 tests: update for handling of missing hgrc includes
Matt Mackall <mpm@selenic.com>
parents: 14372
diff changeset
    76
  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
    77
  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
    78
  $ unset FAKEPATH
10455
40dfd46d098f ui: add HGPLAIN environment variable for easier scripting
Brodie Rao <me+hg@dackz.net>
parents: 10296
diff changeset
    79
14992
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    80
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
    81
1b8c70c9f47c dispatch: make sure unspecified global ui options don't override old values
Idan Kamara <idankk86@gmail.com>
parents: 14491
diff changeset
    82
  $ 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
    83
  bundle.mainreporoot=$TESTTMP
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
    84
  extensions.chgserver= (?)
14992
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    85
  ui.verbose=False
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    86
  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
    87
  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
    88
14992
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    89
  $ touch foobar/untracked
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    90
  $ 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
    91
  > [ui]
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    92
  > verbose=True
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    93
  > EOF
188936b334b1 dispatch: make sure global options on the command line take precedence
Idan Kamara <idankk86@gmail.com>
parents: 14748
diff changeset
    94
  $ 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
    95
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    96
username expansion
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    97
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    98
  $ olduser=$HGUSER
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
    99
  $ unset HGUSER
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   100
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   101
  $ FAKEUSER='John Doe'
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   102
  $ 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
   103
  $ 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
   104
  $ echo 'username = $FAKEUSER' >> $HGRC
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
   105
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   106
  $ hg init usertest
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   107
  $ cd usertest
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   108
  $ touch bar
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   109
  $ hg commit --addremove --quiet -m "added bar"
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   110
  $ hg log --template "{author}\n"
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   111
  John Doe
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   112
  $ cd ..
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
   113
12109
51272b65b9b7 tests: remove useless sed in test-hgrc
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12014
diff changeset
   114
  $ hg showconfig
17015
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16911
diff changeset
   115
  bundle.mainreporoot=$TESTTMP
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
   116
  extensions.chgserver= (?)
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   117
  ui.username=$FAKEUSER
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
   118
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   119
  $ unset FAKEUSER
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   120
  $ HGUSER=$olduser
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   121
  $ export HGUSER
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
   122
12697
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   123
showconfig with multiple arguments
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   124
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
   125
  $ 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
   126
  $ 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
   127
  $ 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
   128
  $ 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
   129
  $ hg showconfig alias defaults
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   130
  alias.log=log -g
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   131
  defaults.identify=-n
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   132
  $ hg showconfig alias defaults.identify
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   133
  abort: only one config item permitted
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   134
  [255]
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   135
  $ hg showconfig alias.log defaults.identify
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   136
  abort: only one config item permitted
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   137
  [255]
14853ca7e11b showconfig: don't accept multiple sections and one config item
Brodie Rao <brodie@bitheap.org>
parents: 12640
diff changeset
   138
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   139
HGPLAIN
11225
d6dbd5e4ee72 ui.username(): expand environment variables in username configuration value.
Chad Dombrova <chadrik@gmail.com>
parents: 11224
diff changeset
   140
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
   141
  $ 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
   142
  $ 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
   143
  $ 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
   144
  $ 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
   145
  $ 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
   146
  $ 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
   147
  $ 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
   148
  $ 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
   149
  $ 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
   150
  $ 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
   151
  $ 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
   152
  $ 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
   153
  $ echo "log=log -g" >> $HGRC
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   154
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   155
customized hgrc
10455
40dfd46d098f ui: add HGPLAIN environment variable for easier scripting
Brodie Rao <me+hg@dackz.net>
parents: 10296
diff changeset
   156
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
   157
  $ hg showconfig
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   158
  read config from: $TESTTMP/hgrc
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   159
  $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
   160
  repo: bundle.mainreporoot=$TESTTMP
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   161
  $TESTTMP/hgrc:11: defaults.identify=-n
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
   162
  --config: extensions.chgserver= (?)
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   163
  $TESTTMP/hgrc:2: ui.debug=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   164
  $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   165
  $TESTTMP/hgrc:4: ui.quiet=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   166
  $TESTTMP/hgrc:5: ui.slash=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   167
  $TESTTMP/hgrc:6: ui.traceback=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   168
  $TESTTMP/hgrc:7: ui.verbose=true
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   169
  $TESTTMP/hgrc:8: ui.style=~/.hgstyle
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   170
  $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
   171
12014
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   172
plain hgrc
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   173
8508dd698c02 tests: unify test-hgrc
Brodie Rao <brodie@bitheap.org>
parents: 11225
diff changeset
   174
  $ HGPLAIN=; export HGPLAIN
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12109
diff changeset
   175
  $ hg showconfig --config ui.traceback=True --debug
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   176
  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
   177
  repo: bundle.mainreporoot=$TESTTMP
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
   178
  --config: extensions.chgserver= (?)
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
   179
  --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
   180
  --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
   181
  --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
   182
  --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
   183
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   184
plain mode with exceptions
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   185
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   186
  $ 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
   187
  > 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
   188
  > def _config(orig, ui, repo, *values, **opts):
6aa17f86d9f0 test-hgrc: do not print ui.plain() flag at uisetup()
Yuya Nishihara <yuya@tcha.org>
parents: 28610
diff changeset
   189
  >     ui.write('plain: %r\n' % ui.plain())
6aa17f86d9f0 test-hgrc: do not print ui.plain() flag at uisetup()
Yuya Nishihara <yuya@tcha.org>
parents: 28610
diff changeset
   190
  >     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
   191
  > def uisetup(ui):
28611
6aa17f86d9f0 test-hgrc: do not print ui.plain() flag at uisetup()
Yuya Nishihara <yuya@tcha.org>
parents: 28610
diff changeset
   192
  >     extensions.wrapcommand(commands.table, 'config', _config)
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   193
  > EOF
15372
695ac6aca77f check-code: fix issues with finding patterns in unified tests, fix tests
Matt Mackall <mpm@selenic.com>
parents: 14992
diff changeset
   194
  $ 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
   195
  $ 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
   196
  $ HGPLAINEXCEPT=; export HGPLAINEXCEPT
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   197
  $ 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
   198
  plain: True
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   199
  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
   200
  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
   201
  $TESTTMP/hgrc:15: extensions.plain=./plain.py
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
   202
  --config: extensions.chgserver= (?)
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
   203
  --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
   204
  --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
   205
  --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
   206
  --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
   207
  $ unset HGPLAIN
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   208
  $ 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
   209
  plain: True
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   210
  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
   211
  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
   212
  $TESTTMP/hgrc:15: extensions.plain=./plain.py
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
   213
  --config: extensions.chgserver= (?)
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
   214
  --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
   215
  --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
   216
  --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
   217
  --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
   218
  $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   219
  $ 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
   220
  plain: True
13849
9f97de157aad HGPLAIN: allow exceptions to plain mode, like i18n, via HGPLAINEXCEPT
Brodie Rao <brodie@bitheap.org>
parents: 13572
diff changeset
   221
  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
   222
  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
   223
  $TESTTMP/hgrc:15: extensions.plain=./plain.py
28610
3aa50c9d89a0 tests: make config/help tests pass even if chgserver extension is loaded
Yuya Nishihara <yuya@tcha.org>
parents: 27925
diff changeset
   224
  --config: extensions.chgserver= (?)
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
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
   229
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
   230
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
   231
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
   232
  $ 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
   233
  > [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
   234
  > 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
   235
  > 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
   236
  $ hg showconfig --debug 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
   237
  plain: True
d19c9bdbbf35 config: don't set source when no source is specified - don't overwrite with ''
Mads Kiilerich <madski@unity3d.com>
parents: 20788
diff changeset
   238
  read config from: $TESTTMP/hgrc
23056
d898c7e8c301 tests: add "(glob)" to paths in test-hgrc.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
   239
  $TESTTMP/hgrc:17: paths.foo=$TESTTMP/bar (glob)