Merge branch 'master' of /home/b-git-annex/source
This commit is contained in:
commit
f70e1198a1
2 changed files with 0 additions and 16 deletions
|
@ -19,7 +19,6 @@ import Config
|
||||||
import Config.Files.AutoStart
|
import Config.Files.AutoStart
|
||||||
import Annex.NumCopies
|
import Annex.NumCopies
|
||||||
import Utility.DataUnits
|
import Utility.DataUnits
|
||||||
import Git.Config
|
|
||||||
import Types.Distribution
|
import Types.Distribution
|
||||||
import Assistant.Upgrade
|
import Assistant.Upgrade
|
||||||
|
|
||||||
|
@ -31,7 +30,6 @@ data PrefsForm = PrefsForm
|
||||||
, numCopies :: Int
|
, numCopies :: Int
|
||||||
, autoStart :: Bool
|
, autoStart :: Bool
|
||||||
, autoUpgrade :: AutoUpgrade
|
, autoUpgrade :: AutoUpgrade
|
||||||
, enableDebug :: Bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prefsAForm :: PrefsForm -> MkAForm PrefsForm
|
prefsAForm :: PrefsForm -> MkAForm PrefsForm
|
||||||
|
@ -44,12 +42,9 @@ prefsAForm d = PrefsForm
|
||||||
"Auto start" (Just $ autoStart d)
|
"Auto start" (Just $ autoStart d)
|
||||||
<*> areq (selectFieldList autoUpgradeChoices)
|
<*> areq (selectFieldList autoUpgradeChoices)
|
||||||
(bfs autoUpgradeLabel) (Just $ autoUpgrade d)
|
(bfs autoUpgradeLabel) (Just $ autoUpgrade d)
|
||||||
<*> areq (checkBoxField `withNote` debugnote)
|
|
||||||
"Enable debug logging" (Just $ enableDebug d)
|
|
||||||
where
|
where
|
||||||
diskreservenote = [whamlet|<br>Avoid downloading files from other repositories when there is too little free disk space.|]
|
diskreservenote = [whamlet|<br>Avoid downloading files from other repositories when there is too little free disk space.|]
|
||||||
numcopiesnote = [whamlet|<br>Only drop a file after verifying that other repositories contain this many copies.|]
|
numcopiesnote = [whamlet|<br>Only drop a file after verifying that other repositories contain this many copies.|]
|
||||||
debugnote = [whamlet|<a href="@{LogR}">View Log</a>|]
|
|
||||||
autostartnote = [whamlet|Start the git-annex assistant at boot or on login.|]
|
autostartnote = [whamlet|Start the git-annex assistant at boot or on login.|]
|
||||||
|
|
||||||
autoUpgradeChoices :: [(Text, AutoUpgrade)]
|
autoUpgradeChoices :: [(Text, AutoUpgrade)]
|
||||||
|
@ -86,7 +81,6 @@ getPrefs = PrefsForm
|
||||||
<*> (fromNumCopies <$> getNumCopies)
|
<*> (fromNumCopies <$> getNumCopies)
|
||||||
<*> inAutoStartFile
|
<*> inAutoStartFile
|
||||||
<*> (annexAutoUpgrade <$> Annex.getGitConfig)
|
<*> (annexAutoUpgrade <$> Annex.getGitConfig)
|
||||||
<*> (annexDebug <$> Annex.getGitConfig)
|
|
||||||
|
|
||||||
storePrefs :: PrefsForm -> Annex ()
|
storePrefs :: PrefsForm -> Annex ()
|
||||||
storePrefs p = do
|
storePrefs p = do
|
||||||
|
@ -99,10 +93,6 @@ storePrefs p = do
|
||||||
liftIO $ if autoStart p
|
liftIO $ if autoStart p
|
||||||
then addAutoStartFile here
|
then addAutoStartFile here
|
||||||
else removeAutoStartFile here
|
else removeAutoStartFile here
|
||||||
setConfig (annexConfig "debug") (boolConfig $ enableDebug p)
|
|
||||||
if enableDebug p
|
|
||||||
then enableDebugOutput
|
|
||||||
else disableDebugOutput
|
|
||||||
|
|
||||||
getPreferencesR :: Handler Html
|
getPreferencesR :: Handler Html
|
||||||
getPreferencesR = postPreferencesR
|
getPreferencesR = postPreferencesR
|
||||||
|
|
|
@ -42,7 +42,6 @@ module Messages (
|
||||||
showRaw,
|
showRaw,
|
||||||
setupConsole,
|
setupConsole,
|
||||||
enableDebugOutput,
|
enableDebugOutput,
|
||||||
disableDebugOutput,
|
|
||||||
commandProgressDisabled,
|
commandProgressDisabled,
|
||||||
jsonOutputEnabled,
|
jsonOutputEnabled,
|
||||||
outputMessage,
|
outputMessage,
|
||||||
|
@ -264,11 +263,6 @@ enableDebugOutput = do
|
||||||
dd <- liftIO debugDisplayer
|
dd <- liftIO debugDisplayer
|
||||||
liftIO $ configureDebug dd selector
|
liftIO $ configureDebug dd selector
|
||||||
|
|
||||||
disableDebugOutput :: Annex ()
|
|
||||||
disableDebugOutput = liftIO $ do
|
|
||||||
dd <- debugDisplayer
|
|
||||||
configureDebug dd (DebugSelector (const False))
|
|
||||||
|
|
||||||
debugDisplayer :: IO (S.ByteString -> IO ())
|
debugDisplayer :: IO (S.ByteString -> IO ())
|
||||||
debugDisplayer = do
|
debugDisplayer = do
|
||||||
-- Debug output will get mixed in with any other output
|
-- Debug output will get mixed in with any other output
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue