Commit 47aa6fd5 authored by bescoto's avatar bescoto

Fixed selection bug reported by Daniel Richard G. and added test to

selectiontest.py to check for it.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@602 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 1c34df03
......@@ -35,6 +35,8 @@ when the repository has permission problems.
Added Keith Edmunds patch adding the --create-full-path option.
Fixed selection bug reported by Daniel Richard G.
New in v0.13.6 (2005/04/07)
---------------------------
......
......@@ -211,7 +211,8 @@ class Select:
"""Run through the selection functions and return dominant val 0/1/2"""
for sf in self.selection_functions:
result = sf(rp)
if result is not None: return result
if result == 1 or result == 0 or (result == 2 and rp.isdir()):
return result
return 1
def ParseArgs(self, argtuples, filelists):
......
......@@ -413,6 +413,14 @@ testfiles/select**/2
("--exclude", "**")],
[(), ('1',), ('1', '1'), ('1', '2')])
def testGlob3(self):
"""Test for bug when **is in front"""
self.ParseTest([("--include", "**NOTEXIST"),
("--exclude", "**NOTEXISTEITHER"),
("--include", "testfiles/select/efools"),
("--exclude", "**")],
[(), ('efools',), ('efools', 'ping')])
def testAlternateRoot(self):
"""Test select with different root"""
self.root = rpath.RPath(Globals.local_connection, "testfiles/select/1")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment