Show More
@@ -2041,6 +2041,10 b' def refresh(ui, repo, *pats, **opts):' | |||||
2041 | If -s/--short is specified, files currently included in the patch |
|
2041 | If -s/--short is specified, files currently included in the patch | |
2042 | will be refreshed just like matched files and remain in the patch. |
|
2042 | will be refreshed just like matched files and remain in the patch. | |
2043 |
|
2043 | |||
|
2044 | If -e/--edit is specified, Mercurial will start your configured editor for | |||
|
2045 | you to enter a message. In case qrefresh fails, you will find a backup of | |||
|
2046 | your message in ``.hg/last-message.txt``. | |||
|
2047 | ||||
2044 | hg add/remove/copy/rename work as usual, though you might want to |
|
2048 | hg add/remove/copy/rename work as usual, though you might want to | |
2045 | use git-style patches (-g/--git or [diff] git=1) to track copies |
|
2049 | use git-style patches (-g/--git or [diff] git=1) to track copies | |
2046 | and renames. See the diffs help topic for more information on the |
|
2050 | and renames. See the diffs help topic for more information on the | |
@@ -2057,6 +2061,10 b' def refresh(ui, repo, *pats, **opts):' | |||||
2057 | patch = q.applied[-1].name |
|
2061 | patch = q.applied[-1].name | |
2058 | ph = patchheader(q.join(patch), q.plainmode) |
|
2062 | ph = patchheader(q.join(patch), q.plainmode) | |
2059 | message = ui.edit('\n'.join(ph.message), ph.user or ui.username()) |
|
2063 | message = ui.edit('\n'.join(ph.message), ph.user or ui.username()) | |
|
2064 | # We don't want to lose the patch message if qrefresh fails (issue2062) | |||
|
2065 | msgfile = repo.opener('last-message.txt', 'wb') | |||
|
2066 | msgfile.write(message) | |||
|
2067 | msgfile.close() | |||
2060 | setupheaderopts(ui, opts) |
|
2068 | setupheaderopts(ui, opts) | |
2061 | ret = q.refresh(repo, pats, msg=message, **opts) |
|
2069 | ret = q.refresh(repo, pats, msg=message, **opts) | |
2062 | q.save_dirty() |
|
2070 | q.save_dirty() |
General Comments 0
You need to be logged in to leave comments.
Login now