def _recursive_dirlist(prepend, xdev, bup_dir=None, excluded_paths=None):
for (name,pst) in _dirlist():
+ if excluded_paths:
+ if os.path.normpath(prepend+name) in excluded_paths:
+ debug1('Skipping %r: excluded.\n' % (prepend+name))
+ continue
if name.endswith('/'):
if xdev != None and pst.st_dev != xdev:
debug1('Skipping %r: different filesystem.\n' % (prepend+name))
if os.path.normpath(prepend+name) == bup_dir:
debug1('Skipping BUP_DIR.\n')
continue
- if excluded_paths:
- if os.path.normpath(prepend+name) in excluded_paths:
- debug1('Skipping %r: excluded.\n' % (prepend+name))
- continue
try:
OsFile(name).fchdir()
except OSError, e:
WVPASS bup random 128k >$D/b
mkdir $D/d $D/d/e
WVPASS bup random 512 >$D/f
-WVPASS bup index -ux --exclude $D/d $D
+WVPASS bup random 512 >$D/j
+WVPASS bup index -ux --exclude $D/d --exclude $D/j $D
bup save -n exclude $D
WVPASSEQ "$(bup ls exclude/latest/$TOP/$D/)" "a
b
f"
-mkdir $D/g $D/h
-WVPASS bup index -ux --exclude $D/d --exclude $TOP/$D/g --exclude $D/h $D
+WVPASS mkdir $D/g $D/h
+WVPASS bup index -ux --exclude $D/d --exclude $TOP/$D/g --exclude $D/h \
+ --exclude $TOP/$D/j $D
bup save -n exclude $D
WVPASSEQ "$(bup ls exclude/latest/$TOP/$D/)" "a
b
EXCLUDE_FILE=exclude-from.tmp
echo "$D/d
$TOP/$D/g
-$D/h" > $EXCLUDE_FILE
+$D/h
+$D/i" > $EXCLUDE_FILE
force-delete $D
mkdir $D
export BUP_DIR="$D/.bup"
mkdir $D/d $D/d/e
WVPASS bup random 512 >$D/f
mkdir $D/g $D/h
+WVPASS bup random 128k > $D/i
WVPASS bup index -ux --exclude-from $EXCLUDE_FILE $D
bup save -n exclude-from $D
WVPASSEQ "$(bup ls exclude-from/latest/$TOP/$D/)" "a