changeset 25250:f9a29dc964a3

match: fix bug in match.visitdir() There was a bug in my recent change to visitdir (8545bd381504) due to the stored generator being iterated over twice. Making the generator into a list at the start fixes this.
author Drew Gottlieb <drgott@google.com>
date Fri, 22 May 2015 14:39:34 -0700
parents 4311e78a4609
children 235f6490550c
files mercurial/match.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/match.py	Thu May 21 16:20:34 2015 -0400
+++ b/mercurial/match.py	Fri May 22 14:39:34 2015 -0700
@@ -197,7 +197,7 @@
         parentdirs = None
         if (self._includeroots and dir not in self._includeroots and
                 dir not in self._includedirs):
-            parentdirs = util.finddirs(dir)
+            parentdirs = list(util.finddirs(dir))
             if not any(parent in self._includeroots for parent in parentdirs):
                 return False
         return (not self._fileroots or '.' in self._fileroots or