Mercurial > hg
annotate tests/test-commit.t @ 21434:a264fca9181b
run-tests: teach Test instances whether they are in unittest mode
Tests executing in unittest mode behave a little differently. For
example, they report their results to a TestResult rather than just
printing. This patch paves the way for better integration of Test into
the unittest framework.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Apr 2014 12:19:48 -0700 |
parents | 422981492ace |
children | 5375ba75df40 |
rev | line source |
---|---|
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 |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
9 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
10 $ hg commit -d '0 0' -m commit-1 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
11 $ echo foo >> foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
12 $ hg commit -d '1 4444444' -m commit-3 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
13 abort: impossible time zone offset: 4444444 |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
14 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
15 $ 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
|
16 abort: invalid date: '1\t15.1' |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
17 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
18 $ 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
|
19 abort: invalid date: 'foo bar' |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
20 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
21 $ hg commit -d ' 1 4444' -m commit-6 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
22 $ hg commit -d '111111111111 0' -m commit-7 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
23 abort: date exceeds 32 bits: 111111111111 |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
24 [255] |
13062
e1002cf9fe54
parsedate: abort on negative dates (issue2513)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12399
diff
changeset
|
25 $ hg commit -d '-7654321 3600' -m commit-7 |
e1002cf9fe54
parsedate: abort on negative dates (issue2513)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12399
diff
changeset
|
26 abort: negative date value: -7654321 |
e1002cf9fe54
parsedate: abort on negative dates (issue2513)
Adrian Buehlmann <adrian@cadifra.com>
parents:
12399
diff
changeset
|
27 [255] |
3786
8d603f8567ae
make hg commit <dirname> work again
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3709
diff
changeset
|
28 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
29 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
|
30 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
31 $ echo bar > bar |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
32 $ hg add bar |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
33 $ rm bar |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
34 $ hg commit -m commit-8 |
13899
a7cd0eee396b
commit: note when files are missing
Martin Geisler <mg@aragost.com>
parents:
13447
diff
changeset
|
35 nothing changed (1 missing files, see 'hg status') |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
36 [1] |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
37 $ hg commit -m commit-8-2 bar |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
38 abort: bar: file not found! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
39 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
40 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
41 $ 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
|
42 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
43 $ mkdir dir |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
44 $ echo boo > dir/file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
45 $ hg add |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15441
diff
changeset
|
46 adding dir/file (glob) |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
47 $ hg -v commit -m commit-9 dir |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
48 dir/file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
49 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
|
50 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
51 $ echo > dir.file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
52 $ hg add |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
53 adding dir.file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
54 $ hg commit -m commit-10 dir dir.file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
55 abort: dir: no match under directory! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
56 [255] |
3709
38291d9c8c1c
Expand test-commit to cover one of the recent bugs.
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
1933
diff
changeset
|
57 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
58 $ echo >> dir/file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
59 $ mkdir bleh |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
60 $ mkdir dir2 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
61 $ cd bleh |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
62 $ hg commit -m commit-11 . |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
63 abort: bleh: no match under directory! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
64 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
65 $ hg commit -m commit-12 ../dir ../dir2 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
66 abort: dir2: no match under directory! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
67 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
68 $ hg -v commit -m commit-13 ../dir |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
69 dir/file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
70 committed changeset 3:1cd62a2d8db5 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
71 $ cd .. |
4253
9e3e975258a9
tests: expand test-commit a bit to test 'hg commit .' too
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
3786
diff
changeset
|
72 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
73 $ hg commit -m commit-14 does-not-exist |
15521
117f9190c1ba
tests: hide 'No such file or directory' messages
Mads Kiilerich <mads@kiilerich.com>
parents:
15447
diff
changeset
|
74 abort: does-not-exist: * (glob) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
75 [255] |
16842
a3ea092203a5
tests: introduce c-style conditional sections in .t tests
Mads Kiilerich <mads@kiilerich.com>
parents:
15521
diff
changeset
|
76 |
a3ea092203a5
tests: introduce c-style conditional sections in .t tests
Mads Kiilerich <mads@kiilerich.com>
parents:
15521
diff
changeset
|
77 #if symlink |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
78 $ ln -s foo baz |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
79 $ hg commit -m commit-15 baz |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
80 abort: baz: file not tracked! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
81 [255] |
16842
a3ea092203a5
tests: introduce c-style conditional sections in .t tests
Mads Kiilerich <mads@kiilerich.com>
parents:
15521
diff
changeset
|
82 #endif |
a3ea092203a5
tests: introduce c-style conditional sections in .t tests
Mads Kiilerich <mads@kiilerich.com>
parents:
15521
diff
changeset
|
83 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
84 $ touch quux |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
85 $ hg commit -m commit-16 quux |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
86 abort: quux: file not tracked! |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
87 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
88 $ echo >> dir/file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
89 $ hg -v commit -m commit-17 dir/file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
90 dir/file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
91 committed changeset 4:49176991390e |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
92 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
93 An empty date was interpreted as epoch origin |
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 $ echo foo >> foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
96 $ hg commit -d '' -m commit-no-date |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
97 $ hg tip --template '{date|isodate}\n' | grep '1970' |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
98 [1] |
13447
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
99 |
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
100 Make sure we do not obscure unknown requires file entries (issue2649) |
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
101 |
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
102 $ echo foo >> foo |
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
103 $ echo fake >> .hg/requires |
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
104 $ hg commit -m bla |
20820
f8e531a3a77c
repo: rephrase the "missing requirement" error message
Mads Kiilerich <madski@unity3d.com>
parents:
20773
diff
changeset
|
105 abort: repository requires features unknown to this Mercurial: fake! |
f8e531a3a77c
repo: rephrase the "missing requirement" error message
Mads Kiilerich <madski@unity3d.com>
parents:
20773
diff
changeset
|
106 (see http://mercurial.selenic.com/wiki/MissingRequirement for more information) |
13447
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
107 [255] |
931a72e00efa
introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents:
13062
diff
changeset
|
108 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
109 $ cd .. |
7072
4e0d54fbd34f
Show added files as "added" in editor commit message (issue 1330)
Patrick Mezard <pmezard@gmail.com>
parents:
6935
diff
changeset
|
110 |
4e0d54fbd34f
Show added files as "added" in editor commit message (issue 1330)
Patrick Mezard <pmezard@gmail.com>
parents:
6935
diff
changeset
|
111 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
112 partial subdir commit test |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
113 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
114 $ hg init test2 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
115 $ cd test2 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
116 $ mkdir foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
117 $ echo foo > foo/foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
118 $ mkdir bar |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
119 $ echo bar > bar/bar |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
120 $ hg add |
15447
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15441
diff
changeset
|
121 adding bar/bar (glob) |
9910f60a37ee
tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents:
15441
diff
changeset
|
122 adding foo/foo (glob) |
21021
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
123 $ HGEDITOR=cat hg ci -e -m commit-subdir-1 foo |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
124 commit-subdir-1 |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
125 |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
126 |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
127 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
128 HG: Leave message empty to abort commit. |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
129 HG: -- |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
130 HG: user: test |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
131 HG: branch 'default' |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
132 HG: added foo/foo |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
133 |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
134 |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
135 $ hg ci -m commit-subdir-2 bar |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
136 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
137 subdir log 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 $ hg log -v foo |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
140 changeset: 0:f97e73a25882 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
141 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
142 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
|
143 files: foo/foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
144 description: |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
145 commit-subdir-1 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
146 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
147 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
148 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
149 subdir log 2 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
150 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
151 $ hg log -v bar |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
152 changeset: 1:aa809156d50d |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
153 tag: tip |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
154 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
155 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
|
156 files: bar/bar |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
157 description: |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
158 commit-subdir-2 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
159 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
160 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
161 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
162 full log |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
163 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
164 $ hg log -v |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
165 changeset: 1:aa809156d50d |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
166 tag: tip |
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: bar/bar |
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-subdir-2 |
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 |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
174 changeset: 0:f97e73a25882 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
175 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
176 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
|
177 files: foo/foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
178 description: |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
179 commit-subdir-1 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
180 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
181 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
182 $ cd .. |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
183 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
184 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
185 dot and subdir commit test |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
186 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
187 $ hg init test3 |
21021
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
188 $ echo commit-foo-subdir > commit-log-test |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
189 $ cd test3 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
190 $ mkdir foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
191 $ echo foo content > foo/plain-file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
192 $ hg add foo/plain-file |
21021
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
193 $ HGEDITOR=cat hg ci --edit -l ../commit-log-test foo |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
194 commit-foo-subdir |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
195 |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
196 |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
197 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
198 HG: Leave message empty to abort commit. |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
199 HG: -- |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
200 HG: user: test |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
201 HG: branch 'default' |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
202 HG: added foo/plain-file |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
203 |
422981492ace
commit: --edit/-e to force edit of otherwise-supplied commit message
"Bradley M. Kuhn" <bkuhn@ebb.org>
parents:
20860
diff
changeset
|
204 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
205 $ echo modified foo content > foo/plain-file |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
206 $ hg ci -m commit-foo-dot . |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
207 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
208 full log |
7072
4e0d54fbd34f
Show added files as "added" in editor commit message (issue 1330)
Patrick Mezard <pmezard@gmail.com>
parents:
6935
diff
changeset
|
209 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
210 $ hg log -v |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
211 changeset: 1:95b38e3a5b2e |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
212 tag: tip |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
213 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
214 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
|
215 files: foo/plain-file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
216 description: |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
217 commit-foo-dot |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
218 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
219 |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
220 changeset: 0:65d4e9386227 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
221 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
222 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
|
223 files: foo/plain-file |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
224 description: |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
225 commit-foo-subdir |
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 |
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 subdir log |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
230 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
231 $ cd foo |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
232 $ hg log . |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
233 changeset: 1:95b38e3a5b2e |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
234 tag: tip |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
235 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
236 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
|
237 summary: commit-foo-dot |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
238 |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
239 changeset: 0:65d4e9386227 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
240 user: test |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
12105
diff
changeset
|
241 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
|
242 summary: commit-foo-subdir |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
243 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
244 $ cd .. |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
245 $ cd .. |
6386
bae2e9c838e9
Tests for issue 1049
Bryan O'Sullivan <bos@serpentine.com>
parents:
6112
diff
changeset
|
246 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12327
diff
changeset
|
247 Issue1049: Hg permits partial commit of merge without warning |
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12327
diff
changeset
|
248 |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
249 $ hg init issue1049 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
250 $ cd issue1049 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
251 $ echo a > a |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
252 $ hg ci -Ama |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
253 adding a |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
254 $ echo a >> a |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
255 $ hg ci -mb |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
256 $ hg up 0 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
257 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
|
258 $ echo b >> a |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
259 $ hg ci -mc |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
260 created new head |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
261 $ HGMERGE=true hg merge |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
262 merging a |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
263 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
|
264 (branch merge, don't forget to commit) |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
265 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
266 should fail because we are specifying a file name |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
267 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
268 $ hg ci -mmerge a |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
269 abort: cannot partially commit a merge (do not specify files or patterns) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
270 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
271 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
272 should fail because we are specifying a pattern |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
273 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
274 $ hg ci -mmerge -I a |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
275 abort: cannot partially commit a merge (do not specify files or patterns) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
276 [255] |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
277 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
278 should succeed |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
279 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
280 $ hg ci -mmerge |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
281 $ cd .. |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
282 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
283 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
284 test commit message content |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
285 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
286 $ hg init commitmsg |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
287 $ cd commitmsg |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
288 $ echo changed > changed |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
289 $ echo removed > removed |
18538
94317c2d53b8
commit: show active bookmark in commit editor helper text
Antonio Zanardo <zanardo@gmail.com>
parents:
17132
diff
changeset
|
290 $ hg book currentbookmark |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
291 $ hg ci -qAm init |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
292 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
293 $ hg rm removed |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
294 $ echo changed >> changed |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
295 $ echo added > added |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
296 $ hg add added |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
297 $ HGEDITOR=cat hg ci -A |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
298 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
299 |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
300 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
|
301 HG: Leave message empty to abort commit. |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
302 HG: -- |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
303 HG: user: test |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
304 HG: branch 'default' |
18538
94317c2d53b8
commit: show active bookmark in commit editor helper text
Antonio Zanardo <zanardo@gmail.com>
parents:
17132
diff
changeset
|
305 HG: bookmark 'currentbookmark' |
11802
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
306 HG: added added |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
307 HG: changed changed |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
308 HG: removed removed |
d26b7cc96bc4
tests: unify test-commit
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
8168
diff
changeset
|
309 abort: empty commit message |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12156
diff
changeset
|
310 [255] |
20765
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
311 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
312 test saving last-message.txt |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
313 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
314 $ hg init sub |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
315 $ echo a > sub/a |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
316 $ hg -R sub add sub/a |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
317 $ cat > sub/.hg/hgrc <<EOF |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
318 > [hooks] |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
319 > precommit.test-saving-last-message = false |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
320 > EOF |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
321 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
322 $ echo 'sub = sub' > .hgsub |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
323 $ hg add .hgsub |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
324 |
20859
e259d4c462b5
tests: use TESTTMP instead of TESTDIR
Sean Farley <sean.michael.farley@gmail.com>
parents:
20765
diff
changeset
|
325 $ cat > $TESTTMP/editor.sh <<EOF |
20765
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
326 > echo "==== before editing:" |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
327 > cat \$1 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
328 > echo "====" |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
329 > echo "test saving last-message.txt" >> \$1 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
330 > EOF |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
331 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
332 $ rm -f .hg/last-message.txt |
20859
e259d4c462b5
tests: use TESTTMP instead of TESTDIR
Sean Farley <sean.michael.farley@gmail.com>
parents:
20765
diff
changeset
|
333 $ HGEDITOR="sh $TESTTMP/editor.sh" hg commit -S -q |
20765
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
334 ==== before editing: |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
335 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
336 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
337 HG: Enter commit message. Lines beginning with 'HG:' are removed. |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
338 HG: Leave message empty to abort commit. |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
339 HG: -- |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
340 HG: user: test |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
341 HG: branch 'default' |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
342 HG: bookmark 'currentbookmark' |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
343 HG: subrepo sub |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
344 HG: added .hgsub |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
345 HG: added added |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
346 HG: changed .hgsubstate |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
347 HG: changed changed |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
348 HG: removed removed |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
349 ==== |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
350 abort: precommit.test-saving-last-message hook exited with status 1 (in subrepo sub) |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
351 [255] |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
352 $ cat .hg/last-message.txt |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
353 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
354 |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
355 test saving last-message.txt |
f042d4b263f4
localrepo: save manually edited commit message as soon as possible
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18538
diff
changeset
|
356 |
16849
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
357 $ cd .. |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
358 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
359 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
360 commit copy |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
361 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
362 $ hg init dir2 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
363 $ cd dir2 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
364 $ echo bleh > bar |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
365 $ hg add bar |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
366 $ hg ci -m 'add bar' |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
367 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
368 $ hg cp bar foo |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
369 $ echo >> bar |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
370 $ hg ci -m 'cp bar foo; change bar' |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
371 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
372 $ hg debugrename foo |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
373 foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9 |
928ee57e3aae
tests: roll test-commit-copy.t into test-commit.t
Adrian Buehlmann <adrian@cadifra.com>
parents:
16842
diff
changeset
|
374 $ hg debugindex bar |
17132
b87acfda5268
tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents:
16958
diff
changeset
|
375 rev offset length ..... linkrev nodeid p1 p2 (re) |
b87acfda5268
tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents:
16958
diff
changeset
|
376 0 0 6 ..... 0 26d3ca0dfd18 000000000000 000000000000 (re) |
b87acfda5268
tests: reduce spurious failures when run with generaldelta
Bryan O'Sullivan <bryano@fb.com>
parents:
16958
diff
changeset
|
377 1 6 7 ..... 1 d267bddd54f7 26d3ca0dfd18 000000000000 (re) |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16896
diff
changeset
|
378 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16896
diff
changeset
|
379 $ cd .. |