]> arthur.barton.de Git - bup.git/blobdiff - cmd/prune-older-cmd.py
LocalRepo.__init__: use correct dir everywhere
[bup.git] / cmd / prune-older-cmd.py
index 12a440a5cbf23964d7ce79e929a8602b684e243a..6c67b69bfc72e1e717d6abfa6c5cd1aea3b12c66 100755 (executable)
@@ -5,7 +5,7 @@ exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
 
-from __future__ import print_function
+from __future__ import absolute_import, print_function
 from collections import defaultdict
 from itertools import groupby
 from sys import stderr
@@ -15,6 +15,7 @@ import re, sys
 from bup import git, options
 from bup.gc import bup_gc
 from bup.helpers import die_if_errors, log, partition, period_as_secs
+from bup.repo import LocalRepo
 from bup.rm import bup_rm
 
 
@@ -149,7 +150,8 @@ for branch, branch_id in branches(roots):
 
 if not opt.pretend:
     die_if_errors()
-    bup_rm(removals, compression=opt.compress, verbosity=opt.verbose)
+    repo = LocalRepo()
+    bup_rm(repo, removals, compression=opt.compress, verbosity=opt.verbose)
     if opt.gc:
         die_if_errors()
         bup_gc(threshold=opt.gc_threshold,