]> arthur.barton.de Git - bup.git/commitdiff
Just log when skipping a large file during save
authorNix <nix@esperi.org.uk>
Sat, 19 Jul 2014 22:01:58 +0000 (23:01 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 20 Jul 2014 17:22:32 +0000 (12:22 -0500)
If bup-save --smaller= is specified, the user *expects* large files
to be skipped.  Having bup report errors and return exitcode 1 in this
case hides real errors.  Instead, log it when running verbosely, but
not otherwise.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
[rlb@defaultvalue.org: adjust commit summary; simplify opt.verbose >= 1
 to opt.verbose]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
cmd/save-cmd.py

index 8067facb872c38ffb40832d7442b7a81f3b43436..fce9aadc95659c36014c3032df309e865bb257aa 100755 (executable)
@@ -274,7 +274,8 @@ for (transname,ent) in r.filter(extra, wantrecurse=wantrecurse_during):
         continue
     if opt.smaller and ent.size >= opt.smaller:
         if exists and not hashvalid:
-            add_error('skipping large file "%s"' % ent.name)
+            if opt.verbose:
+                log('skipping large file "%s"\n' % ent.name)
             lastskip_name = ent.name
         continue