##// END OF EJS Templates
histedit: improve documentation and behaviour of dates...
Ben Schmidt -
r31055:f1b63ec4 default
parent child Browse files
Show More
@@ -71,11 +71,11 b' those revisions together, offering you a'
71 ***
71 ***
72 Add delta
72 Add delta
73
73
74 Edit the commit message to your liking, then close the editor. For
74 Edit the commit message to your liking, then close the editor. The date used
75 this example, let's assume that the commit message was changed to
75 for the commit will be the later of the two commits' dates. For this example,
76 ``Add beta and delta.`` After histedit has run and had a chance to
76 let's assume that the commit message was changed to ``Add beta and delta.``
77 remove any old or temporary revisions it needed, the history looks
77 After histedit has run and had a chance to remove any old or temporary
78 like this::
78 revisions it needed, the history looks like this::
79
79
80 @ 2[tip] 989b4d060121 2009-04-27 18:04 -0500 durin42
80 @ 2[tip] 989b4d060121 2009-04-27 18:04 -0500 durin42
81 | Add beta and delta.
81 | Add beta and delta.
@@ -97,9 +97,10 b' The ``edit`` operation will drop you bac'
97 allowing you to edit files freely, or even use ``hg record`` to commit
97 allowing you to edit files freely, or even use ``hg record`` to commit
98 some changes as a separate commit. When you're done, any remaining
98 some changes as a separate commit. When you're done, any remaining
99 uncommitted changes will be committed as well. When done, run ``hg
99 uncommitted changes will be committed as well. When done, run ``hg
100 histedit --continue`` to finish this step. You'll be prompted for a
100 histedit --continue`` to finish this step. If there are uncommitted
101 new commit message, but the default commit message will be the
101 changes, you'll be prompted for a new commit message, but the default
102 original message for the ``edit`` ed revision.
102 commit message will be the original message for the ``edit`` ed
103 revision, and the date of the original commit will be preserved.
103
104
104 The ``message`` operation will give you a chance to revise a commit
105 The ``message`` operation will give you a chance to revise a commit
105 message without changing the contents. It's a shortcut for doing
106 message without changing the contents. It's a shortcut for doing
@@ -884,11 +885,11 b' def histedit(ui, repo, *freeargs, **opts'
884
885
885 - `mess` to reword the changeset commit message
886 - `mess` to reword the changeset commit message
886
887
887 - `fold` to combine it with the preceding changeset
888 - `fold` to combine it with the preceding changeset (using the later date)
888
889
889 - `roll` like fold, but discarding this commit's description
890 - `roll` like fold, but discarding this commit's description
890
891
891 - `edit` to edit this changeset
892 - `edit` to edit this changeset (preserving date)
892
893
893 There are a number of ways to select the root changeset:
894 There are a number of ways to select the root changeset:
894
895
@@ -5,6 +5,12 b''
5 > histedit=
5 > histedit=
6 > EOF
6 > EOF
7
7
8 $ modwithdate ()
9 > {
10 > echo $1 > $1
11 > hg ci -m $1 -d "$2 0"
12 > }
13
8 $ initrepo ()
14 $ initrepo ()
9 > {
15 > {
10 > hg init $1
16 > hg init $1
@@ -14,12 +20,14 b''
14 > hg add $x
20 > hg add $x
15 > done
21 > done
16 > hg ci -m 'Initial commit'
22 > hg ci -m 'Initial commit'
17 > for x in a b c d e f ; do
23 > modwithdate a 1
18 > echo $x > $x
24 > modwithdate b 2
19 > hg ci -m $x
25 > modwithdate c 3
20 > done
26 > modwithdate d 4
27 > modwithdate e 5
28 > modwithdate f 6
21 > echo 'I can haz no commute' > e
29 > echo 'I can haz no commute' > e
22 > hg ci -m 'does not commute with e'
30 > hg ci -m 'does not commute with e' -d '7 0'
23 > cd ..
31 > cd ..
24 > }
32 > }
25
33
@@ -34,48 +42,48 b' Initial generation of the command files'
34 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
42 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
35 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
43 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
36 $ cat $EDITED
44 $ cat $EDITED
37 pick 65a9a84f33fd 3 c
45 pick 092e4ce14829 3 c
38 pick 00f1c5383965 4 d
46 pick ae78f4c9d74f 4 d
39 fold 39522b764e3d 7 does not commute with e
47 fold 42abbb61bede 7 does not commute with e
40 pick 7b4e2f4b7bcd 5 e
48 pick 7f3755409b00 5 e
41 pick 500cac37a696 6 f
49 pick dd184f2faeb0 6 f
42
50
43 log before edit
51 log before edit
44 $ hg log --graph
52 $ hg log --graph
45 @ changeset: 7:39522b764e3d
53 @ changeset: 7:42abbb61bede
46 | tag: tip
54 | tag: tip
47 | user: test
55 | user: test
48 | date: Thu Jan 01 00:00:00 1970 +0000
56 | date: Thu Jan 01 00:00:07 1970 +0000
49 | summary: does not commute with e
57 | summary: does not commute with e
50 |
58 |
51 o changeset: 6:500cac37a696
59 o changeset: 6:dd184f2faeb0
52 | user: test
60 | user: test
53 | date: Thu Jan 01 00:00:00 1970 +0000
61 | date: Thu Jan 01 00:00:06 1970 +0000
54 | summary: f
62 | summary: f
55 |
63 |
56 o changeset: 5:7b4e2f4b7bcd
64 o changeset: 5:7f3755409b00
57 | user: test
65 | user: test
58 | date: Thu Jan 01 00:00:00 1970 +0000
66 | date: Thu Jan 01 00:00:05 1970 +0000
59 | summary: e
67 | summary: e
60 |
68 |
61 o changeset: 4:00f1c5383965
69 o changeset: 4:ae78f4c9d74f
62 | user: test
70 | user: test
63 | date: Thu Jan 01 00:00:00 1970 +0000
71 | date: Thu Jan 01 00:00:04 1970 +0000
64 | summary: d
72 | summary: d
65 |
73 |
66 o changeset: 3:65a9a84f33fd
74 o changeset: 3:092e4ce14829
67 | user: test
75 | user: test
68 | date: Thu Jan 01 00:00:00 1970 +0000
76 | date: Thu Jan 01 00:00:03 1970 +0000
69 | summary: c
77 | summary: c
70 |
78 |
71 o changeset: 2:da6535b52e45
79 o changeset: 2:40ccdd8beb95
72 | user: test
80 | user: test
73 | date: Thu Jan 01 00:00:00 1970 +0000
81 | date: Thu Jan 01 00:00:02 1970 +0000
74 | summary: b
82 | summary: b
75 |
83 |
76 o changeset: 1:c1f09da44841
84 o changeset: 1:cd997a145b29
77 | user: test
85 | user: test
78 | date: Thu Jan 01 00:00:00 1970 +0000
86 | date: Thu Jan 01 00:00:01 1970 +0000
79 | summary: a
87 | summary: a
80 |
88 |
81 o changeset: 0:1715188a53c7
89 o changeset: 0:1715188a53c7
@@ -89,7 +97,7 b' edit the history'
89 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
97 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 merging e
98 merging e
91 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
99 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
92 Fix up the change (fold 39522b764e3d)
100 Fix up the change (fold 42abbb61bede)
93 (hg histedit --continue to resume)
101 (hg histedit --continue to resume)
94
102
95 fix up
103 fix up
@@ -113,7 +121,7 b' fix up'
113 HG: changed e
121 HG: changed e
114 merging e
122 merging e
115 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
123 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
116 Fix up the change (pick 7b4e2f4b7bcd)
124 Fix up the change (pick 7f3755409b00)
117 (hg histedit --continue to resume)
125 (hg histedit --continue to resume)
118
126
119 just continue this time
127 just continue this time
@@ -124,34 +132,34 b' keep the non-commuting change, and thus '
124 continue: hg histedit --continue
132 continue: hg histedit --continue
125 $ hg diff
133 $ hg diff
126 $ hg histedit --continue 2>&1 | fixbundle
134 $ hg histedit --continue 2>&1 | fixbundle
127 7b4e2f4b7bcd: skipping changeset (no changes)
135 7f3755409b00: skipping changeset (no changes)
128
136
129 log after edit
137 log after edit
130 $ hg log --graph
138 $ hg log --graph
131 @ changeset: 5:d9cf42e54966
139 @ changeset: 5:1300355b1a54
132 | tag: tip
140 | tag: tip
133 | user: test
141 | user: test
134 | date: Thu Jan 01 00:00:00 1970 +0000
142 | date: Thu Jan 01 00:00:06 1970 +0000
135 | summary: f
143 | summary: f
136 |
144 |
137 o changeset: 4:10486af2e984
145 o changeset: 4:e2ac33269083
138 | user: test
146 | user: test
139 | date: Thu Jan 01 00:00:00 1970 +0000
147 | date: Thu Jan 01 00:00:07 1970 +0000
140 | summary: d
148 | summary: d
141 |
149 |
142 o changeset: 3:65a9a84f33fd
150 o changeset: 3:092e4ce14829
143 | user: test
151 | user: test
144 | date: Thu Jan 01 00:00:00 1970 +0000
152 | date: Thu Jan 01 00:00:03 1970 +0000
145 | summary: c
153 | summary: c
146 |
154 |
147 o changeset: 2:da6535b52e45
155 o changeset: 2:40ccdd8beb95
148 | user: test
156 | user: test
149 | date: Thu Jan 01 00:00:00 1970 +0000
157 | date: Thu Jan 01 00:00:02 1970 +0000
150 | summary: b
158 | summary: b
151 |
159 |
152 o changeset: 1:c1f09da44841
160 o changeset: 1:cd997a145b29
153 | user: test
161 | user: test
154 | date: Thu Jan 01 00:00:00 1970 +0000
162 | date: Thu Jan 01 00:00:01 1970 +0000
155 | summary: a
163 | summary: a
156 |
164 |
157 o changeset: 0:1715188a53c7
165 o changeset: 0:1715188a53c7
@@ -189,48 +197,48 b' Initial generation of the command files'
189 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
197 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 5 >> $EDITED
190 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
198 $ hg log --template 'pick {node|short} {rev} {desc}\n' -r 6 >> $EDITED
191 $ cat $EDITED
199 $ cat $EDITED
192 pick 65a9a84f33fd 3 c
200 pick 092e4ce14829 3 c
193 pick 00f1c5383965 4 d
201 pick ae78f4c9d74f 4 d
194 roll 39522b764e3d 7 does not commute with e
202 roll 42abbb61bede 7 does not commute with e
195 pick 7b4e2f4b7bcd 5 e
203 pick 7f3755409b00 5 e
196 pick 500cac37a696 6 f
204 pick dd184f2faeb0 6 f
197
205
198 log before edit
206 log before edit
199 $ hg log --graph
207 $ hg log --graph
200 @ changeset: 7:39522b764e3d
208 @ changeset: 7:42abbb61bede
201 | tag: tip
209 | tag: tip
202 | user: test
210 | user: test
203 | date: Thu Jan 01 00:00:00 1970 +0000
211 | date: Thu Jan 01 00:00:07 1970 +0000
204 | summary: does not commute with e
212 | summary: does not commute with e
205 |
213 |
206 o changeset: 6:500cac37a696
214 o changeset: 6:dd184f2faeb0
207 | user: test
215 | user: test
208 | date: Thu Jan 01 00:00:00 1970 +0000
216 | date: Thu Jan 01 00:00:06 1970 +0000
209 | summary: f
217 | summary: f
210 |
218 |
211 o changeset: 5:7b4e2f4b7bcd
219 o changeset: 5:7f3755409b00
212 | user: test
220 | user: test
213 | date: Thu Jan 01 00:00:00 1970 +0000
221 | date: Thu Jan 01 00:00:05 1970 +0000
214 | summary: e
222 | summary: e
215 |
223 |
216 o changeset: 4:00f1c5383965
224 o changeset: 4:ae78f4c9d74f
217 | user: test
225 | user: test
218 | date: Thu Jan 01 00:00:00 1970 +0000
226 | date: Thu Jan 01 00:00:04 1970 +0000
219 | summary: d
227 | summary: d
220 |
228 |
221 o changeset: 3:65a9a84f33fd
229 o changeset: 3:092e4ce14829
222 | user: test
230 | user: test
223 | date: Thu Jan 01 00:00:00 1970 +0000
231 | date: Thu Jan 01 00:00:03 1970 +0000
224 | summary: c
232 | summary: c
225 |
233 |
226 o changeset: 2:da6535b52e45
234 o changeset: 2:40ccdd8beb95
227 | user: test
235 | user: test
228 | date: Thu Jan 01 00:00:00 1970 +0000
236 | date: Thu Jan 01 00:00:02 1970 +0000
229 | summary: b
237 | summary: b
230 |
238 |
231 o changeset: 1:c1f09da44841
239 o changeset: 1:cd997a145b29
232 | user: test
240 | user: test
233 | date: Thu Jan 01 00:00:00 1970 +0000
241 | date: Thu Jan 01 00:00:01 1970 +0000
234 | summary: a
242 | summary: a
235 |
243 |
236 o changeset: 0:1715188a53c7
244 o changeset: 0:1715188a53c7
@@ -244,7 +252,7 b' edit the history'
244 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
252 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
245 merging e
253 merging e
246 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
254 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
247 Fix up the change (roll 39522b764e3d)
255 Fix up the change (roll 42abbb61bede)
248 (hg histedit --continue to resume)
256 (hg histedit --continue to resume)
249
257
250 fix up
258 fix up
@@ -255,7 +263,7 b' fix up'
255 $ hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'
263 $ hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'
256 merging e
264 merging e
257 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
265 warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
258 Fix up the change (pick 7b4e2f4b7bcd)
266 Fix up the change (pick 7f3755409b00)
259 (hg histedit --continue to resume)
267 (hg histedit --continue to resume)
260
268
261 just continue this time
269 just continue this time
@@ -264,34 +272,34 b' just continue this time'
264 (no more unresolved files)
272 (no more unresolved files)
265 continue: hg histedit --continue
273 continue: hg histedit --continue
266 $ hg histedit --continue 2>&1 | fixbundle
274 $ hg histedit --continue 2>&1 | fixbundle
267 7b4e2f4b7bcd: skipping changeset (no changes)
275 7f3755409b00: skipping changeset (no changes)
268
276
269 log after edit
277 log after edit
270 $ hg log --graph
278 $ hg log --graph
271 @ changeset: 5:e7c4f5d4eb75
279 @ changeset: 5:162978f027fb
272 | tag: tip
280 | tag: tip
273 | user: test
281 | user: test
274 | date: Thu Jan 01 00:00:00 1970 +0000
282 | date: Thu Jan 01 00:00:06 1970 +0000
275 | summary: f
283 | summary: f
276 |
284 |
277 o changeset: 4:803d1bb561fc
285 o changeset: 4:74e5e6c6c32f
278 | user: test
286 | user: test
279 | date: Thu Jan 01 00:00:00 1970 +0000
287 | date: Thu Jan 01 00:00:07 1970 +0000
280 | summary: d
288 | summary: d
281 |
289 |
282 o changeset: 3:65a9a84f33fd
290 o changeset: 3:092e4ce14829
283 | user: test
291 | user: test
284 | date: Thu Jan 01 00:00:00 1970 +0000
292 | date: Thu Jan 01 00:00:03 1970 +0000
285 | summary: c
293 | summary: c
286 |
294 |
287 o changeset: 2:da6535b52e45
295 o changeset: 2:40ccdd8beb95
288 | user: test
296 | user: test
289 | date: Thu Jan 01 00:00:00 1970 +0000
297 | date: Thu Jan 01 00:00:02 1970 +0000
290 | summary: b
298 | summary: b
291 |
299 |
292 o changeset: 1:c1f09da44841
300 o changeset: 1:cd997a145b29
293 | user: test
301 | user: test
294 | date: Thu Jan 01 00:00:00 1970 +0000
302 | date: Thu Jan 01 00:00:01 1970 +0000
295 | summary: a
303 | summary: a
296 |
304 |
297 o changeset: 0:1715188a53c7
305 o changeset: 0:1715188a53c7
@@ -316,16 +324,16 b' manifest'
316 description is taken from rollup target commit
324 description is taken from rollup target commit
317
325
318 $ hg log --debug --rev 4
326 $ hg log --debug --rev 4
319 changeset: 4:803d1bb561fceac3129ec778db9da249a3106fc3
327 changeset: 4:74e5e6c6c32fa39f0eeed43302fd48633ea5926f
320 phase: draft
328 phase: draft
321 parent: 3:65a9a84f33fdeb1ad5679b3941ec885d2b24027b
329 parent: 3:092e4ce14829f4974399ce4316d59f64ef0b6725
322 parent: -1:0000000000000000000000000000000000000000
330 parent: -1:0000000000000000000000000000000000000000
323 manifest: 4:b068a323d969f22af1296ec6a5ea9384cef437ac
331 manifest: 4:b068a323d969f22af1296ec6a5ea9384cef437ac
324 user: test
332 user: test
325 date: Thu Jan 01 00:00:00 1970 +0000
333 date: Thu Jan 01 00:00:07 1970 +0000
326 files: d e
334 files: d e
327 extra: branch=default
335 extra: branch=default
328 extra: histedit_source=00f1c53839651fa5c76d423606811ea5455a79d0,39522b764e3d26103f08bd1fa2ccd3e3d7dbcf4e
336 extra: histedit_source=ae78f4c9d74ffa4b6cb5045001c303fe9204e890,42abbb61bede6f4366fa1e74a664343e5d558a70
329 description:
337 description:
330 d
338 d
331
339
@@ -20,52 +20,60 b' Initialization'
20
20
21 Simple folding
21 Simple folding
22 --------------------
22 --------------------
23 $ addwithdate ()
24 > {
25 > echo $1 > $1
26 > hg add $1
27 > hg ci -m $1 -d "$2 0"
28 > }
29
23 $ initrepo ()
30 $ initrepo ()
24 > {
31 > {
25 > hg init r
32 > hg init r
26 > cd r
33 > cd r
27 > for x in a b c d e f ; do
34 > addwithdate a 1
28 > echo $x > $x
35 > addwithdate b 2
29 > hg add $x
36 > addwithdate c 3
30 > hg ci -m $x
37 > addwithdate d 4
31 > done
38 > addwithdate e 5
39 > addwithdate f 6
32 > }
40 > }
33
41
34 $ initrepo
42 $ initrepo
35
43
36 log before edit
44 log before edit
37 $ hg logt --graph
45 $ hg logt --graph
38 @ 5:652413bf663e f
46 @ 5:178e35e0ce73 f
39 |
47 |
40 o 4:e860deea161a e
48 o 4:1ddb6c90f2ee e
41 |
49 |
42 o 3:055a42cdd887 d
50 o 3:532247a8969b d
43 |
51 |
44 o 2:177f92b77385 c
52 o 2:ff2c9fa2018b c
45 |
53 |
46 o 1:d2ae7f538514 b
54 o 1:97d72e5f12c7 b
47 |
55 |
48 o 0:cb9a9f314b8b a
56 o 0:8580ff50825a a
49
57
50
58
51 $ hg histedit 177f92b77385 --commands - 2>&1 <<EOF | fixbundle
59 $ hg histedit ff2c9fa2018b --commands - 2>&1 <<EOF | fixbundle
52 > pick e860deea161a e
60 > pick 1ddb6c90f2ee e
53 > pick 652413bf663e f
61 > pick 178e35e0ce73 f
54 > fold 177f92b77385 c
62 > fold ff2c9fa2018b c
55 > pick 055a42cdd887 d
63 > pick 532247a8969b d
56 > EOF
64 > EOF
57
65
58 log after edit
66 log after edit
59 $ hg logt --graph
67 $ hg logt --graph
60 @ 4:9c277da72c9b d
68 @ 4:c4d7f3def76d d
61 |
69 |
62 o 3:6de59d13424a f
70 o 3:575228819b7e f
63 |
71 |
64 o 2:ee283cb5f2d5 e
72 o 2:505a591af19e e
65 |
73 |
66 o 1:d2ae7f538514 b
74 o 1:97d72e5f12c7 b
67 |
75 |
68 o 0:cb9a9f314b8b a
76 o 0:8580ff50825a a
69
77
70
78
71 post-fold manifest
79 post-fold manifest
@@ -78,19 +86,19 b' post-fold manifest'
78 f
86 f
79
87
80
88
81 check histedit_source
89 check histedit_source, including that it uses the later date, from the first changeset
82
90
83 $ hg log --debug --rev 3
91 $ hg log --debug --rev 3
84 changeset: 3:6de59d13424a8a13acd3e975514aed29dd0d9b2d
92 changeset: 3:575228819b7e6ed69e8c0a6a383ee59a80db7358
85 phase: draft
93 phase: draft
86 parent: 2:ee283cb5f2d5955443f23a27b697a04339e9a39a
94 parent: 2:505a591af19eed18f560af827b9e03d2076773dc
87 parent: -1:0000000000000000000000000000000000000000
95 parent: -1:0000000000000000000000000000000000000000
88 manifest: 3:81eede616954057198ead0b2c73b41d1f392829a
96 manifest: 3:81eede616954057198ead0b2c73b41d1f392829a
89 user: test
97 user: test
90 date: Thu Jan 01 00:00:00 1970 +0000
98 date: Thu Jan 01 00:00:06 1970 +0000
91 files+: c f
99 files+: c f
92 extra: branch=default
100 extra: branch=default
93 extra: histedit_source=a4f7421b80f79fcc59fff01bcbf4a53d127dd6d3,177f92b773850b59254aa5e923436f921b55483b
101 extra: histedit_source=7cad1d7030207872dfd1c3a7cb430f24f2884086,ff2c9fa2018b15fa74b33363bda9527323e2a99f
94 description:
102 description:
95 f
103 f
96 ***
104 ***
@@ -102,39 +110,39 b' rollup will fold without preserving the '
102
110
103 $ OLDHGEDITOR=$HGEDITOR
111 $ OLDHGEDITOR=$HGEDITOR
104 $ HGEDITOR=false
112 $ HGEDITOR=false
105 $ hg histedit d2ae7f538514 --commands - 2>&1 <<EOF | fixbundle
113 $ hg histedit 97d72e5f12c7 --commands - 2>&1 <<EOF | fixbundle
106 > pick d2ae7f538514 b
114 > pick 97d72e5f12c7 b
107 > roll ee283cb5f2d5 e
115 > roll 505a591af19e e
108 > pick 6de59d13424a f
116 > pick 575228819b7e f
109 > pick 9c277da72c9b d
117 > pick c4d7f3def76d d
110 > EOF
118 > EOF
111
119
112 $ HGEDITOR=$OLDHGEDITOR
120 $ HGEDITOR=$OLDHGEDITOR
113
121
114 log after edit
122 log after edit
115 $ hg logt --graph
123 $ hg logt --graph
116 @ 3:c4a9eb7989fc d
124 @ 3:fb13f1f49340 d
117 |
125 |
118 o 2:8e03a72b6f83 f
126 o 2:6d4bc3727566 f
119 |
127 |
120 o 1:391ee782c689 b
128 o 1:563995ddbe65 b
121 |
129 |
122 o 0:cb9a9f314b8b a
130 o 0:8580ff50825a a
123
131
124
132
125 description is taken from rollup target commit
133 description is taken from rollup target commit
126
134
127 $ hg log --debug --rev 1
135 $ hg log --debug --rev 1
128 changeset: 1:391ee782c68930be438ccf4c6a403daedbfbffa5
136 changeset: 1:563995ddbe650c0e6b0e1c1d75f0a197b61cec50
129 phase: draft
137 phase: draft
130 parent: 0:cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
138 parent: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
131 parent: -1:0000000000000000000000000000000000000000
139 parent: -1:0000000000000000000000000000000000000000
132 manifest: 1:b5e112a3a8354e269b1524729f0918662d847c38
140 manifest: 1:b5e112a3a8354e269b1524729f0918662d847c38
133 user: test
141 user: test
134 date: Thu Jan 01 00:00:00 1970 +0000
142 date: Thu Jan 01 00:00:05 1970 +0000
135 files+: b e
143 files+: b e
136 extra: branch=default
144 extra: branch=default
137 extra: histedit_source=d2ae7f538514cd87c17547b0de4cea71fe1af9fb,ee283cb5f2d5955443f23a27b697a04339e9a39a
145 extra: histedit_source=97d72e5f12c7e84f85064aa72e5a297142c36ed9,505a591af19eed18f560af827b9e03d2076773dc
138 description:
146 description:
139 b
147 b
140
148
@@ -163,13 +171,13 b' check saving last-message.txt'
163 > EOF
171 > EOF
164
172
165 $ rm -f .hg/last-message.txt
173 $ rm -f .hg/last-message.txt
166 $ hg status --rev '8e03a72b6f83^1::c4a9eb7989fc'
174 $ hg status --rev '6d4bc3727566^1::fb13f1f49340'
167 A c
175 A c
168 A d
176 A d
169 A f
177 A f
170 $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit 8e03a72b6f83 --commands - 2>&1 <<EOF
178 $ HGEDITOR="sh $TESTTMP/editor.sh" hg histedit 6d4bc3727566 --commands - 2>&1 <<EOF
171 > pick 8e03a72b6f83 f
179 > pick 6d4bc3727566 f
172 > fold c4a9eb7989fc d
180 > fold fb13f1f49340 d
173 > EOF
181 > EOF
174 allow non-folding commit
182 allow non-folding commit
175 ==== before editing
183 ==== before editing
@@ -209,37 +217,37 b' check saving last-message.txt'
209 $ cd ..
217 $ cd ..
210 $ rm -r r
218 $ rm -r r
211
219
212 folding preserves initial author
220 folding preserves initial author but uses later date
213 --------------------------------
221 ----------------------------------------------------
214
222
215 $ initrepo
223 $ initrepo
216
224
217 $ hg ci --user "someone else" --amend --quiet
225 $ hg ci -d '7 0' --user "someone else" --amend --quiet
218
226
219 tip before edit
227 tip before edit
220 $ hg log --rev .
228 $ hg log --rev .
221 changeset: 5:a00ad806cb55
229 changeset: 5:10c36dd37515
222 tag: tip
230 tag: tip
223 user: someone else
231 user: someone else
224 date: Thu Jan 01 00:00:00 1970 +0000
232 date: Thu Jan 01 00:00:07 1970 +0000
225 summary: f
233 summary: f
226
234
227
235
228 $ hg --config progress.debug=1 --debug \
236 $ hg --config progress.debug=1 --debug \
229 > histedit e860deea161a --commands - 2>&1 <<EOF | \
237 > histedit 1ddb6c90f2ee --commands - 2>&1 <<EOF | \
230 > egrep 'editing|unresolved'
238 > egrep 'editing|unresolved'
231 > pick e860deea161a e
239 > pick 1ddb6c90f2ee e
232 > fold a00ad806cb55 f
240 > fold 10c36dd37515 f
233 > EOF
241 > EOF
234 editing: pick e860deea161a 4 e 1/2 changes (50.00%)
242 editing: pick 1ddb6c90f2ee 4 e 1/2 changes (50.00%)
235 editing: fold a00ad806cb55 5 f 2/2 changes (100.00%)
243 editing: fold 10c36dd37515 5 f 2/2 changes (100.00%)
236
244
237 tip after edit
245 tip after edit, which should use the later date, from the second changeset
238 $ hg log --rev .
246 $ hg log --rev .
239 changeset: 4:698d4e8040a1
247 changeset: 4:e4f3ec5d0b40
240 tag: tip
248 tag: tip
241 user: test
249 user: test
242 date: Thu Jan 01 00:00:00 1970 +0000
250 date: Thu Jan 01 00:00:07 1970 +0000
243 summary: e
251 summary: e
244
252
245
253
General Comments 0
You need to be logged in to leave comments. Login now