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