Mercurial > public > mercurial-scm > hg
diff mercurial/dirstate.py @ 4440: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 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Sat May 19 22:46:59 2007 +0200 +++ b/mercurial/dirstate.py Sat May 19 22:47:01 2007 +0200 @@ -65,6 +65,8 @@ syntaxes = {'re': 'relre:', 'regexp': 'relre:', 'glob': 'relglob:'} def parselines(fp): for line in fp: + if not line.endswith('\n'): + line += '\n' escape = False for i in xrange(len(line)): if escape: escape = False