comparison tests/test-committer.t @ 21955:6dfb78f18bdb stable

config: allow 'user' in .hgrc ui section (issue3169)
author anatoly techtonik <techtonik@gmail.com>
date Sat, 26 Jul 2014 09:27:11 +0300
parents b75a23eec9c9
children 89003c49315c
comparison
equal deleted inserted replaced
21954:838025b15925 21955:6dfb78f18bdb
50 $ echo "username = " >> .hg/hgrc 50 $ echo "username = " >> .hg/hgrc
51 $ hg commit -m commit-1 51 $ hg commit -m commit-1
52 abort: no username supplied 52 abort: no username supplied
53 (use "hg config --edit" to set your username) 53 (use "hg config --edit" to set your username)
54 [255] 54 [255]
55
56 # test alternate config var
57
58 $ echo 1234 > asdf
59 $ echo "[ui]" > .hg/hgrc
60 $ echo "user = Foo Bar II <foo2@bar.com>" >> .hg/hgrc
61 $ hg commit -m commit-1
62 $ hg tip
63 changeset: 4:6f24bfb4c617
64 tag: tip
65 user: Foo Bar II <foo2@bar.com>
66 date: Thu Jan 01 00:00:00 1970 +0000
67 summary: commit-1
68
69 # test no .hg/hgrc (uses generated non-interactive username)
70
71 $ echo space > asdf
55 $ rm .hg/hgrc 72 $ rm .hg/hgrc
56 $ hg commit -m commit-1 2>&1 73 $ hg commit -m commit-1 2>&1
57 no username found, using '[^']*' instead (re) 74 no username found, using '[^']*' instead (re)
58 75
59 $ echo space > asdf 76 $ echo space2 > asdf
60 $ hg commit -u ' ' -m commit-1 77 $ hg commit -u ' ' -m commit-1
61 transaction abort! 78 transaction abort!
62 rollback completed 79 rollback completed
63 abort: empty username! 80 abort: empty username!
64 [255] 81 [255]
65 82
83 # don't add tests here, previous test is unstable
84
66 $ cd .. 85 $ cd ..