Show More
@@ -354,12 +354,7 b' def finishfold(ui, repo, ctx, oldctx, ne' | |||||
354 | hg.update(repo, parent) |
|
354 | hg.update(repo, parent) | |
355 | ### prepare new commit data |
|
355 | ### prepare new commit data | |
356 | commitopts = opts.copy() |
|
356 | commitopts = opts.copy() | |
357 | # username |
|
357 | commitopts['user'] = ctx.user() | |
358 | if ctx.user() == oldctx.user(): |
|
|||
359 | username = ctx.user() |
|
|||
360 | else: |
|
|||
361 | username = ui.username() |
|
|||
362 | commitopts['user'] = username |
|
|||
363 | # commit message |
|
358 | # commit message | |
364 | newmessage = '\n***\n'.join( |
|
359 | newmessage = '\n***\n'.join( | |
365 | [ctx.description()] + |
|
360 | [ctx.description()] + |
@@ -169,6 +169,44 b' check saving last-message.txt' | |||||
169 | check saving last-message.txt |
|
169 | check saving last-message.txt | |
170 |
|
170 | |||
171 | $ cd .. |
|
171 | $ cd .. | |
|
172 | $ rm -r r | |||
|
173 | ||||
|
174 | folding preserves initial author | |||
|
175 | -------------------------------- | |||
|
176 | ||||
|
177 | $ initrepo | |||
|
178 | ||||
|
179 | $ hg ci --user "someone else" --amend --quiet | |||
|
180 | ||||
|
181 | tip before edit | |||
|
182 | $ hg log --rev . | |||
|
183 | changeset: 5:a00ad806cb55 | |||
|
184 | tag: tip | |||
|
185 | user: someone else | |||
|
186 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
187 | summary: f | |||
|
188 | ||||
|
189 | ||||
|
190 | $ hg histedit e860deea161a --commands - 2>&1 <<EOF | fixbundle | |||
|
191 | > pick e860deea161a e | |||
|
192 | > fold a00ad806cb55 f | |||
|
193 | > EOF | |||
|
194 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
195 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
196 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
197 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
198 | ||||
|
199 | tip after edit | |||
|
200 | $ hg log --rev . | |||
|
201 | changeset: 4:698d4e8040a1 | |||
|
202 | tag: tip | |||
|
203 | user: test | |||
|
204 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
205 | summary: e | |||
|
206 | ||||
|
207 | ||||
|
208 | $ cd .. | |||
|
209 | $ rm -r r | |||
172 |
|
210 | |||
173 | folding and creating no new change doesn't break: |
|
211 | folding and creating no new change doesn't break: | |
174 | ------------------------------------------------- |
|
212 | ------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now