full autostart support

git annex assistant --autostart will start separate daemons in each
listed autostart repo

running the webapp outside any git-annex repo will open it on the
first listed autostart repo
This commit is contained in:
Joey Hess 2012-08-02 00:42:33 -04:00
parent 23fe661d37
commit 60da0d6ad2
8 changed files with 134 additions and 23 deletions

View file

@ -21,6 +21,7 @@ import Init
import qualified Git.Construct
import qualified Git.Config
import qualified Annex
import Locations.UserConfig
import Yesod
import Data.Text (Text)
@ -159,7 +160,10 @@ makeRepo path = do
error "git init failed!"
g <- Git.Config.read =<< Git.Construct.fromPath path
state <- Annex.new g
Annex.eval state $ initialize $ Just "new repo"
Annex.eval state $ initialize $ Just "new repo" -- TODO better description
autostart <- autoStartFile
createDirectoryIfMissing True (parentDir autostart)
appendFile autostart $ path ++ "\n"
getAddRepositoryR :: Handler RepHtml
getAddRepositoryR = bootstrap (Just Config) $ do