Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 17950:a1f94e2f5da2
merge with crew-stable
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Fri, 16 Nov 2012 10:20:32 -0600 |
parents | c8ffde272653 407209261f63 |
children | a08775ec89f2 |
comparison
equal
deleted
inserted
replaced
17948:bc75638bea78 | 17950:a1f94e2f5da2 |
---|---|
2934 getfile = util.lrucachefunc(repo.file) | 2934 getfile = util.lrucachefunc(repo.file) |
2935 | 2935 |
2936 def matchlines(body): | 2936 def matchlines(body): |
2937 begin = 0 | 2937 begin = 0 |
2938 linenum = 0 | 2938 linenum = 0 |
2939 while True and begin < len(body): | 2939 while begin < len(body): |
2940 match = regexp.search(body, begin) | 2940 match = regexp.search(body, begin) |
2941 if not match: | 2941 if not match: |
2942 break | 2942 break |
2943 mstart, mend = match.span() | 2943 mstart, mend = match.span() |
2944 linenum += body.count('\n', begin, mstart) + 1 | 2944 linenum += body.count('\n', begin, mstart) + 1 |