diff options
-rw-r--r-- | Command/ExamineKey.hs | 3 | ||||
-rw-r--r-- | Command/Find.hs | 3 | ||||
-rw-r--r-- | Command/Info.hs | 6 | ||||
-rw-r--r-- | Command/Test.hs | 12 | ||||
-rw-r--r-- | Command/Unused.hs | 4 | ||||
-rw-r--r-- | GitAnnex.hs | 2 | ||||
-rw-r--r-- | GitAnnex/Options.hs | 5 | ||||
-rw-r--r-- | Option.hs | 2 | ||||
-rw-r--r-- | Remote/Web.hs | 3 | ||||
-rw-r--r-- | debian/changelog | 13 | ||||
-rw-r--r-- | doc/bugs/Can__39__t_start_it_on_Debian_Wheezy.mdwn | 3 | ||||
-rw-r--r-- | git-annex.cabal | 2 |
12 files changed, 44 insertions, 14 deletions
diff --git a/Command/ExamineKey.hs b/Command/ExamineKey.hs index 7dfdadd3d..1e8e2cecf 100644 --- a/Command/ExamineKey.hs +++ b/Command/ExamineKey.hs @@ -12,9 +12,10 @@ import Command import qualified Utility.Format import Command.Find (formatOption, withFormat, showFormatted, keyVars) import Types.Key +import GitAnnex.Options def :: [Command] -def = [noCommit $ noMessages $ withOptions [formatOption] $ +def = [noCommit $ noMessages $ withOptions [formatOption, jsonOption] $ command "examinekey" (paramRepeating paramKey) seek SectionPlumbing "prints information from a key"] diff --git a/Command/Find.hs b/Command/Find.hs index 0591e657e..ddcc4b8c7 100644 --- a/Command/Find.hs +++ b/Command/Find.hs @@ -18,9 +18,10 @@ import qualified Utility.Format import Utility.DataUnits import Types.Key import qualified Option +import GitAnnex.Options def :: [Command] -def = [noCommit $ noMessages $ withOptions [formatOption, print0Option] $ +def = [noCommit $ noMessages $ withOptions [formatOption, print0Option, jsonOption] $ command "find" paramPaths seek SectionQuery "lists available files"] formatOption :: Option diff --git a/Command/Info.hs b/Command/Info.hs index d465f2d84..7a9ec15dc 100644 --- a/Command/Info.hs +++ b/Command/Info.hs @@ -21,6 +21,7 @@ import qualified Remote import qualified Command.Unused import qualified Git import qualified Annex +import GitAnnex.Options import Command import Utility.DataUnits import Utility.DiskFree @@ -70,8 +71,9 @@ data StatInfo = StatInfo type StatState = StateT StatInfo Annex def :: [Command] -def = [noCommit $ command "info" paramPaths seek - SectionQuery "shows general information about the annex"] +def = [noCommit $ withOptions [jsonOption] $ + command "info" paramPaths seek SectionQuery + "shows general information about the annex"] seek :: [CommandSeek] seek = [withWords start] diff --git a/Command/Test.hs b/Command/Test.hs index d4fa5eb5b..be480eeb7 100644 --- a/Command/Test.hs +++ b/Command/Test.hs @@ -7,11 +7,12 @@ module Command.Test where +import Common import Command import Messages def :: [Command] -def = [ dontCheck repoExists $ +def = [ noRepo startIO $ dontCheck repoExists $ command "test" paramNothing seek SectionPlumbing "run built-in test suite"] @@ -28,7 +29,10 @@ seek = [withWords start] - test suite. -} start :: [String] -> CommandStart -start [] = do - warning "git-annex was built without its test suite; not testing" +start ps = do + liftIO $ startIO ps stop -start _ = error "Cannot specify any additional parameters when running test" + +startIO :: CmdParams -> IO () +startIO [] = warningIO "git-annex was built without its test suite; not testing" +startIO _ = error "Cannot specify any additional parameters when running test" diff --git a/Command/Unused.hs b/Command/Unused.hs index 1e5cdc163..f99528cfa 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -338,7 +338,9 @@ withUnusedMaps a params = do unusedSpec :: UnusedMap -> String -> [Int] unusedSpec m spec - | spec == "all" = [fst (M.findMin m)..fst (M.findMax m)] + | spec == "all" = if M.null m + then [] + else [fst (M.findMin m)..fst (M.findMax m)] | "-" `isInfixOf` spec = range $ separate (== '-') spec | otherwise = maybe badspec (: []) (readish spec) where diff --git a/GitAnnex.hs b/GitAnnex.hs index 5de823e16..4c1649ba1 100644 --- a/GitAnnex.hs +++ b/GitAnnex.hs @@ -164,8 +164,8 @@ cmds = concat , Command.XMPPGit.def #endif #endif -#ifdef WITH_TESTSUITE , Command.Test.def +#ifdef WITH_TESTSUITE , Command.FuzzTest.def #endif ] diff --git a/GitAnnex/Options.hs b/GitAnnex/Options.hs index 88fad948a..45b9539e0 100644 --- a/GitAnnex/Options.hs +++ b/GitAnnex/Options.hs @@ -14,6 +14,7 @@ import qualified Git.Config import Git.Types import Command import Types.TrustLevel +import Types.Messages import qualified Annex import qualified Remote import qualified Limit @@ -85,3 +86,7 @@ toOption = Option.field ['t'] "to" paramRemote "destination remote" fromToOptions :: [Option] fromToOptions = [fromOption, toOption] + +jsonOption :: Option +jsonOption = Option ['j'] ["json"] (NoArg (Annex.setOutput JSONOutput)) + "enable JSON output" @@ -35,8 +35,6 @@ common = "avoid verbose output" , Option ['v'] ["verbose"] (NoArg (Annex.setOutput NormalOutput)) "allow verbose output (default)" - , Option ['j'] ["json"] (NoArg (Annex.setOutput JSONOutput)) - "enable JSON output" , Option ['d'] ["debug"] (NoArg setdebug) "show debug messages" , Option [] ["no-debug"] (NoArg unsetdebug) diff --git a/Remote/Web.hs b/Remote/Web.hs index 975279edd..2863d9d5e 100644 --- a/Remote/Web.hs +++ b/Remote/Web.hs @@ -118,7 +118,8 @@ checkKey' key us = firsthit us (Right False) $ \u -> do #endif DefaultDownloader -> do headers <- getHttpHeaders - Right <$> Url.withUserAgent (Url.checkBoth u' headers $ keySize key) + Url.withUserAgent $ catchMsgIO . + Url.checkBoth u' headers (keySize key) where firsthit [] miss _ = return miss firsthit (u:rest) _ a = do diff --git a/debian/changelog b/debian/changelog index 36523ce04..3dac77151 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +git-annex (5.20140118) UNRELEASED; urgency=medium + + * Remove --json option from commands not supporting it. + + -- Joey Hess <joeyh@debian.org> Sat, 18 Jan 2014 11:54:17 -0400 + +git-annex (5.20140117) unstable; urgency=medium + + * Really fix FTBFS on mipsel and sparc due to test suite not being available + on those architectures. + + -- Joey Hess <joeyh@debian.org> Fri, 17 Jan 2014 14:46:27 -0400 + git-annex (5.20140116) unstable; urgency=medium * Added tahoe special remote. diff --git a/doc/bugs/Can__39__t_start_it_on_Debian_Wheezy.mdwn b/doc/bugs/Can__39__t_start_it_on_Debian_Wheezy.mdwn index 208439496..a7e7613d5 100644 --- a/doc/bugs/Can__39__t_start_it_on_Debian_Wheezy.mdwn +++ b/doc/bugs/Can__39__t_start_it_on_Debian_Wheezy.mdwn @@ -21,3 +21,6 @@ I don't know where is that log # End of transcript or log. """]] + +> Wheezy was released before git-annex had the webapp. If you want it, +> install the backport. [[done]] --[[Joey]] diff --git a/git-annex.cabal b/git-annex.cabal index 034e70ee1..9b4edf8b2 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -1,5 +1,5 @@ Name: git-annex -Version: 5.20140116 +Version: 5.20140117 Cabal-Version: >= 1.8 License: GPL-3 Maintainer: Joey Hess <joey@kitenet.net> |