fix a bug with svnwc.listdir() not accepting a checker(versioned=...)
--HG-- branch : trunk
This commit is contained in:
parent
e6f2258409
commit
a4a652af85
|
@ -808,9 +808,11 @@ recursively. """
|
||||||
def notsvn(path):
|
def notsvn(path):
|
||||||
return path.basename != '.svn'
|
return path.basename != '.svn'
|
||||||
|
|
||||||
paths = [self.__class__(p, auth=self.auth)
|
paths = []
|
||||||
for p in self.localpath.listdir()
|
for localpath in self.localpath.listdir(notsvn):
|
||||||
if notsvn(p) and (not fil or fil(p))]
|
p = self.__class__(localpath, auth=self.auth)
|
||||||
|
if notsvn(p) and (not fil or fil(p)):
|
||||||
|
paths.append(p)
|
||||||
self._sortlist(paths, sort)
|
self._sortlist(paths, sort)
|
||||||
return paths
|
return paths
|
||||||
|
|
||||||
|
|
|
@ -276,6 +276,13 @@ class TestWCSvnCommandPath(CommonSvnTests):
|
||||||
finally:
|
finally:
|
||||||
notexisting.remove()
|
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):
|
def test_nonversioned_remove(self, path1):
|
||||||
assert path1.check(versioned=1)
|
assert path1.check(versioned=1)
|
||||||
somefile = path1.join('nonversioned/somefile')
|
somefile = path1.join('nonversioned/somefile')
|
||||||
|
|
Loading…
Reference in New Issue