# HG changeset patch # User Dirkjan Ochtman # Date 2008-11-03 15:31:47 # Node ID 56380212d630e4d3f41367b266f56facd32575f0 # Parent 8e46e59aaf4c1156218226baf37cd596e2f8d57e help: commands supporting --git point to the gitdiffs topic (issue1352) diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1600,7 +1600,8 @@ def qimport(ui, repo, *filename, **opts) 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 @@ def new(ui, repo, patch, *args, **opts): -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 @@ def refresh(ui, repo, *pats, **opts): 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 --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1003,6 +1003,9 @@ def diff(ui, repo, *pats, **opts): 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 @@ def export(ui, repo, *changesets, **opts 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 --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -215,6 +215,9 @@ diff repository (or selected 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. + options: -r --rev revision