2010-08-12 17:19:59 +04:00
|
|
|
$ unset HGUSER
|
|
|
|
$ EMAIL="My Name <myname@example.com>"
|
|
|
|
$ export EMAIL
|
|
|
|
|
|
|
|
$ hg init test
|
|
|
|
$ cd test
|
|
|
|
$ touch asdf
|
|
|
|
$ hg add asdf
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -m commit-1
|
2010-08-12 17:19:59 +04:00
|
|
|
$ hg tip
|
2010-09-03 01:22:51 +04:00
|
|
|
changeset: 0:53f268a58230
|
2010-08-12 17:19:59 +04:00
|
|
|
tag: tip
|
|
|
|
user: My Name <myname@example.com>
|
2010-09-03 01:22:51 +04:00
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
2010-08-12 17:19:59 +04:00
|
|
|
summary: commit-1
|
|
|
|
|
|
|
|
|
|
|
|
$ unset EMAIL
|
|
|
|
$ echo 1234 > asdf
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -u "foo@bar.com" -m commit-1
|
2010-08-12 17:19:59 +04:00
|
|
|
$ hg tip
|
2010-09-03 01:22:51 +04:00
|
|
|
changeset: 1:3871b2a9e9bf
|
2010-08-12 17:19:59 +04:00
|
|
|
tag: tip
|
|
|
|
user: foo@bar.com
|
2010-09-03 01:22:51 +04:00
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
2010-08-12 17:19:59 +04:00
|
|
|
summary: commit-1
|
|
|
|
|
|
|
|
$ echo "[ui]" >> .hg/hgrc
|
|
|
|
$ echo "username = foobar <foo@bar.com>" >> .hg/hgrc
|
|
|
|
$ echo 12 > asdf
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -m commit-1
|
2010-08-12 17:19:59 +04:00
|
|
|
$ hg tip
|
2010-09-03 01:22:51 +04:00
|
|
|
changeset: 2:8eeac6695c1c
|
2010-08-12 17:19:59 +04:00
|
|
|
tag: tip
|
|
|
|
user: foobar <foo@bar.com>
|
2010-09-03 01:22:51 +04:00
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
2010-08-12 17:19:59 +04:00
|
|
|
summary: commit-1
|
|
|
|
|
|
|
|
$ echo 1 > asdf
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -u "foo@bar.com" -m commit-1
|
2010-08-12 17:19:59 +04:00
|
|
|
$ hg tip
|
2010-09-03 01:22:51 +04:00
|
|
|
changeset: 3:957606a725e4
|
2010-08-12 17:19:59 +04:00
|
|
|
tag: tip
|
|
|
|
user: foo@bar.com
|
2010-09-03 01:22:51 +04:00
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
2010-08-12 17:19:59 +04:00
|
|
|
summary: commit-1
|
|
|
|
|
|
|
|
$ echo 123 > asdf
|
|
|
|
$ echo "[ui]" > .hg/hgrc
|
|
|
|
$ echo "username = " >> .hg/hgrc
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -m commit-1
|
2010-08-12 17:19:59 +04:00
|
|
|
abort: no username supplied (see "hg help config")
|
2010-09-17 02:51:32 +04:00
|
|
|
[255]
|
2010-08-12 17:19:59 +04:00
|
|
|
$ rm .hg/hgrc
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -m commit-1 2>&1
|
2010-08-12 17:19:59 +04:00
|
|
|
No username found, using '[^']*' instead
|
|
|
|
|
|
|
|
$ echo space > asdf
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -u ' ' -m commit-1
|
2010-08-12 17:19:59 +04:00
|
|
|
transaction abort!
|
|
|
|
rollback completed
|
|
|
|
abort: empty username!
|
2010-09-17 02:51:32 +04:00
|
|
|
[255]
|