Show More
@@ -1,36 +1,63 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | unset HGUSER | |
|
4 | EMAIL="My Name <myname@example.com>" | |
|
5 | export EMAIL | |
|
1 | $ unset HGUSER | |
|
2 | $ EMAIL="My Name <myname@example.com>" | |
|
3 | $ export EMAIL | |
|
6 | 4 | |
|
7 | hg init test | |
|
8 | cd test | |
|
9 | touch asdf | |
|
10 | hg add asdf | |
|
11 | hg commit -d '1000000 0' -m commit-1 | |
|
12 | hg tip | |
|
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 | ||
|
13 | 17 | |
|
14 | unset EMAIL | |
|
15 | echo 1234 > asdf | |
|
16 | hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 | |
|
17 | hg tip | |
|
18 | echo "[ui]" >> .hg/hgrc | |
|
19 | echo "username = foobar <foo@bar.com>" >> .hg/hgrc | |
|
20 | echo 12 > asdf | |
|
21 | hg commit -d '1000000 0' -m commit-1 | |
|
22 | hg tip | |
|
23 | echo 1 > asdf | |
|
24 | hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 | |
|
25 | hg tip | |
|
26 |
echo 12 |
|
|
27 | echo "[ui]" > .hg/hgrc | |
|
28 | echo "username = " >> .hg/hgrc | |
|
29 | hg commit -d '1000000 0' -m commit-1 | |
|
30 | rm .hg/hgrc | |
|
31 | hg commit -d '1000000 0' -m commit-1 2>&1 | sed -e "s/'[^']*'/user@host/" | |
|
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 | |
|
32 | 56 | |
|
33 | echo space > asdf | |
|
34 | hg commit -d '1000000 0' -u ' ' -m commit-1 | |
|
57 | $ echo space > asdf | |
|
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 |
General Comments 0
You need to be logged in to leave comments.
Login now