Submitter | Katsunori FUJIWARA |
---|---|
Date | Jan. 18, 2014, 3:24 p.m. |
Message ID | <6d45a04d72d399f72d92.1390058642@vm-debian.dzone.foozy.private> |
Download | mbox | patch |
Permalink | /patch/3384/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3251,10 +3251,7 @@ cols.append((ui.shortuser(ctx.user()), 'grep.user')) if opts.get('date'): cols.append((datefunc(ctx.date()), 'grep.date')) - if opts.get('files_with_matches'): - if found: - continue - else: + if not opts.get('files_with_matches'): before = l.line[:l.colstart] match = l.line[l.colstart:l.colend] after = l.line[l.colend:] @@ -3272,6 +3269,8 @@ ui.write(after) ui.write(eol) found = True + if before is None: + break return found skip = {}