hgrev-0.2.4: Compile Mercurial (hg) version info into Haskell code

Safe HaskellNone
LanguageHaskell2010

Development.HgRev

Synopsis

Documentation

hgRevState Source #

Arguments

:: FilePath

Path anywhere within the repository

-> IO (Maybe (HgRev, HgState))

Nothing is returned if no repo or hg binary are found

Get the hg revision and working directory state for a given repo.

hgRev Source #

Arguments

:: FilePath

Path anywhere within the repository

-> IO (Maybe HgRev)

Nothing is returned if no repo or hg binary are found

Get the hg revision for a given repo.

hgState Source #

Arguments

:: FilePath

Path anywhere within the repository

-> IO (Maybe HgState)

Nothing is returned if no repo or hg binary are found

Get the hg working directory state for a given repo.

hgShortRev :: HgRev -> String Source #

Get the hg short revision which is the first 12 hex characters of the hash.

hgIsDirty :: HgState -> Bool Source #

Bool indication of dirty working directory state.

hgIsClean :: HgState -> Bool Source #

Bool indication of clean working directory state.

data HgRev Source #

Constructors

HgRev 

Fields

Instances
Eq HgRev Source # 
Instance details

Defined in Development.HgRev

Methods

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

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

Show HgRev Source # 
Instance details

Defined in Development.HgRev

Methods

showsPrec :: Int -> HgRev -> ShowS #

show :: HgRev -> String #

showList :: [HgRev] -> ShowS #

FromJSON HgRev Source # 
Instance details

Defined in Development.HgRev

data HgState Source #

Constructors

Clean

No uncommitted changes in working directory

Dirty

Uncommitted changes exist in working directory

Instances
Eq HgState Source # 
Instance details

Defined in Development.HgRev

Methods

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

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

Show HgState Source # 
Instance details

Defined in Development.HgRev

FromJSON HgState Source # 
Instance details

Defined in Development.HgRev