Mercurial > hg
comparison tests/test-hgrc @ 11225:d6dbd5e4ee72
ui.username(): expand environment variables in username configuration value.
note: expansion of config variables must be handled on a case-by-case basis
because they can contain arbitrary data that may not be desirable to expand.
author | Chad Dombrova <chadrik@gmail.com> |
---|---|
date | Wed, 26 May 2010 14:03:29 -0700 |
parents | f23f87462c18 |
children |
comparison
equal
deleted
inserted
replaced
11224:f23f87462c18 | 11225:d6dbd5e4ee72 |
---|---|
27 export FAKEPATH | 27 export FAKEPATH |
28 echo '%include $FAKEPATH/no-such-file' > $HGRCPATH | 28 echo '%include $FAKEPATH/no-such-file' > $HGRCPATH |
29 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" | 29 hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" |
30 unset FAKEPATH | 30 unset FAKEPATH |
31 | 31 |
32 echo "% username expansion" | |
33 olduser=$HGUSER | |
34 unset HGUSER | |
35 | |
36 FAKEUSER='John Doe' | |
37 export FAKEUSER | |
38 echo '[ui]' > $HGRCPATH | |
39 echo 'username = $FAKEUSER' >> $HGRCPATH | |
40 | |
41 hg init usertest | |
42 cd usertest | |
43 touch bar | |
44 hg commit --addremove --quiet -m "added bar" | |
45 hg log --template "{author}\n" | |
46 cd .. | |
47 | |
48 hg showconfig | sed -e "s:$p:...:" | |
49 | |
50 unset FAKEUSER | |
51 HGUSER=$olduser | |
52 export HGUSER | |
53 | |
32 # HGPLAIN | 54 # HGPLAIN |
33 cd .. | 55 cd .. |
34 p=`pwd` | 56 p=`pwd` |
35 echo "[ui]" > $HGRCPATH | 57 echo "[ui]" > $HGRCPATH |
36 echo "debug=true" >> $HGRCPATH | 58 echo "debug=true" >> $HGRCPATH |