mercurial/dirstate.py
changeset 4445 30e7aa755efd
parent 4373 109077e7048d
parent 4444 2d32e3ae01a7
child 4507 289ec1f36b11
equal deleted inserted replaced
4442:af8db3b42a4a 4445:30e7aa755efd
    64         glob:pattern   # non-rooted glob
    64         glob:pattern   # non-rooted glob
    65         pattern        # pattern of the current default type'''
    65         pattern        # pattern of the current default type'''
    66         syntaxes = {'re': 'relre:', 'regexp': 'relre:', 'glob': 'relglob:'}
    66         syntaxes = {'re': 'relre:', 'regexp': 'relre:', 'glob': 'relglob:'}
    67         def parselines(fp):
    67         def parselines(fp):
    68             for line in fp:
    68             for line in fp:
       
    69                 if not line.endswith('\n'):
       
    70                     line += '\n'
    69                 escape = False
    71                 escape = False
    70                 for i in xrange(len(line)):
    72                 for i in xrange(len(line)):
    71                     if escape: escape = False
    73                     if escape: escape = False
    72                     elif line[i] == '\\': escape = True
    74                     elif line[i] == '\\': escape = True
    73                     elif line[i] == '#': break
    75                     elif line[i] == '#': break