Show More
@@ -1273,6 +1273,12 b' def refresh(ui, repo, **opts):' | |||||
1273 | """update the current patch""" |
|
1273 | """update the current patch""" | |
1274 | q = repo.mq |
|
1274 | q = repo.mq | |
1275 | message=commands.logmessage(**opts) |
|
1275 | message=commands.logmessage(**opts) | |
|
1276 | if opts['edit']: | |||
|
1277 | if message: | |||
|
1278 | raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) | |||
|
1279 | patch = q.applied[-1].split(':')[1] | |||
|
1280 | (message, comment, user, date, hasdiff) = q.readheaders(patch) | |||
|
1281 | message = ui.edit('\n'.join(message), user or ui.username()) | |||
1276 | q.refresh(repo, msg=message, short=opts['short']) |
|
1282 | q.refresh(repo, msg=message, short=opts['short']) | |
1277 | q.save_dirty() |
|
1283 | q.save_dirty() | |
1278 | return 0 |
|
1284 | return 0 | |
@@ -1475,10 +1481,11 b' cmdtable = {' | |||||
1475 | 'hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]'), |
|
1481 | 'hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]'), | |
1476 | "^qrefresh": |
|
1482 | "^qrefresh": | |
1477 | (refresh, |
|
1483 | (refresh, | |
1478 |
[(' |
|
1484 | [('e', 'edit', None, _('edit commit message')), | |
|
1485 | ('m', 'message', '', _('change commit message with <text>')), | |||
1479 | ('l', 'logfile', '', _('change commit message with <file> content')), |
|
1486 | ('l', 'logfile', '', _('change commit message with <file> content')), | |
1480 | ('s', 'short', None, 'short refresh')], |
|
1487 | ('s', 'short', None, 'short refresh')], | |
1481 | 'hg qrefresh [-m TEXT] [-l FILE] [-s]'), |
|
1488 | 'hg qrefresh [-e] [-m TEXT] [-l FILE] [-s]'), | |
1482 | "qrestore": |
|
1489 | "qrestore": | |
1483 | (restore, |
|
1490 | (restore, | |
1484 | [('d', 'delete', None, 'delete save entry'), |
|
1491 | [('d', 'delete', None, 'delete save entry'), |
General Comments 0
You need to be logged in to leave comments.
Login now