1421 qnew creates a new patch on top of the currently-applied patch |
1421 qnew creates a new patch on top of the currently-applied patch |
1422 (if any). It will refuse to run if there are any outstanding |
1422 (if any). It will refuse to run if there are any outstanding |
1423 changes unless -f is specified, in which case the patch will |
1423 changes unless -f is specified, in which case the patch will |
1424 be initialised with them. |
1424 be initialised with them. |
1425 |
1425 |
1426 -m or -l set the patch header as well as the commit message. |
1426 -e, -m or -l set the patch header as well as the commit message. |
1427 If neither is specified, the patch header is empty and the |
1427 If none is specified, the patch header is empty and the |
1428 commit message is 'New patch: PATCH'""" |
1428 commit message is 'New patch: PATCH'""" |
1429 q = repo.mq |
1429 q = repo.mq |
1430 message = commands.logmessage(opts) |
1430 message = commands.logmessage(opts) |
|
1431 if opts['edit']: |
|
1432 message = ui.edit(message, ui.username()) |
1431 q.new(repo, patch, msg=message, force=opts['force']) |
1433 q.new(repo, patch, msg=message, force=opts['force']) |
1432 q.save_dirty() |
1434 q.save_dirty() |
1433 return 0 |
1435 return 0 |
1434 |
1436 |
1435 def refresh(ui, repo, *pats, **opts): |
1437 def refresh(ui, repo, *pats, **opts): |
1924 (init, |
1926 (init, |
1925 [('c', 'create-repo', None, 'create queue repository')], |
1927 [('c', 'create-repo', None, 'create queue repository')], |
1926 'hg qinit [-c]'), |
1928 'hg qinit [-c]'), |
1927 "qnew": |
1929 "qnew": |
1928 (new, |
1930 (new, |
1929 [('m', 'message', '', _('use <text> as commit message')), |
1931 [('e', 'edit', None, _('edit commit message')), |
|
1932 ('m', 'message', '', _('use <text> as commit message')), |
1930 ('l', 'logfile', '', _('read the commit message from <file>')), |
1933 ('l', 'logfile', '', _('read the commit message from <file>')), |
1931 ('f', 'force', None, _('import uncommitted changes into patch'))], |
1934 ('f', 'force', None, _('import uncommitted changes into patch'))], |
1932 'hg qnew [-m TEXT] [-l FILE] [-f] PATCH'), |
1935 'hg qnew [-e] [-m TEXT] [-l FILE] [-f] PATCH'), |
1933 "qnext": (next, [], 'hg qnext'), |
1936 "qnext": (next, [], 'hg qnext'), |
1934 "qprev": (prev, [], 'hg qprev'), |
1937 "qprev": (prev, [], 'hg qprev'), |
1935 "^qpop": |
1938 "^qpop": |
1936 (pop, |
1939 (pop, |
1937 [('a', 'all', None, 'pop all patches'), |
1940 [('a', 'all', None, 'pop all patches'), |