# HG changeset patch # User Patrick Mezard # Date 2007-05-19 20:51:43 # Node ID 30e7aa755efdbcb4e6e34fd81451054d2485d492 # Parent af8db3b42a4a1800293dc1290f116a5d5d623a8a # Parent 2d32e3ae01a7b2d67907e95b7ccea19f36bd15ad Merge with crew-stable. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -66,6 +66,8 @@ class dirstate(object): 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 diff --git a/tests/test-hgignore b/tests/test-hgignore --- a/tests/test-hgignore +++ b/tests/test-hgignore @@ -1,6 +1,25 @@ #!/bin/sh hg init + +# Test issue 562: .hgignore requires newline at end +touch foo +touch bar +touch baz +cat > makeignore.py <