mercurial/cmdutil.py
changeset 44049 6cfaebb625d3
parent 43942 6c8108274dc5
child 44098 19533e4c3450
--- a/mercurial/cmdutil.py	Thu Jan 09 10:17:10 2020 -0500
+++ b/mercurial/cmdutil.py	Thu Jan 09 15:41:40 2020 -0800
@@ -2429,12 +2429,16 @@
 
                     def fns_generator():
                         if allfiles:
-                            fiter = iter(ctx)
+
+                            def bad(f, msg):
+                                pass
+
+                            for f in ctx.matches(matchmod.badmatch(match, bad)):
+                                yield f
                         else:
-                            fiter = ctx.files()
-                        for f in fiter:
-                            if match(f):
-                                yield f
+                            for f in ctx.files():
+                                if match(f):
+                                    yield f
 
                     fns = fns_generator()
                 prepare(ctx, fns)