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

Safe HaskellNone
LanguageHaskell2010

Darcs.UI.Flags

Synopsis

Documentation

data DarcsFlag Source

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 Source

minimize :: Config -> Bool Source

diffOpts :: UseIndex -> LookForAdds -> Bool -> DiffAlgorithm -> (UseIndex, ScanKnown, DiffAlgorithm) Source

Non-trivial interaction between options.

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.

maxCount :: Config -> Maybe Int Source

doReverse :: Config -> Bool Source

usePacks :: Config -> Bool Source

useCache :: Config -> UseCache Source

umask :: Config -> UMask Source

dryRun :: Config -> DryRun Source

runTest :: Config -> RunTest Source

workRepo :: Config -> WorkRepo Source

useIndex :: Config -> UseIndex 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 files returns the SubPaths for the paths in files that are inside the repository, preserving their order. Paths in files that are outside the repository directory are not in the result.

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 omit the path from the result.

It is intended for validating file arguments to darcs commands.

maybeFixSubPaths :: (AbsolutePath, AbsolutePath) -> [FilePath] -> IO [Maybe SubPath] Source

maybeFixSubPaths files tries to turn the file paths in its argument into SubPaths.

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

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

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.

siblings :: Config -> [AbsolutePath] Source

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

getOutput :: Config -> FilePath -> Maybe AbsolutePathOrStd Source

Accessor for output option

applyAs :: Config -> Maybe String Source