mercurial/match.py
changeset 48941 fd5b8e696b75
parent 48913 f254fc73d956
child 48946 642e31cb55f0
equal deleted inserted replaced
48940:2974cdda819b 48941:fd5b8e696b75
  1609     }
  1609     }
  1610     syntax = b'relre:'
  1610     syntax = b'relre:'
  1611     patterns = []
  1611     patterns = []
  1612 
  1612 
  1613     fp = open(filepath, b'rb')
  1613     fp = open(filepath, b'rb')
  1614     for lineno, line in enumerate(util.iterfile(fp), start=1):
  1614     for lineno, line in enumerate(fp, start=1):
  1615         if b"#" in line:
  1615         if b"#" in line:
  1616             global _commentre
  1616             global _commentre
  1617             if not _commentre:
  1617             if not _commentre:
  1618                 _commentre = util.re.compile(br'((?:^|[^\\])(?:\\\\)*)#.*')
  1618                 _commentre = util.re.compile(br'((?:^|[^\\])(?:\\\\)*)#.*')
  1619             # remove comments prefixed by an even number of escapes
  1619             # remove comments prefixed by an even number of escapes