From: W. Trevor King Date: Mon, 31 Aug 2009 17:54:09 +0000 (-0400) Subject: BugDir.duplicate_bugdir() fix for when parent bugdir's sync_with_disk == False. X-Git-Tag: 1.0.0~62^2~23 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e67058f13ce09ab6870c8bd8ebfa2f198bd06b47;p=be.git BugDir.duplicate_bugdir() fix for when parent bugdir's sync_with_disk == False. --- 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)