comparison hgext/mq.py @ 7307:56380212d630

help: commands supporting --git point to the gitdiffs topic (issue1352)
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 03 Nov 2008 16:31:47 +0100
parents 8e46e59aaf4c
children b6f5490effbf
comparison
equal deleted inserted replaced
7306:8e46e59aaf4c 7307:56380212d630
1598 With --force, an existing patch of the same name will be overwritten. 1598 With --force, an existing patch of the same name will be overwritten.
1599 1599
1600 An existing changeset may be placed under mq control with --rev 1600 An existing changeset may be placed under mq control with --rev
1601 (e.g. qimport --rev tip -n patch will place tip under mq control). 1601 (e.g. qimport --rev tip -n patch will place tip under mq control).
1602 With --git, patches imported with --rev will use the git diff 1602 With --git, patches imported with --rev will use the git diff
1603 format. 1603 format. See the gitdiffs help topic for information on why this is
1604 important for preserving rename/copy information and permission changes.
1604 """ 1605 """
1605 q = repo.mq 1606 q = repo.mq
1606 q.qimport(repo, filename, patchname=opts['name'], 1607 q.qimport(repo, filename, patchname=opts['name'],
1607 existing=opts['existing'], force=opts['force'], rev=opts['rev'], 1608 existing=opts['existing'], force=opts['force'], rev=opts['rev'],
1608 git=opts['git']) 1609 git=opts['git'])
1763 -u and -d can be used to set the (given) user and date, respectively. 1764 -u and -d can be used to set the (given) user and date, respectively.
1764 -U and -D set user to current user and date to current date. 1765 -U and -D set user to current user and date to current date.
1765 1766
1766 -e, -m or -l set the patch header as well as the commit message. If none 1767 -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 is specified, the header is empty and the commit message is '[mq]: PATCH'.
1769
1770 Use the --git option to keep the patch in the git extended diff format.
1771 Read the gitdiffs help topic for more information on why this is
1772 important for preserving permission changes and copy/rename information.
1768 """ 1773 """
1769 msg = cmdutil.logmessage(opts) 1774 msg = cmdutil.logmessage(opts)
1770 def getmsg(): return ui.edit(msg, ui.username()) 1775 def getmsg(): return ui.edit(msg, ui.username())
1771 q = repo.mq 1776 q = repo.mq
1772 opts['msg'] = msg 1777 opts['msg'] = msg
1789 If --short is specified, files currently included in the patch will 1794 If --short is specified, files currently included in the patch will
1790 be refreshed just like matched files and remain in the patch. 1795 be refreshed just like matched files and remain in the patch.
1791 1796
1792 hg add/remove/copy/rename work as usual, though you might want to use 1797 hg add/remove/copy/rename work as usual, though you might want to use
1793 git-style patches (--git or [diff] git=1) to track copies and renames. 1798 git-style patches (--git or [diff] git=1) to track copies and renames.
1799 See the gitdiffs help topic for more information on the git diff format.
1794 """ 1800 """
1795 q = repo.mq 1801 q = repo.mq
1796 message = cmdutil.logmessage(opts) 1802 message = cmdutil.logmessage(opts)
1797 if opts['edit']: 1803 if opts['edit']:
1798 if not q.applied: 1804 if not q.applied: