mercurial/commands.py
branchstable
changeset 17949 407209261f63
parent 17931 35ba170c0f82
child 17950 a1f94e2f5da2
child 17981 e689b0d91546
equal deleted inserted replaced
17931:35ba170c0f82 17949:407209261f63
  2933     getfile = util.lrucachefunc(repo.file)
  2933     getfile = util.lrucachefunc(repo.file)
  2934 
  2934 
  2935     def matchlines(body):
  2935     def matchlines(body):
  2936         begin = 0
  2936         begin = 0
  2937         linenum = 0
  2937         linenum = 0
  2938         while True and begin < len(body):
  2938         while begin < len(body):
  2939             match = regexp.search(body, begin)
  2939             match = regexp.search(body, begin)
  2940             if not match:
  2940             if not match:
  2941                 break
  2941                 break
  2942             mstart, mend = match.span()
  2942             mstart, mend = match.span()
  2943             linenum += body.count('\n', begin, mstart) + 1
  2943             linenum += body.count('\n', begin, mstart) + 1