From 210102d0598480b5eef0c18afeaa767be079235a Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 20 Apr 2008 20:58:43 +0300 Subject: Unsolve the directory name before looking it up in the previous generation, so there's a chance it will be found. --- obnam/app.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'obnam') 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] -- cgit v1.2.1