##// END OF EJS Templates
update help on git diffs
Matt Mackall -
r7387:7e9a15fa default
parent child Browse files
Show More
@@ -1607,7 +1607,7 b' def qimport(ui, repo, *filename, **opts)'
1607 An existing changeset may be placed under mq control with --rev
1607 An existing changeset may be placed under mq control with --rev
1608 (e.g. qimport --rev tip -n patch will place tip under mq control).
1608 (e.g. qimport --rev tip -n patch will place tip under mq control).
1609 With --git, patches imported with --rev will use the git diff
1609 With --git, patches imported with --rev will use the git diff
1610 format. See the gitdiffs help topic for information on why this is
1610 format. See the diffs help topic for information on why this is
1611 important for preserving rename/copy information and permission changes.
1611 important for preserving rename/copy information and permission changes.
1612 """
1612 """
1613 q = repo.mq
1613 q = repo.mq
@@ -1774,9 +1774,10 b' def new(ui, repo, patch, *args, **opts):'
1774 -e, -m or -l set the patch header as well as the commit message. If none
1774 -e, -m or -l set the patch header as well as the commit message. If none
1775 is specified, the header is empty and the commit message is '[mq]: PATCH'.
1775 is specified, the header is empty and the commit message is '[mq]: PATCH'.
1776
1776
1777 Use the --git option to keep the patch in the git extended diff format.
1777 Use the --git option to keep the patch in the git extended diff
1778 Read the gitdiffs help topic for more information on why this is
1778 format. Read the diffs help topic for more information on why this
1779 important for preserving permission changes and copy/rename information.
1779 is important for preserving permission changes and copy/rename
1780 information.
1780 """
1781 """
1781 msg = cmdutil.logmessage(opts)
1782 msg = cmdutil.logmessage(opts)
1782 def getmsg(): return ui.edit(msg, ui.username())
1783 def getmsg(): return ui.edit(msg, ui.username())
@@ -1803,7 +1804,7 b' def refresh(ui, repo, *pats, **opts):'
1803
1804
1804 hg add/remove/copy/rename work as usual, though you might want to use
1805 hg add/remove/copy/rename work as usual, though you might want to use
1805 git-style patches (--git or [diff] git=1) to track copies and renames.
1806 git-style patches (--git or [diff] git=1) to track copies and renames.
1806 See the gitdiffs help topic for more information on the git diff format.
1807 See the diffs help topic for more information on the git diff format.
1807 """
1808 """
1808 q = repo.mq
1809 q = repo.mq
1809 message = cmdutil.logmessage(opts)
1810 message = cmdutil.logmessage(opts)
@@ -1005,7 +1005,7 b' def diff(ui, repo, *pats, **opts):'
1005 probably with undesirable results.
1005 probably with undesirable results.
1006
1006
1007 Use the --git option to generate diffs in the git extended diff
1007 Use the --git option to generate diffs in the git extended diff
1008 format. Read the gitdiffs help topic for more information.
1008 format. Read the diffs help topic for more information.
1009 """
1009 """
1010 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
1010 node1, node2 = cmdutil.revpair(repo, opts.get('rev'))
1011
1011
@@ -1042,7 +1042,7 b' def export(ui, repo, *changesets, **opts'
1042 probably with undesirable results.
1042 probably with undesirable results.
1043
1043
1044 Use the --git option to generate diffs in the git extended diff
1044 Use the --git option to generate diffs in the git extended diff
1045 format. Read the gitdiffs help topic for more information.
1045 format. Read the diffs help topic for more information.
1046
1046
1047 With the --switch-parent option, the diff will be against the second
1047 With the --switch-parent option, the diff will be against the second
1048 parent. It can be useful to review a merge.
1048 parent. It can be useful to review a merge.
@@ -216,34 +216,31 b' PYTHONPATH::'
216 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
216 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
217 ''')),
217 ''')),
218
218
219 (['gitdiffs'], _('Git Extended Diff Format'),
219 (['diffs'], _('Diff Formats'),
220 _(r'''
220 _(r'''
221 Mercurial's default format for showing changes between two versions
221 Mercurial's default format for showing changes between two versions
222 of a file is compatible to the unified format of GNU diff, which
222 of a file is compatible with the unified format of GNU diff, which
223 can be used by GNU patch and many other standard tools.
223 can be used by GNU patch and many other standard tools.
224
224
225 While this de facto standardized format is often enough, there are
225 While this standard format is often enough, it does not encode the
226 cases where additional change information should be included in the
226 following information:
227 generated diff file:
228
227
229 - executable status
228 - executable status
230 - copy or rename information
229 - copy or rename information
231 - changes in binary files
230 - changes in binary files
232 - creation or deletion of empty files
231 - creation or deletion of empty files
233
232
234 Mercurial adopted the extended diff format which was invented for
233 Mercurial also supports the extended diff format from the git VCS
235 the git VCS to support above features.
234 which addresses these limitations. The git diff format is not
235 produced by default because there are very few tools which
236 understand this format.
236
237
237 The git extended diff format is not produced by default, because
238 This means that when generating diffs from a Mercurial repository
238 there are only very few tools (yet) which understand the additional
239 information provided by them.
240
241 This means that, when generating diffs from a Mercurial repository
242 (e.g. with "hg export"), you should be careful about things like
239 (e.g. with "hg export"), you should be careful about things like
243 file copies and renames or other things mentioned above, because
240 file copies and renames or other things mentioned above, because
244 when applying a standard diff to a different repository, this extra
241 when applying a standard diff to a different repository, this extra
245 information is lost. Mercurial's internal operations (like push and
242 information is lost. Mercurial's internal operations (like push and
246 pull) are not affected by this, because they use a different, binary
243 pull) are not affected by this, because they use an internal binary
247 format for communicating changes.
244 format for communicating changes.
248
245
249 To make Mercurial produce the git extended diff format, use the
246 To make Mercurial produce the git extended diff format, use the
@@ -205,7 +205,7 b' additional help topics:'
205 environment Environment Variables
205 environment Environment Variables
206 revisions Specifying Single Revisions
206 revisions Specifying Single Revisions
207 multirevs Specifying Multiple Revisions
207 multirevs Specifying Multiple Revisions
208 gitdiffs Git Extended Diff Format
208 diffs Diff Formats
209
209
210 use "hg -v help" to show aliases and global options
210 use "hg -v help" to show aliases and global options
211 Mercurial Distributed SCM
211 Mercurial Distributed SCM
@@ -268,7 +268,7 b' additional help topics:'
268 environment Environment Variables
268 environment Environment Variables
269 revisions Specifying Single Revisions
269 revisions Specifying Single Revisions
270 multirevs Specifying Multiple Revisions
270 multirevs Specifying Multiple Revisions
271 gitdiffs Git Extended Diff Format
271 diffs Diff Formats
272
272
273 use "hg -v help" to show aliases and global options
273 use "hg -v help" to show aliases and global options
274 %% not tested: --debugger
274 %% not tested: --debugger
@@ -96,7 +96,7 b' additional help topics:'
96 environment Environment Variables
96 environment Environment Variables
97 revisions Specifying Single Revisions
97 revisions Specifying Single Revisions
98 multirevs Specifying Multiple Revisions
98 multirevs Specifying Multiple Revisions
99 gitdiffs Git Extended Diff Format
99 diffs Diff Formats
100
100
101 use "hg -v help" to show aliases and global options
101 use "hg -v help" to show aliases and global options
102 add add the specified files on the next commit
102 add add the specified files on the next commit
@@ -155,7 +155,7 b' additional help topics:'
155 environment Environment Variables
155 environment Environment Variables
156 revisions Specifying Single Revisions
156 revisions Specifying Single Revisions
157 multirevs Specifying Multiple Revisions
157 multirevs Specifying Multiple Revisions
158 gitdiffs Git Extended Diff Format
158 diffs Diff Formats
159 hg add [OPTION]... [FILE]...
159 hg add [OPTION]... [FILE]...
160
160
161 add the specified files on the next commit
161 add the specified files on the next commit
@@ -216,7 +216,7 b' diff repository (or selected files)'
216 probably with undesirable results.
216 probably with undesirable results.
217
217
218 Use the --git option to generate diffs in the git extended diff
218 Use the --git option to generate diffs in the git extended diff
219 format. Read the gitdiffs help topic for more information.
219 format. Read the diffs help topic for more information.
220
220
221 options:
221 options:
222
222
General Comments 0
You need to be logged in to leave comments. Login now