tests/test-hgrc.t
changeset 12375 02990e22150b
parent 12372 5163e3c8aa52
child 12376 97ffc68f71d3
equal deleted inserted replaced
12374:4e7dd28db0dd 12375:02990e22150b
     1   $ echo "invalid" > $HGRCPATH
     1   $ echo "invalid" > $HGRCPATH
     2   $ hg version
     2   $ hg version
     3   hg: parse error at .*/\.hgrc:1: invalid
     3   hg: parse error at .*/\.hgrc:1: invalid (re)
     4   [255]
     4   [255]
     5   $ echo "" > $HGRCPATH
     5   $ echo "" > $HGRCPATH
     6 
     6 
     7 issue1199: escaping
     7 issue1199: escaping
     8 
     8 
    12   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
    12   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
    13   $ p=`pwd`
    13   $ p=`pwd`
    14   $ cd foobar
    14   $ cd foobar
    15   $ cat .hg/hgrc
    15   $ cat .hg/hgrc
    16   [paths]
    16   [paths]
    17   default = .*/foo%bar
    17   default = .*/foo%bar (re)
    18   $ hg paths
    18   $ hg paths
    19   default = .*/foo%bar
    19   default = .*/foo%bar (re)
    20   $ hg showconfig
    20   $ hg showconfig
    21   bundle\.mainreporoot=.*/foobar
    21   bundle\.mainreporoot=.*/foobar (re)
    22   paths\.default=.*/foo%bar
    22   paths\.default=.*/foo%bar (re)
    23   $ cd ..
    23   $ cd ..
    24 
    24 
    25 issue1829: wrong indentation
    25 issue1829: wrong indentation
    26 
    26 
    27   $ echo '[foo]' > $HGRCPATH
    27   $ echo '[foo]' > $HGRCPATH
    28   $ echo '  x = y' >> $HGRCPATH
    28   $ echo '  x = y' >> $HGRCPATH
    29   $ hg version
    29   $ hg version
    30   hg: parse error at .*/\.hgrc:2:   x = y
    30   hg: parse error at .*/\.hgrc:2:   x = y (re)
    31   [255]
    31   [255]
    32 
    32 
    33   $ python -c "print '[foo]\nbar = a\n b\n c \n  de\n fg \nbaz = bif cb \n'" \
    33   $ python -c "print '[foo]\nbar = a\n b\n c \n  de\n fg \nbaz = bif cb \n'" \
    34   > > $HGRCPATH
    34   > > $HGRCPATH
    35   $ hg showconfig foo
    35   $ hg showconfig foo
    38 
    38 
    39   $ FAKEPATH=/path/to/nowhere
    39   $ FAKEPATH=/path/to/nowhere
    40   $ export FAKEPATH
    40   $ export FAKEPATH
    41   $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH
    41   $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH
    42   $ hg version
    42   $ hg version
    43   hg: parse error at .*/\.hgrc:1: cannot include /path/to/nowhere/no-such-file \(No such file or directory\)
    43   hg: parse error at .*/\.hgrc:1: cannot include /path/to/nowhere/no-such-file \(No such file or directory\) (re)
    44   [255]
    44   [255]
    45   $ unset FAKEPATH
    45   $ unset FAKEPATH
    46 
    46 
    47 username expansion
    47 username expansion
    48 
    48 
    88   $ echo "log=log -g" >> $HGRCPATH
    88   $ echo "log=log -g" >> $HGRCPATH
    89 
    89 
    90 customized hgrc
    90 customized hgrc
    91 
    91 
    92   $ hg showconfig
    92   $ hg showconfig
    93   read config from: .*/\.hgrc
    93   read config from: .*/\.hgrc (re)
    94   .*/\.hgrc:13: alias\.log=log -g
    94   .*/\.hgrc:13: alias\.log=log -g (re)
    95   .*/\.hgrc:11: defaults\.identify=-n
    95   .*/\.hgrc:11: defaults\.identify=-n (re)
    96   .*/\.hgrc:2: ui\.debug=true
    96   .*/\.hgrc:2: ui\.debug=true (re)
    97   .*/\.hgrc:3: ui\.fallbackencoding=ASCII
    97   .*/\.hgrc:3: ui\.fallbackencoding=ASCII (re)
    98   .*/\.hgrc:4: ui\.quiet=true
    98   .*/\.hgrc:4: ui\.quiet=true (re)
    99   .*/\.hgrc:5: ui\.slash=true
    99   .*/\.hgrc:5: ui\.slash=true (re)
   100   .*/\.hgrc:6: ui\.traceback=true
   100   .*/\.hgrc:6: ui\.traceback=true (re)
   101   .*/\.hgrc:7: ui\.verbose=true
   101   .*/\.hgrc:7: ui\.verbose=true (re)
   102   .*/\.hgrc:8: ui\.style=~/.hgstyle
   102   .*/\.hgrc:8: ui\.style=~/.hgstyle (re)
   103   .*/\.hgrc:9: ui\.logtemplate=\{node\}
   103   .*/\.hgrc:9: ui\.logtemplate=\{node\} (re)
   104 
   104 
   105 plain hgrc
   105 plain hgrc
   106 
   106 
   107   $ HGPLAIN=; export HGPLAIN
   107   $ HGPLAIN=; export HGPLAIN
   108   $ hg showconfig --config ui.traceback=True --debug
   108   $ hg showconfig --config ui.traceback=True --debug
   109   read config from: .*/\.hgrc
   109   read config from: .*/\.hgrc (re)
   110   none: ui.traceback=True
   110   none: ui.traceback=True
   111   none: ui.verbose=False
   111   none: ui.verbose=False
   112   none: ui.debug=True
   112   none: ui.debug=True
   113   none: ui.quiet=False
   113   none: ui.quiet=False