Added annex.autoupgraderepository configuration
Can be set to false to prevent any automatic repository upgrades. Also, removed direct mode specific upgrade code in Annex.Init, and made needsUpgrade always include the name/path of the repo, so if there's a problem it's clear what repo has the problem. And, made needsUpgrade catch any exceptions that might occur during the upgrade, so it can display a more useful error message than just the exception.
This commit is contained in:
parent
b421004d75
commit
f845195354
7 changed files with 53 additions and 23 deletions
|
@ -13,9 +13,13 @@ import Annex.Version
|
|||
import Annex.Init
|
||||
|
||||
cmd :: Command
|
||||
cmd = dontCheck repoExists $ -- because an old version may not seem to exist
|
||||
noDaemonRunning $ -- avoid upgrading repo out from under daemon
|
||||
command "upgrade" SectionMaintenance "upgrade repository layout"
|
||||
cmd = dontCheck repoExists $
|
||||
-- ^ because an old version may not seem to exist
|
||||
-- and also, this avoids automatic silent upgrades before
|
||||
-- this command can start up.
|
||||
noDaemonRunning $
|
||||
-- ^ avoid upgrading repo out from under daemon
|
||||
command "upgrade" SectionMaintenance "upgrade repository"
|
||||
paramNothing (withParams seek)
|
||||
|
||||
seek :: CmdParams -> CommandSeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue