Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/mq.py @ 2746:0503eb5c0a33
Add option -e/--edit to qrefresh, to edit the existing header.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Mon, 31 Jul 2006 17:55:43 -0700 |
parents | 1bac2bfe081a |
children | 0016fc748f61 |
comparison
equal
deleted
inserted
replaced
2745:1bac2bfe081a | 2746:0503eb5c0a33 |
---|---|
1271 | 1271 |
1272 def refresh(ui, repo, **opts): | 1272 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 |
1279 | 1285 |
1280 def diff(ui, repo, *files, **opts): | 1286 def diff(ui, repo, *files, **opts): |
1473 ('m', 'merge', None, 'merge from another queue'), | 1479 ('m', 'merge', None, 'merge from another queue'), |
1474 ('n', 'name', '', 'merge queue name')], | 1480 ('n', 'name', '', 'merge queue name')], |
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 [('m', 'message', '', _('change commit message with <text>')), | 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'), |
1485 ('u', 'update', None, 'update queue working dir')], | 1492 ('u', 'update', None, 'update queue working dir')], |
1486 'hg qrestore [-d] [-u] REV'), | 1493 'hg qrestore [-d] [-u] REV'), |