hgext/git/dirstate.py
changeset 49078 020328be00cb
parent 49077 20d151e43429
child 49306 2e726c934fcd
equal deleted inserted replaced
49077:20d151e43429 49078:020328be00cb
    31 def readpatternfile(orig, filepath, warn, sourceinfo=False):
    31 def readpatternfile(orig, filepath, warn, sourceinfo=False):
    32     if not (b'info/exclude' in filepath or filepath.endswith(b'.gitignore')):
    32     if not (b'info/exclude' in filepath or filepath.endswith(b'.gitignore')):
    33         return orig(filepath, warn, sourceinfo=False)
    33         return orig(filepath, warn, sourceinfo=False)
    34     result = []
    34     result = []
    35     warnings = []
    35     warnings = []
    36     with open(filepath, b'rb') as fp:
    36     with open(filepath, 'rb') as fp:
    37         for l in fp:
    37         for l in fp:
    38             l = l.strip()
    38             l = l.strip()
    39             if not l or l.startswith(b'#'):
    39             if not l or l.startswith(b'#'):
    40                 continue
    40                 continue
    41             if l.startswith(b'!'):
    41             if l.startswith(b'!'):