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

Safe HaskellNone
LanguageHaskell2010

Darcs.UI.Options.All

Description

All the concrete options.

Notes:

  • The term "option" refers to a flag or combination of flags that together form a part of a command's configuration. Ideally, options should be orthogonal to each other, so we can freely combine them.
  • A primitive (indivisible) option has an associate value type.
  • An option named "xyzActions" represents a set of flags that act as mutually exclusive sub-commands. They typically have a dedicated value type named "XyzAction".
  • This module is probably best imported qualified. This is in contrast to the current practice of using subtly differing names to avoid name clashes for closely related items. For instance, the data constructors for an option's value type and the corresponding data constructors in DarcsFlag may coincide. This is also why we import Darcs.UI.Flags qualified here.
  • When the new options system is finally in place, no code other than the one for constructing options should directly refer to DarcsFlag constructors.

Synopsis

Documentation

type DarcsOption = OptSpec DarcsOptDescr Flag Source #

DarcsOption instantiates the first two type parameters of OptSpec to what we need in darcs. The first parameter is instantiated to The flag type is instantiate to Flag.

class YesNo a where Source #

Minimal complete definition

yes

Methods

yes :: a -> Bool Source #

no :: a -> Bool Source #

Instances

YesNo WithWorkingDir Source # 
YesNo WantGuiPause Source # 
YesNo UseIndex Source # 
YesNo LeaveTestDir Source # 
YesNo SetScriptsExecutable Source # 
YesNo RunTest Source # 
YesNo IncludeBoring Source # 
YesNo LookForMoves Source # 
YesNo LookForReplaces Source # 
YesNo LookForAdds Source # 
YesNo DryRun Source # 

Methods

yes :: DryRun -> Bool Source #

no :: DryRun -> Bool Source #

YesNo UseCache Source # 
YesNo Reorder Source # 
YesNo WithPatchIndex Source # 
YesNo Compression Source # 
YesNo Summary Source # 
YesNo WithContext Source # 
YesNo XmlOutput Source # 
YesNo EnumPatches Source # 

data RootAction Source #

Options for darcs iself that act like sub-commands.

data HooksConfig Source #

Constructors

HooksConfig 

Fields

data HookConfig Source #

Constructors

HookConfig 

Fields

data DryRun Source #

Constructors

YesDryRun 
NoDryRun 

dryRun :: PrimDarcsOption DryRun Source #

TODO someone wrote here long ago that any time --dry-run is a possibility automated users should be able to examine the results more easily with --xml. See also issue2397. dryRun w/o xml is currently used in add, pull, and repair.

maxCount :: PrimDarcsOption (Maybe Int) Source #

TODO: Returning -1 if the argument cannot be parsed as an integer is not something I expected to find in a Haskell program. Instead, the flag should take either a plain String argument (leaving it to a later stage to parse the String to an Int), or else a Maybe Int, taking the possibility of a failed parse into account.

reponame :: PrimDarcsOption (Maybe String) Source #

--repodir is there for compatibility, should be removed eventually

IMHO the whole option can disappear; it overlaps with using an extra (non-option) argument, which is how e.g. darcs get is usually invoked.

data Logfile Source #

Constructors

Logfile 

data ScanKnown Source #

Constructors

ScanKnown

Just files already known to darcs

ScanAll

All files, i.e. look for new ones

ScanBoring

All files, even boring ones

onlyToFiles :: PrimDarcsOption Bool Source #

TODO: see issue2395

data Sign Source #

Instances

Eq Sign Source # 

Methods

(==) :: Sign -> Sign -> Bool #

(/=) :: Sign -> Sign -> Bool #

Show Sign Source # 

Methods

showsPrec :: Int -> Sign -> ShowS #

show :: Sign -> String #

showList :: [Sign] -> ShowS #

conflictsNo :: PrimDarcsOption (Maybe AllowConflicts) Source #

push, apply, rebase apply: default to NoAllowConflicts

data Reorder Source #

Constructors

NoReorder 
Reorder 

data NetworkOptions Source #

TODO: reconsider this grouping of options

data UMask Source #

Constructors

YesUMask String 
NoUMask 

Instances

Eq UMask Source # 

Methods

(==) :: UMask -> UMask -> Bool #

(/=) :: UMask -> UMask -> Bool #

Show UMask Source # 

Methods

showsPrec :: Int -> UMask -> ShowS #

show :: UMask -> String #

showList :: [UMask] -> ShowS #

data CloneKind Source #

Constructors

LazyClone

Just copy pristine and inventories

NormalClone

First do a lazy clone then copy everything

CompleteClone

Same as Normal but omit telling user they can interrumpt

hashed :: PrimDarcsOption () Source #

Deprecated flag, still present to output an error message.