Patchwork [5,of,7] context: remove redundant handling of match.bad return value

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 16, 2014, 1:18 a.m.
Message ID <f85de316fddc513f7304.1389835093@localhost.localdomain>
Download mbox | patch
Permalink /patch/3343/
State Superseded
Commit a63958bcf63ad45529e6cacb6514ba7a6a509a94
Headers show

Comments

Mads Kiilerich - Jan. 16, 2014, 1:18 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1380816081 -7200
#      Thu Oct 03 18:01:21 2013 +0200
# Node ID f85de316fddc513f7304f345e4666f060349af1a
# Parent  f20bc114853d8752e04dcf573e9c0e78a43b65a0
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
@@ -420,8 +420,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: