##// END OF EJS Templates
tests: unify test-committer
Nicolas Dumazet -
r11801:dedf7c81 default
parent child Browse files
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
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
13
27
14 unset EMAIL
28 $ echo "[ui]" >> .hg/hgrc
15 echo 1234 > asdf
29 $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc
16 hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1
30 $ echo 12 > asdf
17 hg tip
31 $ hg commit -d '1000000 0' -m commit-1
18 echo "[ui]" >> .hg/hgrc
32 $ hg tip
19 echo "username = foobar <foo@bar.com>" >> .hg/hgrc
33 changeset: 2:72b8012b424e
20 echo 12 > asdf
34 tag: tip
21 hg commit -d '1000000 0' -m commit-1
35 user: foobar <foo@bar.com>
22 hg tip
36 date: Mon Jan 12 13:46:40 1970 +0000
23 echo 1 > asdf
37 summary: commit-1
24 hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1
25 hg tip
26 echo 123 > asdf
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/"
32
38
33 echo space > asdf
39 $ echo 1 > asdf
34 hg commit -d '1000000 0' -u ' ' -m commit-1
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
35
47
36 true
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
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