Show More
@@ -1081,17 +1081,18 b' class queue(object):' | |||
|
1081 | 1081 | p.write("# Date %s %s\n\n" % date) |
|
1082 | 1082 | |
|
1083 | 1083 | defaultmsg = "[mq]: %s" % patchfn |
|
1084 |
editor = |
|
|
1084 | editor = cmdutil.getcommiteditor() | |
|
1085 | 1085 | if edit: |
|
1086 |
def desc |
|
|
1087 | desc = self.ui.edit(ctx.description() + "\n", | |
|
1088 | ctx.user()) | |
|
1086 | def finishdesc(desc): | |
|
1089 | 1087 | if desc.rstrip(): |
|
1090 | 1088 | return desc |
|
1091 | 1089 | else: |
|
1092 | 1090 | return defaultmsg |
|
1091 | # i18n: this message is shown in editor with "HG: " prefix | |
|
1092 | extramsg = _('Leave message empty to use default message.') | |
|
1093 | editor = cmdutil.getcommiteditor(finishdesc=finishdesc, | |
|
1094 | extramsg=extramsg) | |
|
1093 | 1095 | commitmsg = msg |
|
1094 | editor = desceditor | |
|
1095 | 1096 | else: |
|
1096 | 1097 | commitmsg = msg or defaultmsg |
|
1097 | 1098 |
@@ -284,9 +284,17 b' Test saving last-message.txt' | |||
|
284 | 284 | > EOF |
|
285 | 285 | |
|
286 | 286 | $ rm -f .hg/last-message.txt |
|
287 | $ hg status | |
|
287 | 288 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg qnew -e patch |
|
288 | 289 | ==== before editing |
|
289 | 290 | |
|
291 | ||
|
292 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
|
293 | HG: Leave message empty to use default message. | |
|
294 | HG: -- | |
|
295 | HG: user: test | |
|
296 | HG: branch 'default' | |
|
297 | HG: no files changed | |
|
290 | 298 |
|
|
291 | 299 | transaction abort! |
|
292 | 300 | rollback completed |
@@ -295,6 +303,7 b' Test saving last-message.txt' | |||
|
295 | 303 | [255] |
|
296 | 304 | $ cat .hg/last-message.txt |
|
297 | 305 | |
|
306 | ||
|
298 | 307 | test saving last-message.txt |
|
299 | 308 | |
|
300 | 309 | $ cat >> .hg/hgrc <<EOF |
@@ -314,9 +323,17 b' Test handling default message with the p' | |||
|
314 | 323 | > EOF |
|
315 | 324 | |
|
316 | 325 | $ rm -f .hg/last-message.txt |
|
326 | $ hg status | |
|
317 | 327 | $ HGEDITOR="sh $TESTTMP/editor.sh" hg qnew -e "patch " |
|
318 | 328 | ==== before editing |
|
319 | 329 | |
|
330 | ||
|
331 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
|
332 | HG: Leave message empty to use default message. | |
|
333 | HG: -- | |
|
334 | HG: user: test | |
|
335 | HG: branch 'default' | |
|
336 | HG: no files changed | |
|
320 | 337 |
|
|
321 | 338 | $ cat ".hg/patches/patch " |
|
322 | 339 | # HG changeset patch |
General Comments 0
You need to be logged in to leave comments.
Login now