X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=blobdiff_plain;f=lib%2Fbup%2Frm.py;h=9eb810b2173998224b599fe1cffa50ad058f8768;hp=5365a7ddac1883fb87b0f92f0ac11ea552368c06;hb=20fcdad802c66c127f41adb565f756b5cd422373;hpb=abc542d17f3b477c7d16ef9c0c52e96133b66d56 diff --git a/lib/bup/rm.py b/lib/bup/rm.py index 5365a7d..9eb810b 100644 --- a/lib/bup/rm.py +++ b/lib/bup/rm.py @@ -85,7 +85,7 @@ def dead_items(vfs_top, paths): return dead_branches, dead_saves -def bup_rm(paths, opt): +def bup_rm(paths, compression=6, verbosity=None): root = vfs.RefList(None) dead_branches, dead_saves = dead_items(root, paths) @@ -95,7 +95,7 @@ def bup_rm(paths, opt): writer = None if dead_saves: - writer = git.PackWriter(compression_level=opt.compress) + writer = git.PackWriter(compression_level=compression) try: for branch, saves in dead_saves.iteritems(): @@ -124,7 +124,7 @@ def bup_rm(paths, opt): git.delete_ref(ref_name, orig_ref.encode('hex')) else: git.update_ref(ref_name, new_ref, orig_ref) - if opt.verbose: + if verbosity: new_hex = new_ref.encode('hex') if orig_ref: orig_hex = orig_ref.encode('hex')