mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-03-20 15:14:54 +09:00
Move DarcsRev and code we're sharing with it into a separate library
This commit is contained in:
parent
ff5bb97383
commit
abfb77479f
13 changed files with 8 additions and 1272 deletions
src/Data/Revision
|
@ -1,54 +0,0 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2016 by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Data.Revision.Local
|
||||
( Change (..)
|
||||
, Revision (..)
|
||||
, Version (..)
|
||||
)
|
||||
where
|
||||
|
||||
import Prelude
|
||||
|
||||
import Data.Text (Text)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
|
||||
-- | A recorded patch or tag.
|
||||
data Change = Change
|
||||
{ -- | When it was recorded.
|
||||
cgTime :: UTCTime
|
||||
-- | Lowercase hex representation of its SHA1 info hash.
|
||||
, cgHash :: Text
|
||||
-- | Single-line title.
|
||||
, cgTitle :: Text
|
||||
}
|
||||
|
||||
-- | Given a non-empty repo, this refers to a point in its history.
|
||||
data Revision
|
||||
-- | The last change is a tag.
|
||||
= RevTag Change
|
||||
-- | The last change isn't a tag, but a tag exists earlier in the history.
|
||||
-- Specifies details of the last tag, the number of patches after that tag,
|
||||
-- and details of the last patch.
|
||||
| RevTagPlus Change Int Change
|
||||
-- | There are no recorded tags. Specifies the last patch.
|
||||
| RevPatch Change
|
||||
|
||||
data Version = Version
|
||||
{ verSharer :: Text
|
||||
, verRepo :: Text
|
||||
, verChanges :: Int
|
||||
, verRevision :: Revision
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue