from stat import S_ISDIR
from bup import git, client, helpers, vfs
-from bup.compat import wrap_main
+from bup.compat import hexstr, wrap_main
from bup.git import get_cat_data, parse_commit, walk_object
from bup.helpers import add_error, debug1, handle_ctrl_c, log, saved_errors
from bup.helpers import hostname, shstr, tty_width
def log_item(name, type, opt, tree=None, commit=None, tag=None):
if tag and opt.print_tags:
- print(tag.encode('hex'))
+ print(hexstr(tag))
if tree and opt.print_trees:
- print(tree.encode('hex'))
+ print(hexstr(tree))
if commit and opt.print_commits:
- print(commit.encode('hex'))
+ print(hexstr(commit))
if opt.verbose:
last = ''
if type in ('root', 'branch', 'save', 'commit', 'tree'):
with dest_repo as dest_repo:
with LocalRepo(repo_dir=src_dir) as src_repo:
with dest_repo.new_packwriter(compression_level=opt.compress) as writer:
-
- src_repo = LocalRepo(repo_dir=src_dir)
-
# Resolve and validate all sources and destinations,
# implicit or explicit, and do it up-front, so we can
# fail before we start writing (for any obviously