tests/test-commit.t
author Martin Geisler <mg@lazybytes.net>
Thu, 02 Sep 2010 23:22:51 +0200
changeset 12156 4c94b6d0fb1c
parent 12105 6f58430dfdd0
child 12316 4134686b83e1
permissions -rw-r--r--
tests: remove unneeded -d flags Many tests fixed the commit date of their changesets at '1000000 0' or similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is the default run-tests.py installs. Removing the unnecessary flag removes some clutter and will hopefully make it clearer what the tests are really trying to test. Some tests did not even change their output when the dates were changed, in which case the -d flag was truly irrelevant. Dates used in sequence (such as '0 0', '1 0', etc...) were left alone since they may make the test easier to understand.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     1
commit date test
1488
08c7851969cc only files in normal state should be marked as deleted
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1203
diff changeset
     2
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     3
  $ hg init test
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     4
  $ cd test
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     5
  $ echo foo > foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     6
  $ hg add foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     7
  $ HGEDITOR=true hg commit -m ""
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     8
  abort: empty commit message
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
     9
  $ hg commit -d '0 0' -m commit-1
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    10
  $ echo foo >> foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    11
  $ hg commit -d '1 4444444' -m commit-3
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    12
  abort: impossible time zone offset: 4444444
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    13
  $ hg commit -d '1	15.1' -m commit-4
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11802
diff changeset
    14
  abort: invalid date: '1\t15.1'
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    15
  $ hg commit -d 'foo bar' -m commit-5
12105
6f58430dfdd0 util: get rid of extra trailing whitespace in parsedate abort message
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11802
diff changeset
    16
  abort: invalid date: 'foo bar'
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    17
  $ hg commit -d ' 1 4444' -m commit-6
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    18
  $ hg commit -d '111111111111 0' -m commit-7
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    19
  abort: date exceeds 32 bits: 111111111111
3786
8d603f8567ae make hg commit <dirname> work again
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3709
diff changeset
    20
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    21
commit added file that has been deleted
3786
8d603f8567ae make hg commit <dirname> work again
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3709
diff changeset
    22
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    23
  $ echo bar > bar
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    24
  $ hg add bar
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    25
  $ rm bar
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
    26
  $ hg commit -m commit-8
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    27
  nothing changed
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
    28
  $ hg commit -m commit-8-2 bar
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    29
  abort: bar: file not found!
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    30
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    31
  $ hg -q revert -a --no-backup
3786
8d603f8567ae make hg commit <dirname> work again
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3709
diff changeset
    32
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    33
  $ mkdir dir
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    34
  $ echo boo > dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    35
  $ hg add
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    36
  adding dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    37
  $ hg -v commit -m commit-9 dir
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    38
  dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    39
  committed changeset 2:d2a76177cb42
3709
38291d9c8c1c Expand test-commit to cover one of the recent bugs.
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents: 1933
diff changeset
    40
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    41
  $ echo > dir.file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    42
  $ hg add
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    43
  adding dir.file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    44
  $ hg commit -m commit-10 dir dir.file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    45
  abort: dir: no match under directory!
3709
38291d9c8c1c Expand test-commit to cover one of the recent bugs.
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents: 1933
diff changeset
    46
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    47
  $ echo >> dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    48
  $ mkdir bleh
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    49
  $ mkdir dir2
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    50
  $ cd bleh
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    51
  $ hg commit -m commit-11 .
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    52
  abort: bleh: no match under directory!
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    53
  $ hg commit -m commit-12 ../dir ../dir2
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    54
  abort: dir2: no match under directory!
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    55
  $ hg -v commit -m commit-13 ../dir
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    56
  dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    57
  committed changeset 3:1cd62a2d8db5
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    58
  $ cd ..
4253
9e3e975258a9 tests: expand test-commit a bit to test 'hg commit .' too
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents: 3786
diff changeset
    59
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    60
  $ hg commit -m commit-14 does-not-exist
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    61
  abort: does-not-exist: No such file or directory
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    62
  $ ln -s foo baz
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    63
  $ hg commit -m commit-15 baz
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    64
  abort: baz: file not tracked!
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    65
  $ touch quux
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    66
  $ hg commit -m commit-16 quux
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    67
  abort: quux: file not tracked!
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    68
  $ echo >> dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    69
  $ hg -v commit -m commit-17 dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    70
  dir/file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    71
  committed changeset 4:49176991390e
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    72
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    73
An empty date was interpreted as epoch origin
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    74
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    75
  $ echo foo >> foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    76
  $ hg commit -d '' -m commit-no-date
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    77
  $ hg tip --template '{date|isodate}\n' | grep '1970'
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    78
  $ cd ..
7072
4e0d54fbd34f Show added files as "added" in editor commit message (issue 1330)
Patrick Mezard <pmezard@gmail.com>
parents: 6935
diff changeset
    79
4e0d54fbd34f Show added files as "added" in editor commit message (issue 1330)
Patrick Mezard <pmezard@gmail.com>
parents: 6935
diff changeset
    80
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    81
partial subdir commit test
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    82
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    83
  $ hg init test2
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    84
  $ cd test2
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    85
  $ mkdir foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    86
  $ echo foo > foo/foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    87
  $ mkdir bar
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    88
  $ echo bar > bar/bar
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    89
  $ hg add
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    90
  adding bar/bar
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    91
  adding foo/foo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
    92
  $ hg ci -m commit-subdir-1 foo
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
    93
  $ hg ci -m commit-subdir-2 bar
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    94
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    95
subdir log 1
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    96
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    97
  $ hg log -v foo
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
    98
  changeset:   0:f97e73a25882
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
    99
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   100
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   101
  files:       foo/foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   102
  description:
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   103
  commit-subdir-1
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   104
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   105
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   106
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   107
subdir log 2
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   108
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   109
  $ hg log -v bar
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   110
  changeset:   1:aa809156d50d
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   111
  tag:         tip
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   112
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   113
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   114
  files:       bar/bar
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   115
  description:
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   116
  commit-subdir-2
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   117
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   118
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   119
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   120
full log
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   121
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   122
  $ hg log -v
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   123
  changeset:   1:aa809156d50d
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   124
  tag:         tip
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   125
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   126
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   127
  files:       bar/bar
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   128
  description:
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   129
  commit-subdir-2
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   130
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   131
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   132
  changeset:   0:f97e73a25882
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   133
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   134
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   135
  files:       foo/foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   136
  description:
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   137
  commit-subdir-1
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   138
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   139
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   140
  $ cd ..
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   141
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   142
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   143
dot and subdir commit test
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   144
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   145
  $ hg init test3
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   146
  $ cd test3
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   147
  $ mkdir foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   148
  $ echo foo content > foo/plain-file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   149
  $ hg add foo/plain-file
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   150
  $ hg ci -m commit-foo-subdir foo
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   151
  $ echo modified foo content > foo/plain-file
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   152
  $ hg ci -m commit-foo-dot .
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   153
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   154
full log
7072
4e0d54fbd34f Show added files as "added" in editor commit message (issue 1330)
Patrick Mezard <pmezard@gmail.com>
parents: 6935
diff changeset
   155
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   156
  $ hg log -v
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   157
  changeset:   1:95b38e3a5b2e
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   158
  tag:         tip
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   159
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   160
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   161
  files:       foo/plain-file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   162
  description:
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   163
  commit-foo-dot
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   164
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   165
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   166
  changeset:   0:65d4e9386227
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   167
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   168
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   169
  files:       foo/plain-file
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   170
  description:
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   171
  commit-foo-subdir
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   172
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   173
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   174
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   175
subdir log
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   176
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   177
  $ cd foo
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   178
  $ hg log .
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   179
  changeset:   1:95b38e3a5b2e
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   180
  tag:         tip
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   181
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   182
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   183
  summary:     commit-foo-dot
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   184
  
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   185
  changeset:   0:65d4e9386227
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   186
  user:        test
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12105
diff changeset
   187
  date:        Thu Jan 01 00:00:00 1970 +0000
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   188
  summary:     commit-foo-subdir
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   189
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   190
  $ cd ..
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   191
  $ cd ..
6386
bae2e9c838e9 Tests for issue 1049
Bryan O'Sullivan <bos@serpentine.com>
parents: 6112
diff changeset
   192
11802
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   193
  $ cd ..
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   194
  $ hg init issue1049
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   195
  $ cd issue1049
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   196
  $ echo a > a
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   197
  $ hg ci -Ama
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   198
  adding a
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   199
  $ echo a >> a
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   200
  $ hg ci -mb
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   201
  $ hg up 0
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   202
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   203
  $ echo b >> a
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   204
  $ hg ci -mc
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   205
  created new head
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   206
  $ HGMERGE=true hg merge
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   207
  merging a
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   208
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   209
  (branch merge, don't forget to commit)
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   210
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   211
should fail because we are specifying a file name
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   212
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   213
  $ hg ci -mmerge a
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   214
  abort: cannot partially commit a merge (do not specify files or patterns)
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   215
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   216
should fail because we are specifying a pattern
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   217
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   218
  $ hg ci -mmerge -I a
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   219
  abort: cannot partially commit a merge (do not specify files or patterns)
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   220
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   221
should succeed
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   222
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   223
  $ hg ci -mmerge
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   224
  $ cd ..
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   225
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   226
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   227
test commit message content
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   228
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   229
  $ hg init commitmsg
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   230
  $ cd commitmsg
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   231
  $ echo changed > changed
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   232
  $ echo removed > removed
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   233
  $ hg ci -qAm init
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   234
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   235
  $ hg rm removed
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   236
  $ echo changed >> changed
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   237
  $ echo added > added
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   238
  $ hg add added
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   239
  $ HGEDITOR=cat hg ci -A
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   240
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   241
  
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   242
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   243
  HG: Leave message empty to abort commit.
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   244
  HG: --
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   245
  HG: user: test
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   246
  HG: branch 'default'
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   247
  HG: added added
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   248
  HG: changed changed
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   249
  HG: removed removed
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   250
  abort: empty commit message
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   251
  $ cd ..
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   252
d26b7cc96bc4 tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8168
diff changeset
   253
  $ exit 0