Patchwork [6,of,8,match] context: remove redundant handling of match.bad return value

login
register
mail settings
Submitter Mads Kiilerich
Date April 15, 2014, 12:40 a.m.
Message ID <76d292fa6cfab7623971.1397522440@mk-desktop>
Download mbox | patch
Permalink /patch/4358/
State Accepted
Commit a63958bcf63ad45529e6cacb6514ba7a6a509a94
Headers show

Comments

Mads Kiilerich - April 15, 2014, 12:40 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1380816081 -7200
#      Thu Oct 03 18:01:21 2013 +0200
# Node ID 76d292fa6cfab7623971bf974a338a02f93fe86e
# Parent  3abe9211dc59c81c062df38ec7f9c1d45d250134
context: remove redundant handling of match.bad return value

The 'bad' function is for reporting - it never returns anything.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -433,8 +433,7 @@  class changectx(basectx):
             if fn in self._dirs:
                 # specified pattern is a directory
                 continue
-            if match.bad(fn, _('no such file in rev %s') % self) and match(fn):
-                yield fn
+            match.bad(fn, _('no such file in rev %s') % self)
 
 class basefilectx(object):
     """A filecontext object represents the common logic for its children: