# HG changeset patch # User Dirkjan Ochtman # Date 1225726307 -3600 # Node ID 56380212d630e4d3f41367b266f56facd32575f0 # Parent 8e46e59aaf4c1156218226baf37cd596e2f8d57e help: commands supporting --git point to the gitdiffs topic (issue1352) diff -r 8e46e59aaf4c -r 56380212d630 hgext/mq.py --- a/hgext/mq.py Mon Nov 03 16:30:21 2008 +0100 +++ b/hgext/mq.py Mon Nov 03 16:31:47 2008 +0100 @@ -1600,7 +1600,8 @@ An existing changeset may be placed under mq control with --rev (e.g. qimport --rev tip -n patch will place tip under mq control). With --git, patches imported with --rev will use the git diff - format. + format. See the gitdiffs help topic for information on why this is + important for preserving rename/copy information and permission changes. """ q = repo.mq q.qimport(repo, filename, patchname=opts['name'], @@ -1765,6 +1766,10 @@ -e, -m or -l set the patch header as well as the commit message. If none is specified, the header is empty and the commit message is '[mq]: PATCH'. + + Use the --git option to keep the patch in the git extended diff format. + Read the gitdiffs help topic for more information on why this is + important for preserving permission changes and copy/rename information. """ msg = cmdutil.logmessage(opts) def getmsg(): return ui.edit(msg, ui.username()) @@ -1791,6 +1796,7 @@ hg add/remove/copy/rename work as usual, though you might want to use git-style patches (--git or [diff] git=1) to track copies and renames. + See the gitdiffs help topic for more information on the git diff format. """ q = repo.mq message = cmdutil.logmessage(opts) diff -r 8e46e59aaf4c -r 56380212d630 mercurial/commands.py --- a/mercurial/commands.py Mon Nov 03 16:30:21 2008 +0100 +++ b/mercurial/commands.py Mon Nov 03 16:31:47 2008 +0100 @@ -1003,6 +1003,9 @@ Without the -a option, diff will avoid generating diffs of files it detects as binary. With -a, diff will generate a diff anyway, probably with undesirable results. + + Use the --git option to generate diffs in the git extended diff + format. Read the gitdiffs help topic for more information. """ node1, node2 = cmdutil.revpair(repo, opts.get('rev')) @@ -1036,6 +1039,9 @@ it detects as binary. With -a, export will generate a diff anyway, probably with undesirable results. + Use the --git option to generate diffs in the git extended diff + format. Read the gitdiffs help topic for more information. + With the --switch-parent option, the diff will be against the second parent. It can be useful to review a merge. """ diff -r 8e46e59aaf4c -r 56380212d630 tests/test-help.out --- a/tests/test-help.out Mon Nov 03 16:30:21 2008 +0100 +++ b/tests/test-help.out Mon Nov 03 16:31:47 2008 +0100 @@ -215,6 +215,9 @@ it detects as binary. With -a, diff will generate a diff anyway, probably with undesirable results. + Use the --git option to generate diffs in the git extended diff + format. Read the gitdiffs help topic for more information. + options: -r --rev revision