Mercurial > public > mercurial-scm > hg-stable
comparison tests/test-diff-color.t @ 38592:be441eb65f09
diff: graduate word-diff option from experimental
Per 4.6 Sprint notes.
I've also made it gated by "formatchanging" since it could change the output
if we had an option to highlight words without using colors.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 08 Jul 2018 16:21:26 +0900 |
parents | 35632d392279 |
children | b07b691d2667 |
comparison
equal
deleted
inserted
replaced
38591:f068495a1c28 | 38592:be441eb65f09 |
---|---|
302 > be changed into four! | 302 > be changed into four! |
303 > | 303 > |
304 > three of those lines have | 304 > three of those lines have |
305 > collapsed onto one | 305 > collapsed onto one |
306 > EOF | 306 > EOF |
307 $ hg diff --config experimental.worddiff=False --color=debug | 307 $ hg diff --config diff.word-diff=False --color=debug |
308 [diff.diffline|diff --git a/file1 b/file1] | 308 [diff.diffline|diff --git a/file1 b/file1] |
309 [diff.file_a|--- a/file1] | 309 [diff.file_a|--- a/file1] |
310 [diff.file_b|+++ b/file1] | 310 [diff.file_b|+++ b/file1] |
311 [diff.hunk|@@ -1,16 +1,17 @@] | 311 [diff.hunk|@@ -1,16 +1,17 @@] |
312 [diff.deleted|-this is the first line] | 312 [diff.deleted|-this is the first line] |
335 [diff.deleted|-three of those lines will] | 335 [diff.deleted|-three of those lines will] |
336 [diff.deleted|-collapse onto one] | 336 [diff.deleted|-collapse onto one] |
337 [diff.deleted|-(to see if it works)] | 337 [diff.deleted|-(to see if it works)] |
338 [diff.inserted|+three of those lines have] | 338 [diff.inserted|+three of those lines have] |
339 [diff.inserted|+collapsed onto one] | 339 [diff.inserted|+collapsed onto one] |
340 $ hg diff --config experimental.worddiff=True --color=debug | 340 $ hg diff --config diff.word-diff=True --color=debug |
341 [diff.diffline|diff --git a/file1 b/file1] | 341 [diff.diffline|diff --git a/file1 b/file1] |
342 [diff.file_a|--- a/file1] | 342 [diff.file_a|--- a/file1] |
343 [diff.file_b|+++ b/file1] | 343 [diff.file_b|+++ b/file1] |
344 [diff.hunk|@@ -1,16 +1,17 @@] | 344 [diff.hunk|@@ -1,16 +1,17 @@] |
345 [diff.deleted|-][diff.deleted.changed|this][diff.deleted.unchanged| is the first ][diff.deleted.changed|line] | 345 [diff.deleted|-][diff.deleted.changed|this][diff.deleted.unchanged| is the first ][diff.deleted.changed|line] |
382 > with open("utf8", "wb") as f: | 382 > with open("utf8", "wb") as f: |
383 > f.write(b"blah \xe3\x82\xa4 blah\n") | 383 > f.write(b"blah \xe3\x82\xa4 blah\n") |
384 > EOF | 384 > EOF |
385 $ hg ci -m 'slightly change utf8 char' utf8 | 385 $ hg ci -m 'slightly change utf8 char' utf8 |
386 | 386 |
387 $ hg diff --config experimental.worddiff=True --color=debug -c. | 387 $ hg diff --config diff.word-diff=True --color=debug -c. |
388 [diff.diffline|diff --git a/utf8 b/utf8] | 388 [diff.diffline|diff --git a/utf8 b/utf8] |
389 [diff.file_a|--- a/utf8] | 389 [diff.file_a|--- a/utf8] |
390 [diff.file_b|+++ b/utf8] | 390 [diff.file_b|+++ b/utf8] |
391 [diff.hunk|@@ -1,1 +1,1 @@] | 391 [diff.hunk|@@ -1,1 +1,1 @@] |
392 [diff.deleted|-][diff.deleted.unchanged|blah ][diff.deleted.changed|\xe3\x82\xa2][diff.deleted.unchanged| blah] (esc) | 392 [diff.deleted|-][diff.deleted.unchanged|blah ][diff.deleted.changed|\xe3\x82\xa2][diff.deleted.unchanged| blah] (esc) |