tests/test-committer.t
author Pradeepkumar Gayam <in3xes@gmail.com>
Tue, 17 Aug 2010 17:54:32 +0530
changeset 11919 67fb33eb3add
parent 11801 dedf7c811436
child 12156 4c94b6d0fb1c
permissions -rw-r--r--
tests: unify test-revlog-packentry
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11801
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     1
  $ unset HGUSER
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     2
  $ EMAIL="My Name <myname@example.com>"
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     3
  $ export EMAIL
2104
f1085d34d20d Add tests/test-committer
Andrew Thompson <andrewkt@aktzero.com>
parents:
diff changeset
     4
11801
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     5
  $ hg init test
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     6
  $ cd test
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     7
  $ touch asdf
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     8
  $ hg add asdf
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
     9
  $ hg commit -d '1000000 0' -m commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    10
  $ hg tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    11
  changeset:   0:9426b370c206
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    12
  tag:         tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    13
  user:        My Name <myname@example.com>
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    14
  date:        Mon Jan 12 13:46:40 1970 +0000
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    15
  summary:     commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    16
  
3466
8b55c0ba8048 makes username mandatory
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2104
diff changeset
    17
11801
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    18
  $ unset EMAIL
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    19
  $ echo 1234 > asdf
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    20
  $ hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    21
  $ hg tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    22
  changeset:   1:4997f15a1b24
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    23
  tag:         tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    24
  user:        foo@bar.com
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    25
  date:        Mon Jan 12 13:46:40 1970 +0000
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    26
  summary:     commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    27
  
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    28
  $ echo "[ui]" >> .hg/hgrc
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    29
  $ echo "username = foobar <foo@bar.com>" >> .hg/hgrc
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    30
  $ echo 12 > asdf
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    31
  $ hg commit -d '1000000 0' -m commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    32
  $ hg tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    33
  changeset:   2:72b8012b424e
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    34
  tag:         tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    35
  user:        foobar <foo@bar.com>
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    36
  date:        Mon Jan 12 13:46:40 1970 +0000
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    37
  summary:     commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    38
  
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    39
  $ echo 1 > asdf
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    40
  $ hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    41
  $ hg tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    42
  changeset:   3:35ff3067bedd
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    43
  tag:         tip
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    44
  user:        foo@bar.com
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    45
  date:        Mon Jan 12 13:46:40 1970 +0000
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    46
  summary:     commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    47
  
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    48
  $ echo 123 > asdf
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    49
  $ echo "[ui]" > .hg/hgrc
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    50
  $ echo "username = " >> .hg/hgrc
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    51
  $ hg commit -d '1000000 0' -m commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    52
  abort: no username supplied (see "hg help config")
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    53
  $ rm .hg/hgrc
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    54
  $ hg commit -d '1000000 0' -m commit-1 2>&1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    55
  No username found, using '[^']*' instead
8424
c5b3d3e30de7 changelog: refuse to add revisions with empty usernames
Martin Geisler <mg@lazybytes.net>
parents: 4044
diff changeset
    56
11801
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    57
  $ echo space > asdf
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    58
  $ hg commit -d '1000000 0' -u ' ' -m commit-1
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    59
  transaction abort!
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    60
  rollback completed
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    61
  abort: empty username!
8424
c5b3d3e30de7 changelog: refuse to add revisions with empty usernames
Martin Geisler <mg@lazybytes.net>
parents: 4044
diff changeset
    62
11801
dedf7c811436 tests: unify test-committer
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8424
diff changeset
    63
  $ true