tests/test-hgrc.t
branchstable
changeset 14992 188936b334b1
parent 14748 1b8c70c9f47c
child 15372 695ac6aca77f
equal deleted inserted replaced
14991:4f39610996fa 14992:188936b334b1
    52   Copyright (C) 2005-2011 Matt Mackall and others
    52   Copyright (C) 2005-2011 Matt Mackall and others
    53   This is free software; see the source for copying conditions. There is NO
    53   This is free software; see the source for copying conditions. There is NO
    54   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    54   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    55   $ unset FAKEPATH
    55   $ unset FAKEPATH
    56 
    56 
    57 make sure unspecified global ui options don't override old values
    57 make sure global options given on the cmdline take precedence
    58 
    58 
    59   $ hg showconfig --config ui.verbose=True --quiet
    59   $ hg showconfig --config ui.verbose=True --quiet
    60   ui.verbose=True
    60   ui.verbose=False
       
    61   ui.debug=False
    61   ui.quiet=True
    62   ui.quiet=True
       
    63 
       
    64   $ touch foobar/untracked
       
    65   $ cat >> foobar/.hg/hgrc <<EOF
       
    66   > [ui]
       
    67   > verbose=True
       
    68   > EOF
       
    69   $ hg -R foobar st -q
    62 
    70 
    63 username expansion
    71 username expansion
    64 
    72 
    65   $ olduser=$HGUSER
    73   $ olduser=$HGUSER
    66   $ unset HGUSER
    74   $ unset HGUSER
   138 
   146 
   139   $ HGPLAIN=; export HGPLAIN
   147   $ HGPLAIN=; export HGPLAIN
   140   $ hg showconfig --config ui.traceback=True --debug
   148   $ hg showconfig --config ui.traceback=True --debug
   141   read config from: $TESTTMP/hgrc
   149   read config from: $TESTTMP/hgrc
   142   none: ui.traceback=True
   150   none: ui.traceback=True
       
   151   none: ui.verbose=False
   143   none: ui.debug=True
   152   none: ui.debug=True
       
   153   none: ui.quiet=False
   144 
   154 
   145 plain mode with exceptions
   155 plain mode with exceptions
   146 
   156 
   147   $ cat > plain.py <<EOF
   157   $ cat > plain.py <<EOF
   148   > def uisetup(ui):
   158   > def uisetup(ui):
   154   $ hg showconfig --config ui.traceback=True --debug
   164   $ hg showconfig --config ui.traceback=True --debug
   155   plain: True
   165   plain: True
   156   read config from: $TESTTMP/hgrc
   166   read config from: $TESTTMP/hgrc
   157   $TESTTMP/hgrc:15: extensions.plain=./plain.py
   167   $TESTTMP/hgrc:15: extensions.plain=./plain.py
   158   none: ui.traceback=True
   168   none: ui.traceback=True
       
   169   none: ui.verbose=False
   159   none: ui.debug=True
   170   none: ui.debug=True
       
   171   none: ui.quiet=False
   160   $ unset HGPLAIN
   172   $ unset HGPLAIN
   161   $ hg showconfig --config ui.traceback=True --debug
   173   $ hg showconfig --config ui.traceback=True --debug
   162   plain: True
   174   plain: True
   163   read config from: $TESTTMP/hgrc
   175   read config from: $TESTTMP/hgrc
   164   $TESTTMP/hgrc:15: extensions.plain=./plain.py
   176   $TESTTMP/hgrc:15: extensions.plain=./plain.py
   165   none: ui.traceback=True
   177   none: ui.traceback=True
       
   178   none: ui.verbose=False
   166   none: ui.debug=True
   179   none: ui.debug=True
       
   180   none: ui.quiet=False
   167   $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT
   181   $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT
   168   $ hg showconfig --config ui.traceback=True --debug
   182   $ hg showconfig --config ui.traceback=True --debug
   169   plain: True
   183   plain: True
   170   read config from: $TESTTMP/hgrc
   184   read config from: $TESTTMP/hgrc
   171   $TESTTMP/hgrc:15: extensions.plain=./plain.py
   185   $TESTTMP/hgrc:15: extensions.plain=./plain.py
   172   none: ui.traceback=True
   186   none: ui.traceback=True
       
   187   none: ui.verbose=False
   173   none: ui.debug=True
   188   none: ui.debug=True
       
   189   none: ui.quiet=False