[PATCH 1 of 3] Fix performance of dirstate.changes with ignored directories

Bryan O'Sullivan bos at serpentine.com
Sat Sep 17 02:38:31 CDT 2005


# HG changeset patch
# User Bryan O'Sullivan <bos at serpentine.com>
# Node ID c631f26346ca1a6beabfbd0730cc285108e2d720
# Parent  703783bc09c463ed946354e29e290b99aa91bb98
Fix performance of dirstate.changes with ignored directories.

diff -r 703783bc09c4 -r c631f26346ca mercurial/dirstate.py
--- a/mercurial/dirstate.py	Fri Sep 16 21:01:03 2005
+++ b/mercurial/dirstate.py	Sat Sep 17 07:23:19 2005
@@ -333,7 +333,8 @@
                     l.append(fn)
 
             if not s or stat.S_ISDIR(s.st_mode):
-                return self.ignore(fn) and False or match(fn)
+                if self.ignore(fn): return False
+                return match(fn)
 
             if not stat.S_ISREG(s.st_mode):
                 return False


More information about the Mercurial mailing list