From 53318d6ef1ec94b5c75c0bca186b0d3efb9d8c5f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Mar 2013 14:55:25 -0400 Subject: [PATCH] webapp: fix display of paused local repo --- Assistant/WebApp/Configurators/Edit.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assistant/WebApp/Configurators/Edit.hs b/Assistant/WebApp/Configurators/Edit.hs index 170eaa0188..6e62bc2709 100644 --- a/Assistant/WebApp/Configurators/Edit.hs +++ b/Assistant/WebApp/Configurators/Edit.hs @@ -24,6 +24,7 @@ import Types.StandardGroups import qualified Git import qualified Git.Command import qualified Git.Config +import qualified Annex import Git.Remote import qualified Data.Text as T @@ -46,13 +47,16 @@ getRepoConfig uuid mremote = RepoConfig <$> pure (T.pack $ maybe "here" Remote.name mremote) <*> (maybe Nothing (Just . T.pack) . M.lookup uuid <$> uuidMap) <*> getrepogroup - <*> pure (maybe True (remoteAnnexSync . Remote.gitconfig) mremote) + <*> getsyncing where getrepogroup = do groups <- lookupGroups uuid return $ maybe (RepoGroupCustom $ unwords $ S.toList groups) RepoGroupStandard (getStandardGroup groups) + getsyncing = case mremote of + Just r -> return $ remoteAnnexSync $ Remote.gitconfig r + Nothing -> annexAutoCommit <$> Annex.getGitConfig setRepoConfig :: UUID -> Maybe Remote -> RepoConfig -> RepoConfig -> Handler () setRepoConfig uuid mremote oldc newc = do