##// END OF EJS Templates
diff: replace --merge option by config option...
Martin von Zweigbergk -
r47246:d57e607d default
parent child Browse files
Show More
@@ -2465,16 +2465,6 b" def debugcomplete(ui, cmd=b'', **opts):"
2465 (b'', b'from', b'', _(b'revision to diff from'), _(b'REV1')),
2465 (b'', b'from', b'', _(b'revision to diff from'), _(b'REV1')),
2466 (b'', b'to', b'', _(b'revision to diff to'), _(b'REV2')),
2466 (b'', b'to', b'', _(b'revision to diff to'), _(b'REV2')),
2467 (b'c', b'change', b'', _(b'change made by revision'), _(b'REV')),
2467 (b'c', b'change', b'', _(b'change made by revision'), _(b'REV')),
2468 (
2469 b'',
2470 b'merge',
2471 False,
2472 _(
2473 b'show difference between auto-merge and committed '
2474 b'merge for merge commits (EXPERIMENTAL)'
2475 ),
2476 _(b'REV'),
2477 ),
2478 ]
2468 ]
2479 + diffopts
2469 + diffopts
2480 + diffopts2
2470 + diffopts2
@@ -2555,7 +2545,7 b' def diff(ui, repo, *pats, **opts):'
2555 to_rev = opts.get(b'to')
2545 to_rev = opts.get(b'to')
2556 stat = opts.get(b'stat')
2546 stat = opts.get(b'stat')
2557 reverse = opts.get(b'reverse')
2547 reverse = opts.get(b'reverse')
2558 diffmerge = opts.get(b'merge')
2548 diffmerge = ui.configbool(b'diff', b'merge')
2559
2549
2560 cmdutil.check_incompatible_arguments(opts, b'from', [b'rev', b'change'])
2550 cmdutil.check_incompatible_arguments(opts, b'from', [b'rev', b'change'])
2561 cmdutil.check_incompatible_arguments(opts, b'to', [b'rev', b'change'])
2551 cmdutil.check_incompatible_arguments(opts, b'to', [b'rev', b'change'])
@@ -754,6 +754,12 b' coreconfigitem('
754 )
754 )
755 _registerdiffopts(section=b'diff')
755 _registerdiffopts(section=b'diff')
756 coreconfigitem(
756 coreconfigitem(
757 b'diff',
758 b'merge',
759 default=False,
760 experimental=True,
761 )
762 coreconfigitem(
757 b'email',
763 b'email',
758 b'bcc',
764 b'bcc',
759 default=None,
765 default=None,
@@ -546,7 +546,7 b' def _imerge3(repo, mynode, orig, fcd, fc'
546 def _imerge3alwaysgood(*args, **kwargs):
546 def _imerge3alwaysgood(*args, **kwargs):
547 # Like merge3, but record conflicts as resolved with markers in place.
547 # Like merge3, but record conflicts as resolved with markers in place.
548 #
548 #
549 # This is used for `hg diff --merge` to show the differences between
549 # This is used for `diff.merge` to show the differences between
550 # the auto-merge state and the committed merge state. It may be
550 # the auto-merge state and the committed merge state. It may be
551 # useful for other things.
551 # useful for other things.
552 b1, junk, b2 = _imerge3(*args, **kwargs)
552 b1, junk, b2 = _imerge3(*args, **kwargs)
@@ -8,10 +8,10 b''
8
8
9 == New Experimental Features ==
9 == New Experimental Features ==
10
10
11 * `hg diff` now takes an experimental `--merge` flag which causes `hg
11 * There's a new `diff.merge` config option to show the changes
12 diff --change` to show the changes relative to an automerge for
12 relative to an automerge for merge changesets. This makes it
13 merge changesets. This makes it easier to detect and review manual
13 easier to detect and review manual changes performed in merge
14 changes performed in merge changesets.
14 changesets. It is only supported by `hg diff --change` so far.
15
15
16
16
17 == Bug Fixes ==
17 == Bug Fixes ==
@@ -336,7 +336,7 b' Show all commands + options'
336 debugwhyunstable:
336 debugwhyunstable:
337 debugwireargs: three, four, five, ssh, remotecmd, insecure
337 debugwireargs: three, four, five, ssh, remotecmd, insecure
338 debugwireproto: localssh, peer, noreadstderr, nologhandshake, ssh, remotecmd, insecure
338 debugwireproto: localssh, peer, noreadstderr, nologhandshake, ssh, remotecmd, insecure
339 diff: rev, from, to, change, merge, text, git, binary, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, unified, stat, root, include, exclude, subrepos
339 diff: rev, from, to, change, text, git, binary, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, unified, stat, root, include, exclude, subrepos
340 export: bookmark, output, switch-parent, rev, text, git, binary, nodates, template
340 export: bookmark, output, switch-parent, rev, text, git, binary, nodates, template
341 files: rev, print0, include, exclude, template, subrepos
341 files: rev, print0, include, exclude, template, subrepos
342 forget: interactive, include, exclude, dry-run
342 forget: interactive, include, exclude, dry-run
@@ -196,7 +196,7 b" must be similar to 'hg diff --change 5':"
196
196
197 merge diff should show only manual edits to a merge:
197 merge diff should show only manual edits to a merge:
198
198
199 $ hg diff --merge -c 6
199 $ hg diff --config diff.merge=yes -c 6
200 (no diff output is expected here)
200 (no diff output is expected here)
201
201
202 Construct an "evil merge" that does something other than just the merge.
202 Construct an "evil merge" that does something other than just the merge.
@@ -226,7 +226,7 b' Construct an "evil merge" that does some'
226 Contrast with the `hg diff -c 7` version above: only the manual edit shows
226 Contrast with the `hg diff -c 7` version above: only the manual edit shows
227 up, making it easy to identify changes someone is otherwise trying to sneak
227 up, making it easy to identify changes someone is otherwise trying to sneak
228 into a merge.
228 into a merge.
229 $ hg diff --merge -c 7
229 $ hg diff --config diff.merge=yes -c 7
230 diff -r 8ad85e839ba7 file.txt
230 diff -r 8ad85e839ba7 file.txt
231 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000
231 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000
232 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000
232 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000
@@ -266,15 +266,15 b' Set up a conflict.'
266 $ hg resolve -ma
266 $ hg resolve -ma
267 (no more unresolved files)
267 (no more unresolved files)
268 $ hg commit -m 'merge conflicted edit'
268 $ hg commit -m 'merge conflicted edit'
269 Without --merge, it's a diff against p1
269 Without diff.merge, it's a diff against p1
270 $ hg diff --no-merge -c 11
270 $ hg diff --config diff.merge=no -c 11
271 diff -r fd1f17c90d7c -r 5010caab09f6 new-file-p2.txt
271 diff -r fd1f17c90d7c -r 5010caab09f6 new-file-p2.txt
272 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
272 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
273 +++ b/new-file-p2.txt Thu Jan 01 00:00:00 1970 +0000
273 +++ b/new-file-p2.txt Thu Jan 01 00:00:00 1970 +0000
274 @@ -0,0 +1,1 @@
274 @@ -0,0 +1,1 @@
275 +this file is new in p2 of the merge
275 +this file is new in p2 of the merge
276 With --merge, it's a diff against the conflicted content.
276 With diff.merge, it's a diff against the conflicted content.
277 $ hg diff --merge -c 11
277 $ hg diff --config diff.merge=yes -c 11
278 diff -r 5010caab09f6 file.txt
278 diff -r 5010caab09f6 file.txt
279 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000
279 --- a/file.txt Thu Jan 01 00:00:00 1970 +0000
280 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000
280 +++ b/file.txt Thu Jan 01 00:00:00 1970 +0000
General Comments 0
You need to be logged in to leave comments. Login now