diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2935,7 +2935,7 @@ def grep(ui, repo, pattern, *pats, **opt def matchlines(body): begin = 0 linenum = 0 - while True and begin < len(body): + while begin < len(body): match = regexp.search(body, begin) if not match: break