annotate tests/test-commit-interactive.t @ 25476:46727fea7a00

tests: simplify calls to dummyssh dummyssh is marked executable and is in the path, no need for python, TESTDIR, or quotes.
author Matt Mackall <mpm@selenic.com>
date Mon, 08 Jun 2015 15:02:49 -0500
parents 6084926366b9
children fb04372d7b38
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
1 Set up a repo
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
3 $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
4 > [ui]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
5 > interactive = true
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
6 > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
7 > record =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
8 > EOF
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
10 $ hg init a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
11 $ cd a
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
13 Select no files
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
14
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
15 $ touch empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
16 $ hg add empty-rw
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
17
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
18 $ hg commit -i empty-rw<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
19 > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
20 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
21 diff --git a/empty-rw b/empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
22 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
23 examine changes to 'empty-rw'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
24
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
25 no changes to record
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
26
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
27 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
28 changeset: -1:000000000000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
29 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
30 user:
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
31 date: Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
32
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
33
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
34
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
35 Select files but no hunks
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
36
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
37 $ hg commit -i empty-rw<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
38 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
39 > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
40 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
41 diff --git a/empty-rw b/empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
42 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
43 examine changes to 'empty-rw'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
44
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
45 abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
46 [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
47
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
48 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
49 changeset: -1:000000000000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
50 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
51 user:
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
52 date: Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
53
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
54
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
55
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
56 Record empty file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
57
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
58 $ hg commit -i -d '0 0' -m empty empty-rw<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
59 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
60 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
61 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
62 diff --git a/empty-rw b/empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
63 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
64 examine changes to 'empty-rw'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
65
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
66
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
67 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
68 changeset: 0:c0708cf4e46e
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
69 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
70 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
71 date: Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
72 summary: empty
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
73
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
74
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
75
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
76 Summary shows we updated to the new cset
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
77
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
78 $ hg summary
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
79 parent: 0:c0708cf4e46e tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
80 empty
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
81 branch: default
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
82 commit: (clean)
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
83 update: (current)
25382
6084926366b9 summary: move the parents phase marker to commit line (issue4688)
Gilles Moris <gilles.moris@free.fr>
parents: 25111
diff changeset
84 phases: 1 draft
10964
aa0426c79664 test-record: add hg summary to verify we update dirstate
Augie Fackler <durin42@gmail.com>
parents: 8811
diff changeset
85
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
86 Rename empty file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
87
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
88 $ hg mv empty-rw empty-rename
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
89 $ hg commit -i -d '1 0' -m rename<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
90 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
91 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
92 diff --git a/empty-rw b/empty-rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
93 rename from empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
94 rename to empty-rename
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
95 examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
96
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
97
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
98 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
99 changeset: 1:d695e8dcb197
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
100 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
101 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
102 date: Thu Jan 01 00:00:01 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
103 summary: rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
104
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
105
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
106
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
107 Copy empty file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
108
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
109 $ hg cp empty-rename empty-copy
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
110 $ hg commit -i -d '2 0' -m copy<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
111 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
112 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
113 diff --git a/empty-rename b/empty-copy
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
114 copy from empty-rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
115 copy to empty-copy
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
116 examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
117
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
118
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
119 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
120 changeset: 2:1d4b90bea524
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
121 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
122 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
123 date: Thu Jan 01 00:00:02 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
124 summary: copy
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
125
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
126
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
127
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
128 Delete empty file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
129
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
130 $ hg rm empty-copy
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
131 $ hg commit -i -d '3 0' -m delete<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
132 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
133 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
134 diff --git a/empty-copy b/empty-copy
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
135 deleted file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
136 examine changes to 'empty-copy'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
137
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
138
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
139 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
140 changeset: 3:b39a238f01a1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
141 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
142 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
143 date: Thu Jan 01 00:00:03 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
144 summary: delete
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
145
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
146
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
147
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
148 Add binary file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
149
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
150 $ hg bundle --base -2 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
151 1 changesets found
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
152 $ hg add tip.bundle
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
153 $ hg commit -i -d '4 0' -m binary<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
154 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
155 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
156 diff --git a/tip.bundle b/tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
157 new file mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
158 this is a binary file
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
159 examine changes to 'tip.bundle'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
160
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
161
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
162 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
163 changeset: 4:ad816da3711e
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
164 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
165 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
166 date: Thu Jan 01 00:00:04 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
167 summary: binary
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
168
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
169 diff -r b39a238f01a1 -r ad816da3711e tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
170 Binary file tip.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
171
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
172
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
173 Change binary file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
174
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
175 $ hg bundle --base -2 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
176 1 changesets found
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
177 $ hg commit -i -d '5 0' -m binary-change<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
178 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
179 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
180 diff --git a/tip.bundle b/tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
181 this modifies a binary file (all or nothing)
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
182 examine changes to 'tip.bundle'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
183
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
184
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
185 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
186 changeset: 5:dccd6f3eb485
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
187 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
188 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
189 date: Thu Jan 01 00:00:05 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
190 summary: binary-change
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
191
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
192 diff -r ad816da3711e -r dccd6f3eb485 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
193 Binary file tip.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
194
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
195
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
196 Rename and change binary file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
197
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
198 $ hg mv tip.bundle top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
199 $ hg bundle --base -2 top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
200 1 changesets found
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
201 $ hg commit -i -d '6 0' -m binary-change-rename<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
202 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
203 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
204 diff --git a/tip.bundle b/top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
205 rename from tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
206 rename to top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
207 this modifies a binary file (all or nothing)
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
208 examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
209
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
210
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
211 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
212 changeset: 6:7fa44105f5b3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
213 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
214 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
215 date: Thu Jan 01 00:00:06 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
216 summary: binary-change-rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
217
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
218 diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
219 Binary file tip.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
220 diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
221 Binary file top.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
222
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
223
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
224 Add plain file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
225
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
226 $ for i in 1 2 3 4 5 6 7 8 9 10; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
227 > echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
228 > done
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
229
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
230 $ hg add plain
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
231 $ hg commit -i -d '7 0' -m plain plain<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
232 > y
24845
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
233 > y
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
234 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
235 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
236 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
237 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
238
24845
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
239 @@ -0,0 +1,10 @@
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
240 +1
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
241 +2
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
242 +3
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
243 +4
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
244 +5
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
245 +6
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
246 +7
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
247 +8
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
248 +9
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
249 +10
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
250 record this change to 'plain'? [Ynesfdaq?] y
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
251
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
252 $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
253 changeset: 7:11fb457c1be4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
254 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
255 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
256 date: Thu Jan 01 00:00:07 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
257 summary: plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
258
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
259 diff -r 7fa44105f5b3 -r 11fb457c1be4 plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
260 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
261 +++ b/plain Thu Jan 01 00:00:07 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
262 @@ -0,0 +1,10 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
263 +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
264 +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
265 +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
266 +4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
267 +5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
268 +6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
269 +7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
270 +8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
271 +9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
272 +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
273
17446
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
274 Modify end of plain file with username unset
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
275
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
276 $ echo 11 >> plain
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
277 $ unset HGUSER
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
278 $ hg commit -i --config ui.username= -d '8 0' -m end plain
20579
625533523c9e tests: fix up config --edit breakage
Matt Mackall <mpm@selenic.com>
parents: 20266
diff changeset
279 abort: no username supplied
20580
b75a23eec9c9 ui: fix extra space in username abort
Matt Mackall <mpm@selenic.com>
parents: 20579
diff changeset
280 (use "hg config --edit" to set your username)
17446
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
281 [255]
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
282
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
283
18266
09a2b6741695 record: use patch.diffopts to account for user diffopts
Denis Laxalde <denis@laxalde.org>
parents: 17446
diff changeset
284 Modify end of plain file, also test that diffopts are accounted for
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
285
17446
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
286 $ HGUSER="test"
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
287 $ export HGUSER
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
288 $ hg commit -i --config diff.showfunc=true -d '8 0' -m end plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
289 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
290 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
291 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
292 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
293 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
294 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
295
18266
09a2b6741695 record: use patch.diffopts to account for user diffopts
Denis Laxalde <denis@laxalde.org>
parents: 17446
diff changeset
296 @@ -8,3 +8,4 @@ 7
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
297 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
298 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
299 10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
300 +11
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
301 record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
302
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
303
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
304 Modify end of plain file, no EOL
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
305
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
306 $ hg tip --template '{node}' >> plain
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
307 $ hg commit -i -d '9 0' -m noeol plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
308 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
309 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
310 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
311 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
312 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
313 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
314
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
315 @@ -9,3 +9,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
316 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
317 10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
318 11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
319 +7264f99c5f5ff3261504828afa4fb4d406c3af54
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
320 \ No newline at end of file
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
321 record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
322
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
323
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
324 Modify end of plain file, add EOL
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
325
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
326 $ echo >> plain
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
327 $ echo 1 > plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
328 $ hg add plain2
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
329 $ hg commit -i -d '10 0' -m eol plain plain2 <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
330 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
331 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
332 > y
24845
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
333 > y
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
334 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
335 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
336 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
337 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
338
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
339 @@ -9,4 +9,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
340 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
341 10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
342 11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
343 -7264f99c5f5ff3261504828afa4fb4d406c3af54
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
344 \ No newline at end of file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
345 +7264f99c5f5ff3261504828afa4fb4d406c3af54
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
346 record change 1/2 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
347
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
348 diff --git a/plain2 b/plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
349 new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
350 examine changes to 'plain2'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
351
24845
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
352 @@ -0,0 +1,1 @@
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
353 +1
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
354 record change 2/2 to 'plain2'? [Ynesfdaq?] y
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
355
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
356 Modify beginning, trim end, record both, add another file to test
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
357 changes numbering
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
358
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
359 $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
360 $ for i in 2 2 3 4 5 6 7 8 9 10; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
361 > echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
362 > done
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
363 $ echo 2 >> plain2
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
364
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
365 $ hg commit -i -d '10 0' -m begin-and-end plain plain2 <<EOF
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
366 > y
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
367 > y
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
368 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
369 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
370 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
371 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
372 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
373 2 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
374 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
375
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
376 @@ -1,4 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
377 -1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
378 +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
379 2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
380 3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
381 4
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
382 record change 1/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
383
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
384 @@ -8,5 +8,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
385 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
386 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
387 10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
388 -11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
389 -7264f99c5f5ff3261504828afa4fb4d406c3af54
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
390 record change 2/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
391
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
392 diff --git a/plain2 b/plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
393 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
394 examine changes to 'plain2'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
395
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
396 @@ -1,1 +1,2 @@
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
397 1
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
398 +2
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
399 record change 3/3 to 'plain2'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
400
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
401
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
402 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
403 changeset: 11:21df83db12b8
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
404 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
405 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
406 date: Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
407 summary: begin-and-end
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
408
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
409 diff -r ddb8b281c3ff -r 21df83db12b8 plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
410 --- a/plain Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
411 +++ b/plain Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
412 @@ -1,4 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
413 -1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
414 +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
415 2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
416 3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
417 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
418 @@ -8,5 +8,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
419 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
420 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
421 10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
422 -11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
423 -7264f99c5f5ff3261504828afa4fb4d406c3af54
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
424 diff -r ddb8b281c3ff -r 21df83db12b8 plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
425 --- a/plain2 Thu Jan 01 00:00:10 1970 +0000
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
426 +++ b/plain2 Thu Jan 01 00:00:10 1970 +0000
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
427 @@ -1,1 +1,2 @@
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
428 1
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
429 +2
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
430
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
431
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
432 Trim beginning, modify end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
433
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
434 $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
435 > for i in 4 5 6 7 8 9 10.new; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
436 > echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
437 > done
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
438
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
439 Record end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
440
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
441 $ hg commit -i -d '11 0' -m end-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
442 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
443 > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
444 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
445 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
446 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
447 2 hunks, 4 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
448 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
449
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
450 @@ -1,9 +1,6 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
451 -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
452 -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
453 -3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
454 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
455 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
456 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
457 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
458 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
459 9
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
460 record change 1/2 to 'plain'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
461
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
462 @@ -4,7 +1,7 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
463 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
464 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
465 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
466 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
467 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
468 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
469 -10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
470 +10.new
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
471 record change 2/2 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
472
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
473
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
474 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
475 changeset: 12:99337501826f
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
476 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
477 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
478 date: Thu Jan 01 00:00:11 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
479 summary: end-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
480
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
481 diff -r 21df83db12b8 -r 99337501826f plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
482 --- a/plain Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
483 +++ b/plain Thu Jan 01 00:00:11 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
484 @@ -7,4 +7,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
485 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
486 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
487 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
488 -10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
489 +10.new
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
490
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
491
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
492 Record beginning
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
493
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
494 $ hg commit -i -d '12 0' -m begin-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
495 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
496 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
497 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
498 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
499 1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
500 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
501
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
502 @@ -1,6 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
503 -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
504 -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
505 -3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
506 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
507 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
508 6
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
509 record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
510
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
511
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
512 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
513 changeset: 13:bbd45465d540
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
514 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
515 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
516 date: Thu Jan 01 00:00:12 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
517 summary: begin-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
518
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
519 diff -r 99337501826f -r bbd45465d540 plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
520 --- a/plain Thu Jan 01 00:00:11 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
521 +++ b/plain Thu Jan 01 00:00:12 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
522 @@ -1,6 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
523 -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
524 -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
525 -3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
526 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
527 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
528 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
529
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
530
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
531 Add to beginning, trim from end
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
532
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
533 $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
534 $ for i in 1 2 3 4 5 6 7 8 9; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
535 > echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
536 > done
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
537
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
538 Record end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
539
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
540 $ hg commit -i --traceback -d '13 0' -m end-again plain<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
541 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
542 > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
543 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
544 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
545 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
546 2 hunks, 4 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
547 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
548
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
549 @@ -1,6 +1,9 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
550 +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
551 +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
552 +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
553 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
554 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
555 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
556 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
557 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
558 9
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
559 record change 1/2 to 'plain'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
560
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
561 @@ -1,7 +4,6 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
562 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
563 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
564 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
565 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
566 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
567 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
568 -10.new
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
569 record change 2/2 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
570
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
571
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
572 Add to beginning, middle, end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
573
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
574 $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
575 $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
576 > echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
577 > done
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
578
23435
486a1fe09422 record: don't honor format-changing diffopts (issue4459)
Siddharth Agarwal <sid0@fb.com>
parents: 23172
diff changeset
579 Record beginning, middle, and test that format-breaking diffopts are ignored
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
580
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
581 $ hg commit -i --config diff.noprefix=True -d '14 0' -m middle-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
582 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
583 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
584 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
585 > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
586 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
587 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
588 3 hunks, 7 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
589 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
590
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
591 @@ -1,2 +1,5 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
592 +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
593 +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
594 +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
595 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
596 5
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
597 record change 1/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
598
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
599 @@ -1,6 +4,8 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
600 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
601 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
602 +5.new
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
603 +5.reallynew
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
604 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
605 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
606 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
607 9
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
608 record change 2/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
609
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
610 @@ -3,4 +8,6 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
611 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
612 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
613 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
614 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
615 +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
616 +11
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
617 record change 3/3 to 'plain'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
618
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
619
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
620 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
621 changeset: 15:f34a7937ec33
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
622 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
623 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
624 date: Thu Jan 01 00:00:14 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
625 summary: middle-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
626
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
627 diff -r 82c065d0b850 -r f34a7937ec33 plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
628 --- a/plain Thu Jan 01 00:00:13 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
629 +++ b/plain Thu Jan 01 00:00:14 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
630 @@ -1,5 +1,10 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
631 +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
632 +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
633 +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
634 4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
635 5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
636 +5.new
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
637 +5.reallynew
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
638 6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
639 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
640 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
641
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
642
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
643 Record end
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
644
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
645 $ hg commit -i -d '15 0' -m end-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
646 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
647 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
648 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
649 diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
650 1 hunks, 2 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
651 examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
652
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
653 @@ -9,3 +9,5 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
654 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
655 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
656 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
657 +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
658 +11
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
659 record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
660
5128
c9126c24e098 record: work properly if invoked in a subdirectory
Bryan O'Sullivan <bos@serpentine.com>
parents: 5037
diff changeset
661
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
662 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
663 changeset: 16:f9900b71a04c
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
664 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
665 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
666 date: Thu Jan 01 00:00:15 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
667 summary: end-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
668
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
669 diff -r f34a7937ec33 -r f9900b71a04c plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
670 --- a/plain Thu Jan 01 00:00:14 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
671 +++ b/plain Thu Jan 01 00:00:15 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
672 @@ -9,3 +9,5 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
673 7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
674 8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
675 9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
676 +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
677 +11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
678
5128
c9126c24e098 record: work properly if invoked in a subdirectory
Bryan O'Sullivan <bos@serpentine.com>
parents: 5037
diff changeset
679
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
680 $ mkdir subdir
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
681 $ cd subdir
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
682 $ echo a > a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
683 $ hg ci -d '16 0' -Amsubdir
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
684 adding subdir/a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
685
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
686 $ echo a >> a
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
687 $ hg commit -i -d '16 0' -m subdir-change a <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
688 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
689 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
690 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
691 diff --git a/subdir/a b/subdir/a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
692 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
693 examine changes to 'subdir/a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
694
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
695 @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
696 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
697 +a
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
698 record this change to 'subdir/a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
699
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
700
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
701 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
702 changeset: 18:61be427a9deb
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
703 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
704 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
705 date: Thu Jan 01 00:00:16 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
706 summary: subdir-change
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
707
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
708 diff -r a7ffae4d61cb -r 61be427a9deb subdir/a
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
709 --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
710 +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
711 @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
712 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
713 +a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
714
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
715
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
716 $ echo a > f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
717 $ echo b > f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
718 $ hg add f1 f2
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
719
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
720 $ hg ci -mz -d '17 0'
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
721
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
722 $ echo a >> f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
723 $ echo b >> f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
724
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
725 Help, quit
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
726
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
727 $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
728 > ?
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
729 > q
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
730 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
731 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
732 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
733 examine changes to 'subdir/f1'? [Ynesfdaq?] ?
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
734
20266
061766323061 record: use "ui.extractchoices()" to get the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20171
diff changeset
735 y - yes, record this change
061766323061 record: use "ui.extractchoices()" to get the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20171
diff changeset
736 n - no, skip this change
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
737 e - edit this change manually
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
738 s - skip remaining changes to this file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
739 f - record remaining changes to this file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
740 d - done, skip remaining changes and files
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
741 a - record all changes to all remaining files
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
742 q - quit, recording no changes
20266
061766323061 record: use "ui.extractchoices()" to get the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20171
diff changeset
743 ? - ? (display help)
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
744 examine changes to 'subdir/f1'? [Ynesfdaq?] q
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
745
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
746 abort: user quit
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
747 [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
748
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
749 Skip
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
750
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
751 $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
752 > s
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
753 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
754 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
755 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
756 examine changes to 'subdir/f1'? [Ynesfdaq?] s
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
757
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
758 diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
759 1 hunks, 1 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
760 examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
761 [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
762
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
763 No
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
764
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
765 $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
766 > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
767 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
768 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
769 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
770 examine changes to 'subdir/f1'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
771
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
772 diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
773 1 hunks, 1 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
774 examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
775 [255]
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
776
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
777 f, quit
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
778
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
779 $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
780 > f
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
781 > q
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
782 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
783 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
784 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
785 examine changes to 'subdir/f1'? [Ynesfdaq?] f
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
786
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
787 diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
788 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
789 examine changes to 'subdir/f2'? [Ynesfdaq?] q
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
790
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
791 abort: user quit
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
792 [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
793
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
794 s, all
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
795
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
796 $ hg commit -i -d '18 0' -mx <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
797 > s
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
798 > a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
799 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
800 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
801 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
802 examine changes to 'subdir/f1'? [Ynesfdaq?] s
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
803
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
804 diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
805 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
806 examine changes to 'subdir/f2'? [Ynesfdaq?] a
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
807
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
808
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
809 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
810 changeset: 20:b3df3dda369a
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
811 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
812 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
813 date: Thu Jan 01 00:00:18 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
814 summary: x
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
815
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
816 diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
817 --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
818 +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
819 @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
820 b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
821 +b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
822
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
823
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
824 f
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
825
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
826 $ hg commit -i -d '19 0' -my <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
827 > f
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
828 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
829 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
830 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
831 examine changes to 'subdir/f1'? [Ynesfdaq?] f
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
832
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
833
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
834 $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
835 changeset: 21:38ec577f126b
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
836 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
837 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
838 date: Thu Jan 01 00:00:19 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
839 summary: y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
840
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
841 diff -r b3df3dda369a -r 38ec577f126b subdir/f1
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
842 --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
843 +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
844 @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
845 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
846 +a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
847
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
848
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
849 #if execbit
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
850
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
851 Preserve chmod +x
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
852
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
853 $ chmod +x f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
854 $ echo a >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
855 $ hg commit -i -d '20 0' -mz <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
856 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
857 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
858 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
859 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
860 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
861 old mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
862 new mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
863 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
864 examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
865
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
866 @@ -1,2 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
867 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
868 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
869 +a
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
870 record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
871
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
872
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
873 $ hg tip --config diff.git=True -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
874 changeset: 22:3261adceb075
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
875 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
876 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
877 date: Thu Jan 01 00:00:20 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
878 summary: z
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
879
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
880 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
881 old mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
882 new mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
883 --- a/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
884 +++ b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
885 @@ -1,2 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
886 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
887 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
888 +a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
889
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
890
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
891 Preserve execute permission on original
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
892
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
893 $ echo b >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
894 $ hg commit -i -d '21 0' -maa <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
895 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
896 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
897 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
898 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
899 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
900 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
901 examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
902
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
903 @@ -1,3 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
904 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
905 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
906 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
907 +b
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
908 record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
909
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
910
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
911 $ hg tip --config diff.git=True -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
912 changeset: 23:b429867550db
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
913 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
914 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
915 date: Thu Jan 01 00:00:21 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
916 summary: aa
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
917
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
918 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
919 --- a/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
920 +++ b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
921 @@ -1,3 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
922 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
923 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
924 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
925 +b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
926
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
927
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
928 Preserve chmod -x
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
929
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
930 $ chmod -x f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
931 $ echo c >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
932 $ hg commit -i -d '22 0' -mab <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
933 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
934 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
935 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
936 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
937 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
938 old mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
939 new mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
940 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
941 examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
942
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
943 @@ -2,3 +2,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
944 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
945 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
946 b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
947 +c
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
948 record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
949
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents: 7718
diff changeset
950
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
951 $ hg tip --config diff.git=True -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
952 changeset: 24:0b082130c20a
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
953 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
954 user: test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
955 date: Thu Jan 01 00:00:22 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
956 summary: ab
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
957
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
958 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
959 old mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
960 new mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
961 --- a/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
962 +++ b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
963 @@ -2,3 +2,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
964 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
965 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
966 b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
967 +c
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
968
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
969
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
970 #else
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
971
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
972 Slightly bogus tests to get almost same repo structure as when x bit is used
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
973 - but with different hashes.
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
974
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
975 Mock "Preserve chmod +x"
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
976
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
977 $ echo a >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
978 $ hg commit -i -d '20 0' -mz <<EOF
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
979 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
980 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
981 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
982 > EOF
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
983 diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
984 1 hunks, 1 lines changed
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
985 examine changes to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
986
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
987 @@ -1,2 +1,3 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
988 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
989 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
990 +a
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
991 record this change to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
992
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
993
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
994 $ hg tip --config diff.git=True -p
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
995 changeset: 22:0d463bd428f5
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
996 tag: tip
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
997 user: test
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
998 date: Thu Jan 01 00:00:20 1970 +0000
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
999 summary: z
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1000
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1001 diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1002 --- a/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1003 +++ b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1004 @@ -1,2 +1,3 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1005 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1006 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1007 +a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1008
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1009
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1010 Mock "Preserve execute permission on original"
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1011
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1012 $ echo b >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1013 $ hg commit -i -d '21 0' -maa <<EOF
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1014 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1015 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1016 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1017 > EOF
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1018 diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1019 1 hunks, 1 lines changed
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1020 examine changes to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1021
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1022 @@ -1,3 +1,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1023 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1024 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1025 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1026 +b
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1027 record this change to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1028
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1029
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1030 $ hg tip --config diff.git=True -p
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1031 changeset: 23:0eab41a3e524
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1032 tag: tip
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1033 user: test
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1034 date: Thu Jan 01 00:00:21 1970 +0000
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1035 summary: aa
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1036
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1037 diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1038 --- a/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1039 +++ b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1040 @@ -1,3 +1,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1041 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1042 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1043 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1044 +b
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1045
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1046
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1047 Mock "Preserve chmod -x"
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1048
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1049 $ chmod -x f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1050 $ echo c >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1051 $ hg commit -i -d '22 0' -mab <<EOF
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1052 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1053 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1054 > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1055 > EOF
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1056 diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1057 1 hunks, 1 lines changed
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1058 examine changes to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1059
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1060 @@ -2,3 +2,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1061 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1062 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1063 b
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1064 +c
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1065 record this change to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
1066
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1067
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1068 $ hg tip --config diff.git=True -p
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1069 changeset: 24:f4f718f27b7c
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1070 tag: tip
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1071 user: test
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1072 date: Thu Jan 01 00:00:22 1970 +0000
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1073 summary: ab
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1074
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1075 diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1076 --- a/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1077 +++ b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1078 @@ -2,3 +2,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1079 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1080 a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1081 b
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1082 +c
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1083
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1084
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1085 #endif
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1086
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1087 $ cd ..
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1088
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1089
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1090 Abort early when a merge is in progress
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1091
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1092 $ hg up 4
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
1093 1 files updated, 0 files merged, 6 files removed, 0 files unresolved
11237
feb2a58fc592 record: check that we are not committing a merge before patch selection
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8811
diff changeset
1094
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1095 $ touch iwillmergethat
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1096 $ hg add iwillmergethat
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1097
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1098 $ hg branch thatbranch
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1099 marked working directory as branch thatbranch
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 13295
diff changeset
1100 (branches are permanent and global, did you want a bookmark?)
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1101
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1102 $ hg ci -m'new head'
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1103
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1104 $ hg up default
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
1105 6 files updated, 0 files merged, 2 files removed, 0 files unresolved
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1106
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1107 $ hg merge thatbranch
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1109 (branch merge, don't forget to commit)
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1110
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1111 $ hg commit -i -m'will abort'
13023
3e2281b85990 record: quote command in use hg commit message
timeless <timeless@gmail.com>
parents: 12843
diff changeset
1112 abort: cannot partially commit a merge (use "hg commit" instead)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
1113 [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1114
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1115 $ hg up -C
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1116 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1117
18954
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
1118 Editing patch (and ignoring trailing text)
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1119
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16899
diff changeset
1120 $ cat > editor.sh << '__EOF__'
19080
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
1121 > sed -e 7d -e '5s/^-/ /' -e '/^# ---/i\
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
1122 > trailing\nditto' "$1" > tmp
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
1123 > mv tmp "$1"
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1124 > __EOF__
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1125 $ cat > editedfile << '__EOF__'
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1126 > This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1127 > This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1128 > This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1129 > __EOF__
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1130 $ hg add editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1131 $ hg commit -medit-patch-1
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1132 $ cat > editedfile << '__EOF__'
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1133 > This line has changed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1134 > This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1135 > This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1136 > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1137 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -d '23 0' -medit-patch-2 <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1138 > y
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1139 > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1140 > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1141 diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1142 1 hunks, 2 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1143 examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1144
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1145 @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1146 -This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1147 -This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1148 +This line has changed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1149 +This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1150 This is the third line
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1151 record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1152
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1153 $ cat editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1154 This line has changed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1155 This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1156 This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1157 $ hg cat -r tip editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1158 This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1159 This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1160 This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1161 $ hg revert editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1162
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1163 Trying to edit patch for whole file
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1164
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1165 $ echo "This is the fourth line" >> editedfile
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1166 $ hg commit -i <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1167 > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1168 > q
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1169 > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1170 diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1171 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1172 examine changes to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1173
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1174 cannot edit patch for whole file
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1175 examine changes to 'editedfile'? [Ynesfdaq?] q
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1176
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1177 abort: user quit
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1178 [255]
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1179 $ hg revert editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1180
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1181 Removing changes from patch
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1182
16338
118eb4575ea2 tests: fix one more sed -i
Matt Mackall <mpm@selenic.com>
parents: 16332
diff changeset
1183 $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
118eb4575ea2 tests: fix one more sed -i
Matt Mackall <mpm@selenic.com>
parents: 16332
diff changeset
1184 $ mv tmp editedfile
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1185 $ echo "This line has been added" >> editedfile
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16899
diff changeset
1186 $ cat > editor.sh << '__EOF__'
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
1187 > sed -e 's/^[-+]/ /' "$1" > tmp
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
1188 > mv tmp "$1"
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1189 > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1190 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1191 > y
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1192 > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1193 > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1194 diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1195 1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1196 examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1197
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1198 @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1199 -This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1200 -This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1201 -This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1202 +This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1203 +This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1204 +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1205 record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1206
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1207 no changes to record
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1208 $ cat editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1209 This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1210 This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1211 This line has been added
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1212 $ hg cat -r tip editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1213 This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1214 This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1215 This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1216 $ hg revert editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1217
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1218 Invalid patch
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1219
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
1220 $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
1221 $ mv tmp editedfile
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1222 $ echo "This line has been added" >> editedfile
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16899
diff changeset
1223 $ cat > editor.sh << '__EOF__'
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
1224 > sed s/This/That/ "$1" > tmp
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
1225 > mv tmp "$1"
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1226 > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1227 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1228 > y
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1229 > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1230 > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1231 diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1232 1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1233 examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1234
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1235 @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1236 -This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1237 -This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1238 -This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1239 +This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1240 +This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1241 +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1242 record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1243
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1244 patching file editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1245 Hunk #1 FAILED at 0
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1246 1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1247 abort: patch failed to apply
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1248 [255]
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1249 $ cat editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1250 This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1251 This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1252 This line has been added
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1253 $ hg cat -r tip editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1254 This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1255 This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1256 This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1257 $ cat editedfile.rej
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1258 --- editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1259 +++ editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1260 @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1261 -That is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1262 -That change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1263 -That is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1264 +That change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1265 +That is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1266 +That line has been added
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1267
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1268 Malformed patch - error handling
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1269
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1270 $ cat > editor.sh << '__EOF__'
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1271 > sed -e '/^@/p' "$1" > tmp
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1272 > mv tmp "$1"
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1273 > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1274 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1275 > y
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1276 > e
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1277 > EOF
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1278 diff --git a/editedfile b/editedfile
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1279 1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1280 examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1281
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1282 @@ -1,3 +1,3 @@
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1283 -This is the first line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1284 -This change will be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1285 -This is the third line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1286 +This change will not be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1287 +This is the second line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1288 +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1289 record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1290
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1291 abort: error parsing patch: unhandled transition: range -> range
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1292 [255]
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1293
18954
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
1294 random text in random positions is still an error
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
1295
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1296 $ cat > editor.sh << '__EOF__'
19080
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
1297 > sed -e '/^@/i\
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
1298 > other' "$1" > tmp
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1299 > mv tmp "$1"
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1300 > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1301 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1302 > y
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1303 > e
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1304 > EOF
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1305 diff --git a/editedfile b/editedfile
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1306 1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1307 examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1308
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1309 @@ -1,3 +1,3 @@
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1310 -This is the first line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1311 -This change will be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1312 -This is the third line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1313 +This change will not be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1314 +This is the second line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1315 +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1316 record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1317
18954
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
1318 abort: error parsing patch: unhandled transition: file -> other
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1319 [255]
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
1320
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1321 $ hg up -C
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1322 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1323
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1324 With win32text
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1325
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1326 $ echo '[extensions]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1327 $ echo 'win32text = ' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1328 $ echo '[decode]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1329 $ echo '** = cleverdecode:' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1330 $ echo '[encode]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1331 $ echo '** = cleverencode:' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1332 $ echo '[patch]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1333 $ echo 'eol = crlf' >> .hg/hgrc
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents: 7718
diff changeset
1334
12843
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
1335 Ignore win32text deprecation warning for now:
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
1336
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
1337 $ echo '[win32text]' >> .hg/hgrc
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
1338 $ echo 'warn = no' >> .hg/hgrc
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
1339
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1340 $ echo d >> subdir/f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1341 $ hg commit -i -d '24 0' -mw1 <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1342 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1343 > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1344 > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1345 diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1346 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1347 examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1348
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1349 @@ -3,3 +3,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1350 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1351 b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1352 c
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1353 +d
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1354 record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1355
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents: 7718
diff changeset
1356
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1357 $ hg tip -p
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1358 changeset: 28:* (glob)
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1359 tag: tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1360 user: test
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1361 date: Thu Jan 01 00:00:24 1970 +0000
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1362 summary: w1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1363
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
1364 diff -r ???????????? -r ???????????? subdir/f1 (glob)
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1365 --- a/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
1366 +++ b/subdir/f1 Thu Jan 01 00:00:24 1970 +0000
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1367 @@ -3,3 +3,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1368 a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1369 b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1370 c
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1371 +d
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
1372
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
1373
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
1374
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1375 Test --user when ui.username not set
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1376 $ unset HGUSER
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1377 $ echo e >> subdir/f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
1378 $ hg commit -i --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1379 > y
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1380 > y
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1381 > EOF
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1382 diff --git a/subdir/f1 b/subdir/f1
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1383 1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1384 examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1385
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1386 @@ -4,3 +4,4 @@
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1387 b
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1388 c
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1389 d
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1390 +e
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1391 record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
1392
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1393 $ hg log --template '{author}\n' -l 1
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1394 xyz
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1395 $ HGUSER="test"
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
1396 $ export HGUSER
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16901
diff changeset
1397
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
1398
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1399 Moving files
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
1400
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1401 $ hg update -C .
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1402 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1403 $ hg mv plain plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1404 $ echo somechange >> plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1405 $ hg commit -i -d '23 0' -mmoving_files << EOF
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
1406 > y
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1407 > y
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
1408 > EOF
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1409 diff --git a/plain b/plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1410 rename from plain
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1411 rename to plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1412 1 hunks, 1 lines changed
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1413 examine changes to 'plain' and 'plain3'? [Ynesfdaq?] y
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
1414
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1415 @@ -11,3 +11,4 @@
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1416 9
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1417 10
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1418 11
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1419 +somechange
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1420 record this change to 'plain3'? [Ynesfdaq?] y
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1421
24861
15d7f435108a test-commit-interactive: stablize output for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 24845
diff changeset
1422 The #if execbit block above changes the hash here on some systems
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1423 $ hg tip
24861
15d7f435108a test-commit-interactive: stablize output for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 24845
diff changeset
1424 changeset: 30:* (glob)
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1425 tag: tip
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1426 user: test
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1427 date: Thu Jan 01 00:00:23 1970 +0000
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1428 summary: moving_files
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
1429
24845
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1430 Editing patch of newly added file
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1431
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1432 $ hg update -C .
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1433 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1434 $ cat > editor.sh << '__EOF__'
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1435 > cat "$1" | sed "s/first/very/g" > tt
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1436 > mv tt "$1"
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1437 > __EOF__
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1438 $ cat > newfile << '__EOF__'
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1439 > This is the first line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1440 > This is the second line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1441 > This is the third line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1442 > __EOF__
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1443 $ hg add newfile
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1444 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -d '23 0' -medit-patch-new <<EOF
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1445 > y
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1446 > e
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1447 > EOF
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1448 diff --git a/newfile b/newfile
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1449 new file mode 100644
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1450 examine changes to 'newfile'? [Ynesfdaq?] y
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1451
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1452 @@ -0,0 +1,3 @@
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1453 +This is the first line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1454 +This is the second line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1455 +This is the third line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1456 record this change to 'newfile'? [Ynesfdaq?] e
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1457
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1458 $ hg cat -r tip newfile
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1459 This is the very line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1460 This is the second line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1461 This is the third line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1462
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1463 $ cat newfile
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1464 This is the first line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1465 This is the second line
8133494accf1 record: edit patch of newly added files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 24844
diff changeset
1466 This is the third line
24866
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1467
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1468 Add new file from within a subdirectory
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1469 $ hg update -C .
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1470 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1471 $ mkdir folder
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1472 $ cd folder
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1473 $ echo "foo" > bar
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1474 $ hg add bar
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1475 $ hg commit -i -d '23 0' -mnewfilesubdir <<EOF
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1476 > y
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1477 > y
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1478 > EOF
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1479 diff --git a/folder/bar b/folder/bar
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1480 new file mode 100644
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1481 examine changes to 'folder/bar'? [Ynesfdaq?] y
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1482
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1483 @@ -0,0 +1,1 @@
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1484 +foo
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1485 record this change to 'folder/bar'? [Ynesfdaq?] y
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1486
24884
d7778b88838c test-commit-interactive: add more globs for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 24866
diff changeset
1487 The #if execbit block above changes the hashes here on some systems
24866
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1488 $ hg tip -p
24884
d7778b88838c test-commit-interactive: add more globs for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 24866
diff changeset
1489 changeset: 32:* (glob)
24866
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1490 tag: tip
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1491 user: test
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1492 date: Thu Jan 01 00:00:23 1970 +0000
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1493 summary: newfilesubdir
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1494
24884
d7778b88838c test-commit-interactive: add more globs for no-execbit platforms
Matt Harbison <matt_harbison@yahoo.com>
parents: 24866
diff changeset
1495 diff -r * -r * folder/bar (glob)
24866
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1496 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1497 +++ b/folder/bar Thu Jan 01 00:00:23 1970 +0000
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1498 @@ -0,0 +1,1 @@
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1499 +foo
e1ec3d075c67 record: fix adding new file with record from within a subdir (issue4626)
Laurent Charignon <lcharignon@fb.com>
parents: 24861
diff changeset
1500
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16901
diff changeset
1501 $ cd ..