From 37b42e72e7485d56f2b4bfd63eeb43d8ebd8ceb5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 27 Aug 2019 12:32:44 -0400 Subject: [PATCH] catch exceptions in upgrade Exceptions due to eg, not being able to write to the repo are not very useful. There tends to be an error message from git about permission denied. --- Upgrade/V5.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Upgrade/V5.hs b/Upgrade/V5.hs index fbeb34a438..a7ea4efb64 100644 --- a/Upgrade/V5.hs +++ b/Upgrade/V5.hs @@ -32,12 +32,12 @@ import Annex.AdjustedBranch import qualified Data.ByteString as S upgrade :: Bool -> Annex Bool -upgrade automatic = do +upgrade automatic = flip catchNonAsync (const $ return False) $ do unless automatic $ showAction "v5 to v6" ifM isDirect ( do - convertDirect automatic + convertDirect -- Worktree files are already populated, so don't -- have this try to populate them again. scanUnlockedFiles False @@ -52,8 +52,8 @@ upgrade automatic = do createInodeSentinalFile True return True -convertDirect :: Bool -> Annex () -convertDirect automatic = do +convertDirect :: Annex () +convertDirect = do {- Direct mode makes the same tradeoff of using less disk - space, with less preservation of old versions of files - as does annex.thin. -}