module Darcs.UI.Commands.Convert ( convert ) where
import Darcs.Prelude
import Darcs.UI.Commands (DarcsCommand(..), amInRepository, normalCommand)
import Darcs.UI.Commands.Convert.Darcs2 (convertDarcs2)
import Darcs.UI.Commands.Convert.Import (convertImport)
import Darcs.UI.Commands.Convert.Export (convertExport)
import Darcs.Util.Printer ( text, ($+$) )
convertDescription :: String
convertDescription :: String
convertDescription = String
"Convert repositories between various formats."
convert :: DarcsCommand
convert :: DarcsCommand
convert = SuperCommand
{ commandProgramName :: String
commandProgramName = String
"darcs"
, commandName :: String
commandName = String
"convert"
, commandHelp :: Doc
commandHelp =
String -> Doc
text String
convertDescription Doc -> Doc -> Doc
$+$
String -> Doc
text String
"See description of the subcommands for details."
, commandDescription :: String
commandDescription = String
convertDescription
, commandPrereq :: [DarcsFlag] -> IO (Either String ())
commandPrereq = [DarcsFlag] -> IO (Either String ())
amInRepository
, commandSubCommands :: [CommandControl]
commandSubCommands =
[ DarcsCommand -> CommandControl
normalCommand DarcsCommand
convertDarcs2
, DarcsCommand -> CommandControl
normalCommand DarcsCommand
convertExport
, DarcsCommand -> CommandControl
normalCommand DarcsCommand
convertImport
]
}