mercurial/dirstate.py
changeset 4444 2d32e3ae01a7
parent 4330 1b9fc3f48861
child 4445 30e7aa755efd
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