module Darcs.UI.Commands.Show ( showCommand ) where
import Prelude ()
import Darcs.Prelude
import Darcs.UI.Commands ( DarcsCommand(..)
, normalCommand
, commandAlias, amInRepository
)
import Darcs.UI.Commands.ShowAuthors ( showAuthors )
import Darcs.UI.Commands.ShowContents ( showContents )
import Darcs.UI.Commands.ShowDependencies ( showDeps )
import Darcs.UI.Commands.ShowFiles ( showFiles )
import Darcs.UI.Commands.ShowTags ( showTags )
import Darcs.UI.Commands.ShowRepo ( showRepo )
import Darcs.UI.Commands.ShowIndex ( showIndex, showPristineCmd )
import Darcs.UI.Commands.ShowPatchIndex ( showPatchIndex )
import Darcs.UI.Flags ( DarcsFlag )
showDescription :: String
showDescription :: String
showDescription = "Show information about the given repository."
showHelp :: String
showHelp :: String
showHelp =
"Use the `--help` option with the subcommands to obtain help for\n"String -> String -> String
forall a. [a] -> [a] -> [a]
++
"subcommands (for example, `darcs show files --help`).\n"
showCommand :: DarcsCommand [DarcsFlag]
showCommand :: DarcsCommand [DarcsFlag]
showCommand = SuperCommand :: forall parsedFlags.
String
-> String
-> String
-> String
-> ([DarcsFlag] -> IO (Either String ()))
-> [CommandControl]
-> DarcsCommand parsedFlags
SuperCommand
{ commandProgramName :: String
commandProgramName = "darcs"
, commandName :: String
commandName = "show"
, commandHelp :: String
commandHelp = String
showHelp
, commandDescription :: String
commandDescription = String
showDescription
, commandPrereq :: [DarcsFlag] -> IO (Either String ())
commandPrereq = [DarcsFlag] -> IO (Either String ())
amInRepository
, commandSubCommands :: [CommandControl]
commandSubCommands =
[ DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showContents
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showDeps
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showFiles
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showIndex
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showPristine
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showRepo
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showAuthors
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showTags
, DarcsCommand [DarcsFlag] -> CommandControl
forall parsedFlags. DarcsCommand parsedFlags -> CommandControl
normalCommand DarcsCommand [DarcsFlag]
showPatchIndex ]
}
showPristine :: DarcsCommand [DarcsFlag]
showPristine :: DarcsCommand [DarcsFlag]
showPristine = (String
-> Maybe (DarcsCommand [DarcsFlag])
-> DarcsCommand [DarcsFlag]
-> DarcsCommand [DarcsFlag]
forall pf.
String
-> Maybe (DarcsCommand pf) -> DarcsCommand pf -> DarcsCommand pf
commandAlias "pristine" (DarcsCommand [DarcsFlag] -> Maybe (DarcsCommand [DarcsFlag])
forall a. a -> Maybe a
Just DarcsCommand [DarcsFlag]
showCommand) DarcsCommand [DarcsFlag]
showIndex) {
commandCommand :: (AbsolutePath, AbsolutePath) -> [DarcsFlag] -> [String] -> IO ()
commandCommand = (AbsolutePath, AbsolutePath) -> [DarcsFlag] -> [String] -> IO ()
showPristineCmd,
commandDescription :: String
commandDescription = "Dump contents of pristine cache.",
commandHelp :: String
commandHelp =
"The `darcs show pristine` command lists all version-controlled files " String -> String -> String
forall a. [a] -> [a] -> [a]
++
"and directories along with the hashes of their pristine copies. " String -> String -> String
forall a. [a] -> [a] -> [a]
++
"For files, the fields correspond to file size, sha256 of the pristine " String -> String -> String
forall a. [a] -> [a] -> [a]
++
"file content and the filename." }