summaryrefslogtreecommitdiff
path: root/obnam
diff options
context:
space:
mode:
authorLars Wirzenius <liw@gytha>2008-04-20 20:58:43 +0300
committerLars Wirzenius <liw@gytha>2008-04-20 20:58:43 +0300
commit210102d0598480b5eef0c18afeaa767be079235a (patch)
treefa983e6e602cacd012b7e02dfd07f04bb4ee8931 /obnam
parentdf3298e09d7b436eab36b989f80834e8e83bd038 (diff)
downloadobnam-210102d0598480b5eef0c18afeaa767be079235a.tar.gz
Unsolve the directory name before looking it up in the previous generation, so there's a chance it will be found.
Diffstat (limited to 'obnam')
-rw-r--r--obnam/app.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/obnam/app.py b/obnam/app.py
index d45e0de6..838e1b9e 100644
--- a/obnam/app.py
+++ b/obnam/app.py
@@ -296,10 +296,15 @@ class Application:
that need backing up.
"""
-
+
+ unsolved = obnam.io.unsolve(self.get_context(), dirname)
+ logging.debug("Selecting files to backup in %s (unsolved)" % unsolved)
+ logging.debug("There are %d filenames currently" % len(filenames))
+
filenames = filenames[:]
- old_dir = self.get_dir_in_previous_generation(dirname)
+ old_dir = self.get_dir_in_previous_generation(unsolved)
if old_dir:
+ logging.debug("Found directory in previous generation")
old_groups = [self.get_store().get_object(id)
for id in old_dir.get_filegrouprefs()]
filegroups = self.find_unchanged_filegroups(dirname, old_groups,
@@ -311,6 +316,7 @@ class Application:
return filegroups, filenames
else:
+ logging.debug("Did not find directory in previous generation")
return [], filenames
def backup_one_dir(self, dirname, subdirs, filenames):
@@ -323,9 +329,12 @@ class Application:
"""
- filenames = self._make_absolute(dirname, filenames)
+ logging.debug("Backing up non-recursively: %s" % dirname)
filegroups, filenames = self.select_files_to_back_up(dirname,
filenames)
+ logging.debug("Selected %d existing file groups, %d filenames" %
+ (len(filegroups), len(filenames)))
+ filenames = self._make_absolute(dirname, filenames)
filegroups += self.make_filegroups(filenames)
filegrouprefs = [fg.get_id() for fg in filegroups]