Adapt to darcs-lights and changes in darcs-rev

This commit is contained in:
fr33domlover 2018-05-24 21:45:01 +00:00
parent 400ddf6089
commit 7d237b7540
5 changed files with 9 additions and 6 deletions

View file

@ -71,7 +71,7 @@ always up to date. Basically it works like this:
[Darcs Hub page](https://hub.darcs.net/fr33domlover)
- Use `darcs clone` to grab the library source code
As of May 23, 2018, you can grab these libraries by simply running the
As of May 24, 2018, you can grab these libraries by simply running the
[`clone-deps.sh`](./clone-deps.sh) script.
Update `stack.yaml` to specify the paths in the `packages` section if needed:

View file

@ -6,6 +6,7 @@ HUB='https://hub.darcs.net/fr33domlover'
darcs clone $HUB/hit-graph
darcs clone $HUB/hit-harder
darcs clone $HUB/hit-network
darcs clone $VERVIS/darcs-lights
darcs clone $VERVIS/darcs-rev
darcs clone $VERVIS/ssh
darcs clone $VERVIS/persistent-migration

View file

@ -192,10 +192,10 @@ readChangesView path off lim = fmap maybeRight $ runExceptT $ do
let off' = total - off - lim
ps <- ExceptT $ readLatestInventory path $ latestInventoryPageP off' lim
now <- lift getCurrentTime
let toLE pi h = LogEntry
let toLE (pi, h, _) = LogEntry
{ leAuthor =
T.stripEnd $ T.takeWhile (/= '<') $ piAuthor pi
, leHash = decodeStrict $ encodePatchHash h
, leHash = decodeStrict $ encodePatchInfoHash h
, leMessage = piTitle pi
, leTime =
( piTime pi
@ -204,7 +204,7 @@ readChangesView path off lim = fmap maybeRight $ runExceptT $ do
now `diffUTCTime` piTime pi
)
}
return (total, map (uncurry toLE) $ reverse $ snd ps)
return (total, map toLE $ reverse $ snd ps)
lastChange :: FilePath -> UTCTime -> IO (Maybe EventTime)
lastChange path now = fmap maybeRight $ runExceptT $ do
@ -213,8 +213,8 @@ lastChange path now = fmap maybeRight $ runExceptT $ do
off = total - lim
(_, l) <- ExceptT $ readLatestInventory path $ latestInventoryPageP off lim
return $ case reverse l of
[] -> Never
(pi, _ph) : _ ->
[] -> Never
(pi, _ih, _ch) : _ ->
intervalToEventTime $
FriendlyConvert $
now `diffUTCTime` piTime pi

View file

@ -8,6 +8,7 @@ resolver: lts-10.10
# Local packages, usually specified by relative directory name
packages:
- '.'
- '../darcs-lights'
- '../darcs-rev'
- '../ssh'
- '../hit-graph'

View file

@ -229,6 +229,7 @@ library
-- for Storage.Hashed because hashed-storage seems
-- unmaintained and darcs has its own copy
, darcs
, darcs-lights
, darcs-rev
, data-default
, data-default-class