Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 15582:3da1f60fc80d stable
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.
author | Benoit Allard <benoit@aeteurope.nl> |
---|---|
date | Tue, 29 Nov 2011 19:51:35 +0100 |
parents | 2b1ec74c961f |
children | 97fc5eec3f43 |
comparison
equal
deleted
inserted
replaced
15579:6c5e6ebe0812 | 15582:3da1f60fc80d |
---|---|
1637 yield ('\n', '') | 1637 yield ('\n', '') |
1638 if head: | 1638 if head: |
1639 if line.startswith('@'): | 1639 if line.startswith('@'): |
1640 head = False | 1640 head = False |
1641 else: | 1641 else: |
1642 if line and not line[0] in ' +-@': | 1642 if line and not line[0] in ' +-@\\': |
1643 head = True | 1643 head = True |
1644 stripline = line | 1644 stripline = line |
1645 if not head and line and line[0] in '+-': | 1645 if not head and line and line[0] in '+-': |
1646 # highlight trailing whitespace, but only in changed lines | 1646 # highlight trailing whitespace, but only in changed lines |
1647 stripline = line.rstrip() | 1647 stripline = line.rstrip() |