mercurial/patch.py
changeset 16686 67964cda8701
parent 16683 525fdb738975
child 16687 e34106fa0dc3
equal deleted inserted replaced
16685:43d55088415a 16686:67964cda8701
  1657                 yield ('\n', '')
  1657                 yield ('\n', '')
  1658             if head:
  1658             if head:
  1659                 if line.startswith('@'):
  1659                 if line.startswith('@'):
  1660                     head = False
  1660                     head = False
  1661             else:
  1661             else:
  1662                 if line and not line[0] in ' +-@\\':
  1662                 if line and line[0] not in ' +-@\\':
  1663                     head = True
  1663                     head = True
  1664             stripline = line
  1664             stripline = line
  1665             if not head and line and line[0] in '+-':
  1665             if not head and line and line[0] in '+-':
  1666                 # highlight trailing whitespace, but only in changed lines
  1666                 # highlight trailing whitespace, but only in changed lines
  1667                 stripline = line.rstrip()
  1667                 stripline = line.rstrip()