From e67058f13ce09ab6870c8bd8ebfa2f198bd06b47 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 31 Aug 2009 13:54:09 -0400 Subject: [PATCH] BugDir.duplicate_bugdir() fix for when parent bugdir's sync_with_disk == False. --- libbe/bugdir.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libbe/bugdir.py b/libbe/bugdir.py index 3be579f..af43917 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -510,8 +510,14 @@ settings easy. Don't set this attribute. Set .vcs instead, and duplicate_path = self.vcs.duplicate_repo(revision) duplicate_version_path = os.path.join(duplicate_path, ".be", "version") - version = self.get_version(duplicate_version_path, - for_duplicate_bugdir=True) + try: + version = self.get_version(duplicate_version_path, + for_duplicate_bugdir=True) + except DiskAccessRequired: + self.sync_with_disk = True # temporarily allow access + version = self.get_version(duplicate_version_path, + for_duplicate_bugdir=True) + self.sync_with_disk = False if version != upgrade.BUGDIR_DISK_VERSION: upgrade.upgrade(duplicate_path, version) -- 2.26.2