darcs-2.11.0: a distributed, interactive, smart revision control system

Safe HaskellNone

Darcs.UI.Flags

Synopsis

Documentation

data DarcsFlag

The DarcsFlag type is a list of all flags that can ever be passed to darcs, or to one of its commands.

Constructors

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 
Mail 
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 

reorder :: Config -> Reorder

minimize :: Config -> Bool

editDescription :: Config -> Bool

scanKnown :: LookForAdds -> IncludeBoring -> ScanKnown

Non-trivial interaction between options.

wantGuiPause :: Config -> WantGuiPause

This will become dis-entangled as soon as we inline these functions.

isInteractive :: Bool -> Config -> Bool

Non-trivial interaction between options. Explicit -i or -a dominates, else --count, --xml, or --dry-run imply -a, else use the def argument.

maxCount :: Config -> Maybe Int

willRemoveLogFile :: Config -> Bool

isUnified :: Config -> WithContext

doHappyForwarding :: Config -> Bool

includeBoring :: Config -> Bool

doAllowCaseOnly :: Config -> Bool

doReverse :: Config -> Bool

usePacks :: Config -> Bool

removeFromAmended :: Config -> Bool

toMatchFlags :: Config -> [MatchFlag]

verbosity :: Config -> Verbosity

useCache :: Config -> UseCache

umask :: Config -> UMask

dryRun :: Config -> DryRun

runTest :: Config -> RunTest

setDefault :: Bool -> Config -> SetDefault

cloneKind :: Config -> CloneKind

workRepo :: Config -> WorkRepo

useIndex :: Config -> UseIndex

hasSummary :: Summary -> Config -> Summary

hasXmlOutput :: Config -> XmlOutput

selectDeps :: Config -> SelectDeps

hasAuthor :: Config -> Maybe String

fixRemoteRepos :: AbsolutePath -> Config -> IO Config

Ugly. The alternative is to put the remoteRepos accessor into the IO monad, which is hardly better.

fixUrl :: AbsolutePath -> String -> IO String

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]

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]

maybeFixSubPaths (repo_path, orig_path) file_paths tries to turn file_paths into SubPaths, 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

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

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

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]

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

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 $SENDMAIL which will be used as a fallback if present.

getSubject :: Config -> Maybe String

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

getCc :: Config -> String

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.

siblings :: Config -> [AbsolutePath]

flagsToSiblings collects the contents of all Sibling flags in a list of flags.

getOutput :: Config -> FilePath -> Maybe AbsolutePathOrStd

Accessor for output option

getReply :: Config -> Maybe String

applyAs :: Config -> Maybe String