Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data DarcsFlag
- = Version
- | ExactVersion
- | ListCommands
- | Help
- | ListOptions
- | NoTest
- | Test
- | OnlyChangesToFiles
- | ChangesToAllFiles
- | LeaveTestDir
- | NoLeaveTestDir
- | Timings
- | Debug
- | DebugHTTP
- | Verbose
- | NormalVerbosity
- | Quiet
- | Target String
- | Cc String
- | Output AbsolutePathOrStd
- | OutputAutoName AbsolutePath
- | Subject String
- | InReplyTo String
- | Charset String
- | SendmailCmd String
- | Author String
- | SelectAuthor
- | PatchName String
- | OnePatch String
- | SeveralPatch String
- | OneHash String
- | AfterPatch String
- | UpToPatch String
- | AfterHash String
- | UpToHash String
- | TagName String
- | LastN Int
- | MaxCount Int
- | PatchIndexRange Int Int
- | NumberPatches
- | OneTag String
- | AfterTag String
- | UpToTag String
- | GenContext
- | Context AbsolutePath
- | Count
- | LogFile AbsolutePath
- | RmLogFile
- | DontRmLogFile
- | DistName String
- | DistZip
- | All
- | Recursive
- | NoRecursive
- | Minimize
- | NoMinimize
- | Reorder
- | NoReorder
- | RestrictPaths
- | DontRestrictPaths
- | AskDeps
- | NoAskDeps
- | IgnoreTimes
- | DontIgnoreTimes
- | LookForAdds
- | NoLookForAdds
- | LookForMoves
- | NoLookForMoves
- | LookForReplaces
- | NoLookForReplaces
- | UseMyersDiff
- | UsePatienceDiff
- | Intersection
- | Union
- | Complement
- | Sign
- | SignAs String
- | NoSign
- | SignSSL String
- | HappyForwarding
- | NoHappyForwarding
- | Verify AbsolutePath
- | VerifySSL AbsolutePath
- | RemoteDarcsOpt String
- | EditDescription
- | NoEditDescription
- | Toks String
- | EditLongComment
- | NoEditLongComment
- | PromptLongComment
- | KeepDate
- | NoKeepDate
- | AllowConflicts
- | MarkConflicts
- | NoAllowConflicts
- | SkipConflicts
- | Boring
- | SkipBoring
- | AllowCaseOnly
- | DontAllowCaseOnly
- | AllowWindowsReserved
- | DontAllowWindowsReserved
- | DontGrabDeps
- | DontPromptForDependencies
- | PromptForDependencies
- | Compress
- | NoCompress
- | UnCompress
- | WorkRepoDir String
- | WorkRepoUrl String
- | RemoteRepo String
- | NewRepo String
- | NotInRemote (Maybe String)
- | Reply String
- | ApplyAs String
- | MachineReadable
- | HumanReadable
- | Pipe
- | Interactive
- | DiffCmd String
- | ExternalMerge String
- | Summary
- | NoSummary
- | PauseForGui
- | NoPauseForGui
- | Unified
- | NonUnified
- | Reverse
- | Forward
- | Complete
- | Lazy
- | DiffFlags String
- | XMLOutput
- | ForceReplace
- | OnePattern String
- | SeveralPattern String
- | AfterPattern String
- | UpToPattern String
- | NonApply
- | NonVerify
- | NonForce
- | DryRun
- | SetDefault
- | NoSetDefault
- | Disable
- | SetScriptsExecutable
- | DontSetScriptsExecutable
- | Once
- | Linear
- | Backoff
- | Bisect
- | Hashed
- | UseFormat1
- | UseFormat2
- | UseNoWorkingDir
- | UseWorkingDir
- | Sibling AbsolutePath
- | Files
- | NoFiles
- | Directories
- | NoDirectories
- | Pending
- | NoPending
- | PosthookCmd String
- | NoPosthook
- | AskPosthook
- | RunPosthook
- | PrehookCmd String
- | NoPrehook
- | AskPrehook
- | RunPrehook
- | UMask String
- | StoreInMemory
- | ApplyOnDisk
- | NoHTTPPipelining
- | Packs
- | NoPacks
- | NoCache
- | AllowUnrelatedRepos
- | Check
- | Repair
- | JustThisRepo
- | ReadMarks String
- | WriteMarks String
- | NullFlag
- | NoAmendUnrecord
- | AmendUnrecord
- | PatchIndexFlag
- | NoPatchIndexFlag
- compression :: Config -> Compression
- remoteDarcs :: Config -> RemoteDarcs
- reorder :: Config -> Reorder
- minimize :: Config -> Bool
- editDescription :: Config -> Bool
- diffingOpts :: Config -> (UseIndex, ScanKnown, DiffAlgorithm)
- diffOpts :: UseIndex -> LookForAdds -> IncludeBoring -> DiffAlgorithm -> (UseIndex, ScanKnown, DiffAlgorithm)
- scanKnown :: LookForAdds -> IncludeBoring -> ScanKnown
- externalMerge :: Config -> ExternalMerge
- wantGuiPause :: Config -> WantGuiPause
- isInteractive :: Bool -> Config -> Bool
- maxCount :: Config -> Maybe Int
- willRemoveLogFile :: Config -> Bool
- isUnified :: Config -> WithContext
- doHappyForwarding :: Config -> Bool
- includeBoring :: Config -> Bool
- doAllowCaseOnly :: Config -> Bool
- doAllowWindowsReserved :: Config -> Bool
- doReverse :: Config -> Bool
- usePacks :: Config -> Bool
- showChangesOnlyToFiles :: Config -> Bool
- removeFromAmended :: Config -> Bool
- toMatchFlags :: Config -> [MatchFlag]
- verbosity :: Config -> Verbosity
- useCache :: Config -> UseCache
- umask :: Config -> UMask
- dryRun :: Config -> DryRun
- lookForAdds :: Config -> LookForAdds
- lookForMoves :: Config -> LookForMoves
- lookForReplaces :: Config -> LookForReplaces
- diffAlgorithm :: Config -> DiffAlgorithm
- runTest :: Config -> RunTest
- testChanges :: Config -> TestChanges
- setScriptsExecutable :: Config -> SetScriptsExecutable
- withWorkingDir :: Config -> WithWorkingDir
- leaveTestDir :: Config -> LeaveTestDir
- remoteRepos :: Config -> RemoteRepos
- setDefault :: Bool -> Config -> SetDefault
- cloneKind :: Config -> CloneKind
- workRepo :: Config -> WorkRepo
- allowConflicts :: Config -> AllowConflicts
- runPatchIndex :: Config -> WithPatchIndex
- useIndex :: Config -> UseIndex
- hasSummary :: Summary -> Config -> Summary
- hasXmlOutput :: Config -> XmlOutput
- selectDeps :: Config -> SelectDeps
- hasAuthor :: Config -> Maybe String
- hasLogfile :: Config -> Maybe AbsolutePath
- patchFormat :: Config -> PatchFormat
- fixRemoteRepos :: AbsolutePath -> Config -> IO Config
- fixUrl :: AbsolutePath -> String -> IO String
- fixSubPaths :: (AbsolutePath, AbsolutePath) -> [FilePath] -> IO [SubPath]
- maybeFixSubPaths :: (AbsolutePath, AbsolutePath) -> [FilePath] -> IO [Maybe SubPath]
- getRepourl :: Config -> Maybe String
- getAuthor :: Maybe String -> Bool -> IO String
- promptAuthor :: Bool -> Bool -> IO String
- getEasyAuthor :: IO [String]
- getSendmailCmd :: Config -> IO String
- fileHelpAuthor :: [String]
- environmentHelpEmail :: ([String], [String])
- getSubject :: Config -> Maybe String
- getCharset :: Config -> Maybe String
- getInReplyTo :: Config -> Maybe String
- getCc :: Config -> String
- environmentHelpSendmail :: ([String], [String])
- siblings :: Config -> [AbsolutePath]
- getOutput :: Config -> FilePath -> Maybe AbsolutePathOrStd
- getDate :: Bool -> IO String
- getReply :: Config -> Maybe String
- applyAs :: Config -> Maybe String
Documentation
The DarcsFlag
type is a list of all flags that can ever be
passed to darcs, or to one of its commands.
compression :: Config -> Compression Source #
remoteDarcs :: Config -> RemoteDarcs Source #
editDescription :: Config -> Bool Source #
diffingOpts :: Config -> (UseIndex, ScanKnown, DiffAlgorithm) Source #
diffOpts :: UseIndex -> LookForAdds -> IncludeBoring -> DiffAlgorithm -> (UseIndex, ScanKnown, DiffAlgorithm) Source #
scanKnown :: LookForAdds -> IncludeBoring -> ScanKnown Source #
Non-trivial interaction between options.
externalMerge :: Config -> ExternalMerge Source #
wantGuiPause :: Config -> WantGuiPause Source #
This will become dis-entangled as soon as we inline these functions.
isInteractive :: Bool -> Config -> Bool Source #
Non-trivial interaction between options. Explicit -i
or -a
dominates,
else --count
, --xml
, or --dry-run
imply -a
, else use the def argument.
willRemoveLogFile :: Config -> Bool Source #
isUnified :: Config -> WithContext Source #
doHappyForwarding :: Config -> Bool Source #
includeBoring :: Config -> Bool Source #
doAllowCaseOnly :: Config -> Bool Source #
doAllowWindowsReserved :: Config -> Bool Source #
showChangesOnlyToFiles :: Config -> Bool Source #
removeFromAmended :: Config -> Bool Source #
toMatchFlags :: Config -> [MatchFlag] Source #
lookForAdds :: Config -> LookForAdds Source #
lookForMoves :: Config -> LookForMoves Source #
lookForReplaces :: Config -> LookForReplaces Source #
diffAlgorithm :: Config -> DiffAlgorithm Source #
testChanges :: Config -> TestChanges Source #
setScriptsExecutable :: Config -> SetScriptsExecutable Source #
withWorkingDir :: Config -> WithWorkingDir Source #
leaveTestDir :: Config -> LeaveTestDir Source #
remoteRepos :: Config -> RemoteRepos Source #
setDefault :: Bool -> Config -> SetDefault Source #
allowConflicts :: Config -> AllowConflicts Source #
runPatchIndex :: Config -> WithPatchIndex Source #
hasSummary :: Summary -> Config -> Summary Source #
hasXmlOutput :: Config -> XmlOutput Source #
selectDeps :: Config -> SelectDeps Source #
hasLogfile :: Config -> Maybe AbsolutePath Source #
patchFormat :: Config -> PatchFormat Source #
fixRemoteRepos :: AbsolutePath -> Config -> IO Config Source #
Ugly. The alternative is to put the remoteRepos accessor into the IO monad, which is hardly better.
fixUrl :: AbsolutePath -> String -> IO String Source #
fixUrl
takes a String that may be a file path or a URL.
It returns either the URL, or an absolute version of the path.
fixSubPaths :: (AbsolutePath, AbsolutePath) -> [FilePath] -> IO [SubPath] Source #
fixSubPaths
is a variant of maybeFixSubPaths
that throws out
non-repository paths and duplicates from the result. See there for details.
TODO: why filter out null paths from the input? why here and not in
maybeFixSubPaths
?
maybeFixSubPaths :: (AbsolutePath, AbsolutePath) -> [FilePath] -> IO [Maybe SubPath] Source #
maybeFixSubPaths (repo_path, orig_path) file_paths
tries to turn
file_paths
into SubPath
s, taking into account the repository path and
the original path from which darcs was invoked.
A SubPath
is a path under (or inside) the repo path. This does not
mean it must exist as a file or directory, nor that the path has been added
to the repository; it merely means that it could be added.
When converting a relative path to an absolute one, this function first tries
to interpret the relative path with respect to the current working directory.
If that fails, it tries to interpret it with respect to the repository
directory. Only when that fails does it put a Nothing
in the result at the
position of the path that cannot be converted.
It is intended for validating file arguments to darcs commands.
getRepourl :: Config -> Maybe String Source #
getRepourl
takes a list of flags and returns the url of the
repository specified by Repodir "directory"
in that list of flags, if any.
This flag is present if darcs was invoked with --repodir=DIRECTORY
getAuthor :: Maybe String -> Bool -> IO String Source #
getAuthor
takes a list of flags and returns the author of the
change specified by Author "Leo Tolstoy"
in that list of flags, if any.
Otherwise, if Pipe
is present, asks the user who is the author and
returns the answer. If neither are present, try to guess the author,
from repository or global preference files or environment variables,
and if it's not possible, ask the user.
promptAuthor :: Bool -> Bool -> IO String Source #
promptAuthor
try to guess the author, from repository or
global preference files or environment variables, and
if it's not possible or alwaysAsk parameter is true, ask the user.
If store parameter is true, the new author is added into
_darcs/prefs
.
getEasyAuthor :: IO [String] Source #
getEasyAuthor
tries to get the author name first from the repository preferences,
then from global preferences, then from environment variables. Returns []
if it could not get it. Note that it may only return multiple possibilities when
reading from global preferences
getSendmailCmd :: Config -> IO String Source #
getSendmailCmd
takes a list of flags and returns the sendmail command
to be used by darcs send
. Looks for a command specified by
SendmailCmd "command"
in that list of flags, if any.
This flag is present if darcs was invoked with --sendmail-command=COMMAND
Alternatively the user can set $S
ENDMAIL
which will be used as a fallback if present.
fileHelpAuthor :: [String] Source #
environmentHelpEmail :: ([String], [String]) Source #
getSubject :: Config -> Maybe String Source #
getSubject
takes a list of flags and returns the subject of the mail
to be sent by darcs send
. Looks for a subject specified by
Subject "subject"
in that list of flags, if any.
This flag is present if darcs was invoked with --subject=SUBJECT
getCharset :: Config -> Maybe String Source #
getInReplyTo :: Config -> Maybe String Source #
getCc :: Config -> String Source #
getCc
takes a list of flags and returns the addresses to send a copy of
the patch bundle to when using darcs send
.
looks for a cc address specified by Cc "address"
in that list of flags.
Returns the addresses as a comma separated string.
environmentHelpSendmail :: ([String], [String]) Source #
siblings :: Config -> [AbsolutePath] Source #
flagsToSiblings
collects the contents of all Sibling
flags in a list of flags.