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.
This commit is contained in:
parent
3a0842d9f8
commit
37b42e72e7
1 changed files with 4 additions and 4 deletions
|
@ -32,12 +32,12 @@ import Annex.AdjustedBranch
|
||||||
import qualified Data.ByteString as S
|
import qualified Data.ByteString as S
|
||||||
|
|
||||||
upgrade :: Bool -> Annex Bool
|
upgrade :: Bool -> Annex Bool
|
||||||
upgrade automatic = do
|
upgrade automatic = flip catchNonAsync (const $ return False) $ do
|
||||||
unless automatic $
|
unless automatic $
|
||||||
showAction "v5 to v6"
|
showAction "v5 to v6"
|
||||||
ifM isDirect
|
ifM isDirect
|
||||||
( do
|
( do
|
||||||
convertDirect automatic
|
convertDirect
|
||||||
-- Worktree files are already populated, so don't
|
-- Worktree files are already populated, so don't
|
||||||
-- have this try to populate them again.
|
-- have this try to populate them again.
|
||||||
scanUnlockedFiles False
|
scanUnlockedFiles False
|
||||||
|
@ -52,8 +52,8 @@ upgrade automatic = do
|
||||||
createInodeSentinalFile True
|
createInodeSentinalFile True
|
||||||
return True
|
return True
|
||||||
|
|
||||||
convertDirect :: Bool -> Annex ()
|
convertDirect :: Annex ()
|
||||||
convertDirect automatic = do
|
convertDirect = do
|
||||||
{- Direct mode makes the same tradeoff of using less disk
|
{- Direct mode makes the same tradeoff of using less disk
|
||||||
- space, with less preservation of old versions of files
|
- space, with less preservation of old versions of files
|
||||||
- as does annex.thin. -}
|
- as does annex.thin. -}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue