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