mirror of https://github.com/voidlizard/hbs2
hbs2-git db bugfix
This commit is contained in:
parent
585f2a8025
commit
a52baf227a
|
@ -77,8 +77,8 @@ export h repoHead = do
|
||||||
|
|
||||||
notice "calculate dependencies"
|
notice "calculate dependencies"
|
||||||
|
|
||||||
for_ refs $ \(_, h) -> do
|
for_ refs $ \(_, r) -> do
|
||||||
liftIO $ gitGetTransitiveClosure cache mempty h <&> Set.toList
|
liftIO $ gitGetTransitiveClosure cache mempty r <&> Set.toList
|
||||||
|
|
||||||
-- notice "store dependencies to state"
|
-- notice "store dependencies to state"
|
||||||
-- hashes <- readHashesFromBlock undefined
|
-- hashes <- readHashesFromBlock undefined
|
||||||
|
@ -90,8 +90,9 @@ export h repoHead = do
|
||||||
els <- liftIO $ Cache.toList (hCache cache)
|
els <- liftIO $ Cache.toList (hCache cache)
|
||||||
for_ els $ \(k,vs,_) -> do
|
for_ els $ \(k,vs,_) -> do
|
||||||
updateProgress mon1 1
|
updateProgress mon1 1
|
||||||
for_ (Set.toList vs) $ \h -> do
|
for_ (Set.toList vs) $ \ha -> do
|
||||||
stateAddDep k h
|
trace $ "stateAdDep" <+> pretty k <+> pretty ha
|
||||||
|
stateAddDep k ha
|
||||||
|
|
||||||
deps <- withDB db $ do
|
deps <- withDB db $ do
|
||||||
x <- forM refs $ stateGetDeps . snd
|
x <- forM refs $ stateGetDeps . snd
|
||||||
|
|
|
@ -173,6 +173,7 @@ transactional action = do
|
||||||
throwM e
|
throwM e
|
||||||
|
|
||||||
Right x -> do
|
Right x -> do
|
||||||
|
savepointRelease sp
|
||||||
pure x
|
pure x
|
||||||
|
|
||||||
-- TODO: backlog-head-history
|
-- TODO: backlog-head-history
|
||||||
|
|
Loading…
Reference in New Issue