Show More
@@ -1,36 +1,63 b'' | |||||
1 | #!/bin/sh |
|
1 | $ unset HGUSER | |
2 |
|
2 | $ EMAIL="My Name <myname@example.com>" | ||
3 | unset HGUSER |
|
3 | $ export EMAIL | |
4 | EMAIL="My Name <myname@example.com>" |
|
|||
5 | export EMAIL |
|
|||
6 |
|
4 | |||
7 | hg init test |
|
5 | $ hg init test | |
8 | cd test |
|
6 | $ cd test | |
9 | touch asdf |
|
7 | $ touch asdf | |
10 | hg add asdf |
|
8 | $ hg add asdf | |
11 | hg commit -d '1000000 0' -m commit-1 |
|
9 | $ hg commit -d '1000000 0' -m commit-1 | |
12 | hg tip |
|
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 | ||||
13 |
|
17 | |||
14 | unset EMAIL |
|
18 | $ unset EMAIL | |
15 | echo 1234 > asdf |
|
19 | $ echo 1234 > asdf | |
16 | hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 |
|
20 | $ hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 | |
17 | hg tip |
|
21 | $ hg tip | |
18 | echo "[ui]" >> .hg/hgrc |
|
22 | changeset: 1:4997f15a1b24 | |
19 | echo "username = foobar <foo@bar.com>" >> .hg/hgrc |
|
23 | tag: tip | |
20 | echo 12 > asdf |
|
24 | user: foo@bar.com | |
21 | hg commit -d '1000000 0' -m commit-1 |
|
25 | date: Mon Jan 12 13:46:40 1970 +0000 | |
22 | hg tip |
|
26 | summary: commit-1 | |
23 | echo 1 > asdf |
|
27 | ||
24 | hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 |
|
28 | $ echo "[ui]" >> .hg/hgrc | |
25 | hg tip |
|
29 | $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc | |
26 |
echo 12 |
|
30 | $ echo 12 > asdf | |
27 | echo "[ui]" > .hg/hgrc |
|
31 | $ hg commit -d '1000000 0' -m commit-1 | |
28 | echo "username = " >> .hg/hgrc |
|
32 | $ hg tip | |
29 | hg commit -d '1000000 0' -m commit-1 |
|
33 | changeset: 2:72b8012b424e | |
30 | rm .hg/hgrc |
|
34 | tag: tip | |
31 | hg commit -d '1000000 0' -m commit-1 2>&1 | sed -e "s/'[^']*'/user@host/" |
|
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 | |||
32 |
|
56 | |||
33 | echo space > asdf |
|
57 | $ echo space > asdf | |
34 | hg commit -d '1000000 0' -u ' ' -m commit-1 |
|
58 | $ hg commit -d '1000000 0' -u ' ' -m commit-1 | |
|
59 | transaction abort! | |||
|
60 | rollback completed | |||
|
61 | abort: empty username! | |||
35 |
|
62 | |||
36 | true |
|
63 | $ true |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now