equal
deleted
inserted
replaced
|
1 $ unset HGUSER |
|
2 $ EMAIL="My Name <myname@example.com>" |
|
3 $ export EMAIL |
|
4 |
|
5 $ hg init test |
|
6 $ cd test |
|
7 $ touch asdf |
|
8 $ hg add asdf |
|
9 $ hg commit -d '1000000 0' -m commit-1 |
|
10 $ hg tip |
|
11 changeset: 0:9426b370c206 |
|
12 tag: tip |
|
13 user: My Name <myname@example.com> |
|
14 date: Mon Jan 12 13:46:40 1970 +0000 |
|
15 summary: commit-1 |
|
16 |
|
17 |
|
18 $ unset EMAIL |
|
19 $ echo 1234 > asdf |
|
20 $ hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 |
|
21 $ hg tip |
|
22 changeset: 1:4997f15a1b24 |
|
23 tag: tip |
|
24 user: foo@bar.com |
|
25 date: Mon Jan 12 13:46:40 1970 +0000 |
|
26 summary: commit-1 |
|
27 |
|
28 $ echo "[ui]" >> .hg/hgrc |
|
29 $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc |
|
30 $ echo 12 > asdf |
|
31 $ hg commit -d '1000000 0' -m commit-1 |
|
32 $ hg tip |
|
33 changeset: 2:72b8012b424e |
|
34 tag: tip |
|
35 user: foobar <foo@bar.com> |
|
36 date: Mon Jan 12 13:46:40 1970 +0000 |
|
37 summary: commit-1 |
|
38 |
|
39 $ echo 1 > asdf |
|
40 $ hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 |
|
41 $ hg tip |
|
42 changeset: 3:35ff3067bedd |
|
43 tag: tip |
|
44 user: foo@bar.com |
|
45 date: Mon Jan 12 13:46:40 1970 +0000 |
|
46 summary: commit-1 |
|
47 |
|
48 $ echo 123 > asdf |
|
49 $ echo "[ui]" > .hg/hgrc |
|
50 $ echo "username = " >> .hg/hgrc |
|
51 $ hg commit -d '1000000 0' -m commit-1 |
|
52 abort: no username supplied (see "hg help config") |
|
53 $ rm .hg/hgrc |
|
54 $ hg commit -d '1000000 0' -m commit-1 2>&1 |
|
55 No username found, using '[^']*' instead |
|
56 |
|
57 $ echo space > asdf |
|
58 $ hg commit -d '1000000 0' -u ' ' -m commit-1 |
|
59 transaction abort! |
|
60 rollback completed |
|
61 abort: empty username! |
|
62 |
|
63 $ true |