1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-27 18:28:42 +00:00

move progress information out of tests and back in converter

this was a remnant of when i was writing the converter/upgrader code,
and was destined to be a general progress message in the migration
process. i removed a more technical, internal debugging message in
exchange
This commit is contained in:
Antoine Beaupré 2015-10-09 12:34:02 -04:00
parent efa88ef6c6
commit fd41408de2
2 changed files with 2 additions and 6 deletions

View file

@ -1,5 +1,3 @@
import logging
logger = logging.getLogger(__name__)
import os import os
import shutil import shutil
import tempfile import tempfile
@ -79,7 +77,6 @@ def test_convert_segments(tmpdir, attic_repo):
""" """
# check should fail because of magic number # check should fail because of magic number
assert not repo_valid(tmpdir) assert not repo_valid(tmpdir)
logger.info("opening attic repository with borg and converting")
repo = AtticRepositoryUpgrader(str(tmpdir), create=False) repo = AtticRepositoryUpgrader(str(tmpdir), create=False)
segments = [filename for i, filename in repo.io.segment_iterator()] segments = [filename for i, filename in repo.io.segment_iterator()]
repo.close() repo.close()
@ -158,7 +155,6 @@ def test_convert_all(tmpdir, attic_repo, attic_key_file):
""" """
# check should fail because of magic number # check should fail because of magic number
assert not repo_valid(tmpdir) assert not repo_valid(tmpdir)
logger.info("opening attic repository with borg and converting")
repo = AtticRepositoryUpgrader(str(tmpdir), create=False) repo = AtticRepositoryUpgrader(str(tmpdir), create=False)
repo.upgrade(dryrun=False) repo.upgrade(dryrun=False)
assert key_valid(attic_key_file.path) assert key_valid(attic_key_file.path)

View file

@ -26,8 +26,8 @@ def upgrade(self, dryrun=True):
we nevertheless do the order in reverse, as we prefer to do we nevertheless do the order in reverse, as we prefer to do
the fast stuff first, to improve interactivity. the fast stuff first, to improve interactivity.
""" """
logger.info("reading segments from attic repository using borg") logger.info("opening attic repository with borg and converting")
# we need to open it to load the configuration and other fields # we need to open the repo to load configuration, keyfiles and segments
self.open(self.path, exclusive=False) self.open(self.path, exclusive=False)
segments = [filename for i, filename in self.io.segment_iterator()] segments = [filename for i, filename in self.io.segment_iterator()]
try: try: