Mercurial > cpython-lru_cache-weakref
diff Tools/scripts/ndiff.py @ 8285:32bc17f7c77b legacy-trunk
Add the specific sed statement to recover the second output file to
the comments.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 08 May 1998 21:04:06 +0000 |
| parents | 9d642a735a13 |
| children | 30c94cd49a68 |
line wrap: on
line diff
--- a/Tools/scripts/ndiff.py Fri May 08 19:55:51 1998 +0000 +++ b/Tools/scripts/ndiff.py Fri May 08 21:04:06 1998 +0000 @@ -6,7 +6,6 @@ # ndiff file1 file2 -- a human-friendly file differencer. # $Revision$ -# $NoKeywords: $ # SequenceMatcher tries to compute a "human-friendly diff" between # two sequences (chiefly picturing a file as a sequence of lines, @@ -52,6 +51,12 @@ # 3) Lines beginning with "? " attempt to guide the eye to intraline # differences, and were not present in either input file. # +# COROLLARY: +# On Unix, the second file can be recovered by piping the output through +# sed -n '/^[+ ] /s/^..//p' +# Modifications to recover the first file are left as an exercise for +# the reader. +# # NOTE on junk: the module-level names # IS_LINE_JUNK # IS_CHARACTER_JUNK
