[PATCH stable] diff: '\ No newline at end of file' is also not part of the header

Ben benoit.allard at gmx.de
Tue Nov 29 18:54:29 UTC 2011


# HG changeset patch
# User Benoit Allard <benoit at aeteurope.nl>
# Date 1322592695 -3600
# Node ID 06b6a86f97ec1ea4e1caffd283e6853c9782ab3a
# Parent  ad686c818e1c7d5ed0335327321003ba8ea04664
diff: '\ No newline at end of file' is also not part of the header

Diff containing '\ No newline at end of file' were colorized incorrectly.

diff -r ad686c818e1c -r 06b6a86f97ec mercurial/patch.py
--- a/mercurial/patch.py	Fri Nov 25 02:11:12 2011 +0100
+++ b/mercurial/patch.py	Tue Nov 29 19:51:35 2011 +0100
@@ -1639,7 +1639,7 @@
                 if line.startswith('@'):
                     head = False
             else:
-                if line and not line[0] in ' +-@':
+                if line and not line[0] in ' +-@\\':
                     head = True
             stripline = line
             if not head and line and line[0] in '+-':



More information about the Mercurial-devel mailing list