fix a bug with svnwc.listdir() not accepting a checker(versioned=...)

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-11-12 13:09:27 +01:00
parent e6f2258409
commit a4a652af85
2 changed files with 12 additions and 3 deletions

View File

@ -808,9 +808,11 @@ recursively. """
def notsvn(path):
return path.basename != '.svn'
paths = [self.__class__(p, auth=self.auth)
for p in self.localpath.listdir()
if notsvn(p) and (not fil or fil(p))]
paths = []
for localpath in self.localpath.listdir(notsvn):
p = self.__class__(localpath, auth=self.auth)
if notsvn(p) and (not fil or fil(p)):
paths.append(p)
self._sortlist(paths, sort)
return paths

View File

@ -276,6 +276,13 @@ class TestWCSvnCommandPath(CommonSvnTests):
finally:
notexisting.remove()
def test_listdir_versioned(self, path1):
assert path1.check(versioned=1)
p = path1.localpath.ensure("not_a_versioned_file")
l = [x.localpath
for x in path1.listdir(lambda x: x.check(versioned=True))]
assert p not in l
def test_nonversioned_remove(self, path1):
assert path1.check(versioned=1)
somefile = path1.join('nonversioned/somefile')