diff mercurial/localrepo.py @ 16645:9a21fc2c7d32

localrepo: optimize internode status calls using match.always Introduce match.always() to check if a match object always says yes, i.e. None was passed in. If so, mfmatches should not bother iterating every file in the repository.
author Jesse Glick <jesse.glick@oracle.com>
date Fri, 04 May 2012 15:54:55 -0400
parents 3c738cb162bf
children a1dcd842ce17
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri May 11 23:11:43 2012 +0200
+++ b/mercurial/localrepo.py	Fri May 04 15:54:55 2012 -0400
@@ -1333,6 +1333,8 @@
 
         def mfmatches(ctx):
             mf = ctx.manifest().copy()
+            if match.always():
+                return mf
             for fn in mf.keys():
                 if not match(fn):
                     del mf[fn]