comparison hgext/mq.py @ 7306:8e46e59aaf4c

mq: reflow qnew help, add help for options
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 03 Nov 2008 16:30:21 +0100
parents bd6deb7525f4
children 56380212d630
comparison
equal deleted inserted replaced
7305:c21d236ca897 7306:8e46e59aaf4c
1751 do('date', "%d %d" % util.makedate()) 1751 do('date', "%d %d" % util.makedate())
1752 1752
1753 def new(ui, repo, patch, *args, **opts): 1753 def new(ui, repo, patch, *args, **opts):
1754 """create a new patch 1754 """create a new patch
1755 1755
1756 qnew creates a new patch on top of the currently-applied patch 1756 qnew creates a new patch on top of the currently-applied patch (if any).
1757 (if any). It will refuse to run if there are any outstanding 1757 It will refuse to run if there are any outstanding changes unless -f is
1758 changes unless -f is specified, in which case the patch will 1758 specified, in which case the patch will be initialized with them. You
1759 be initialised with them. You may also use -I, -X, and/or a list of 1759 may also use -I, -X, and/or a list of files after the patch name to add
1760 files after the patch name to add only changes to matching files 1760 only changes to matching files to the new patch, leaving the rest as
1761 to the new patch, leaving the rest as uncommitted modifications. 1761 uncommitted modifications.
1762 1762
1763 -e, -m or -l set the patch header as well as the commit message. 1763 -u and -d can be used to set the (given) user and date, respectively.
1764 If none is specified, the patch header is empty and the 1764 -U and -D set user to current user and date to current date.
1765 commit message is '[mq]: PATCH'""" 1765
1766 -e, -m or -l set the patch header as well as the commit message. If none
1767 is specified, the header is empty and the commit message is '[mq]: PATCH'.
1768 """
1766 msg = cmdutil.logmessage(opts) 1769 msg = cmdutil.logmessage(opts)
1767 def getmsg(): return ui.edit(msg, ui.username()) 1770 def getmsg(): return ui.edit(msg, ui.username())
1768 q = repo.mq 1771 q = repo.mq
1769 opts['msg'] = msg 1772 opts['msg'] = msg
1770 if opts.get('edit'): 1773 if opts.get('edit'):