
* Fix minor FD leak in journal code. Closes: #754608 * direct: Fix handling of case where a work tree subdirectory cannot be written to due to permissions. * migrate: Avoid re-checksumming when migrating from hashE to hash backend. * uninit: Avoid failing final removal in some direct mode repositories due to file modes. * S3: Deal with AWS ACL configurations that do not allow creating or checking the location of a bucket, but only reading and writing content to it. * resolvemerge: New plumbing command that runs the automatic merge conflict resolver. * Deal with change in git 2.0 that made indirect mode merge conflict resolution leave behind old files. * sync: Fix git sync with local git remotes even when they don't have an annex.uuid set. (The assistant already did so.) * Set gcrypt-publish-participants when setting up a gcrypt repository, to avoid unncessary passphrase prompts. This is a security/usability tradeoff. To avoid exposing the gpg key ids who can decrypt the repository, users can unset gcrypt-publish-participants. * Install nautilus hooks even when ~/.local/share/nautilus/ does not yet exist, since it is not automatically created for Gnome 3 users. * Windows: Move .vbs files out of git\bin, to avoid that being in the PATH, which caused some weird breakage. (Thanks, divB) * Windows: Fix locking issue that prevented the webapp starting (since 5.20140707). # imported from the archive
72 lines
1.6 KiB
Haskell
72 lines
1.6 KiB
Haskell
{- Yesod stuff, that's typically found in the scaffolded site.
|
|
-
|
|
- Also a bit of a compatability layer to make it easier to support yesod
|
|
- 1.1 and 1.2 in the same code base.
|
|
-
|
|
- Copyright 2012, 2013 Joey Hess <joey@kitenet.net>
|
|
-
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
-}
|
|
|
|
{-# LANGUAGE CPP, RankNTypes, FlexibleContexts #-}
|
|
|
|
module Utility.Yesod
|
|
( module Y
|
|
, liftH
|
|
#ifndef __NO_TH__
|
|
, widgetFile
|
|
, hamletTemplate
|
|
#endif
|
|
#if ! MIN_VERSION_yesod(1,2,0)
|
|
, giveUrlRenderer
|
|
, Html
|
|
#endif
|
|
) where
|
|
|
|
#if MIN_VERSION_yesod(1,2,0)
|
|
import Yesod as Y
|
|
#else
|
|
import Yesod as Y hiding (Html)
|
|
#endif
|
|
import Assistant.WebApp.Bootstrap3 as Y hiding (bfs)
|
|
#ifndef __NO_TH__
|
|
import Yesod.Default.Util
|
|
import Language.Haskell.TH.Syntax (Q, Exp)
|
|
#if MIN_VERSION_yesod_default(1,1,0)
|
|
import Data.Default (def)
|
|
import Text.Hamlet hiding (Html)
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef __NO_TH__
|
|
widgetFile :: String -> Q Exp
|
|
#if ! MIN_VERSION_yesod_default(1,1,0)
|
|
widgetFile = widgetFileNoReload
|
|
#else
|
|
widgetFile = widgetFileNoReload $ def
|
|
{ wfsHamletSettings = defaultHamletSettings
|
|
{ hamletNewlines = AlwaysNewlines
|
|
}
|
|
}
|
|
#endif
|
|
|
|
hamletTemplate :: FilePath -> FilePath
|
|
hamletTemplate f = globFile "hamlet" f
|
|
#endif
|
|
|
|
{- Lift Handler to Widget -}
|
|
#if MIN_VERSION_yesod(1,2,0)
|
|
liftH :: Monad m => HandlerT site m a -> WidgetT site m a
|
|
liftH = handlerToWidget
|
|
#else
|
|
liftH :: MonadLift base m => base a -> m a
|
|
liftH = lift
|
|
#endif
|
|
|
|
{- Misc new names for stuff. -}
|
|
#if ! MIN_VERSION_yesod(1,2,0)
|
|
giveUrlRenderer :: forall master sub. HtmlUrl (Route master) -> GHandler sub master RepHtml
|
|
giveUrlRenderer = hamletToRepHtml
|
|
|
|
type Html = RepHtml
|
|
#endif
|