Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/dirstate.py @ 4444:2d32e3ae01a7
Fix issue 562: .hgignore requires newline at end.
End-of-lines characters where discarded without any check for existence.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 19 May 2007 22:47:01 +0200 |
parents | 1b9fc3f48861 |
children | 30e7aa755efd |
comparison
equal
deleted
inserted
replaced
4443:4e521a3ee5eb | 4444:2d32e3ae01a7 |
---|---|
63 glob:pattern # non-rooted glob | 63 glob:pattern # non-rooted glob |
64 pattern # pattern of the current default type''' | 64 pattern # pattern of the current default type''' |
65 syntaxes = {'re': 'relre:', 'regexp': 'relre:', 'glob': 'relglob:'} | 65 syntaxes = {'re': 'relre:', 'regexp': 'relre:', 'glob': 'relglob:'} |
66 def parselines(fp): | 66 def parselines(fp): |
67 for line in fp: | 67 for line in fp: |
68 if not line.endswith('\n'): | |
69 line += '\n' | |
68 escape = False | 70 escape = False |
69 for i in xrange(len(line)): | 71 for i in xrange(len(line)): |
70 if escape: escape = False | 72 if escape: escape = False |
71 elif line[i] == '\\': escape = True | 73 elif line[i] == '\\': escape = True |
72 elif line[i] == '#': break | 74 elif line[i] == '#': break |