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"
|
||||
|
||||
for_ refs $ \(_, h) -> do
|
||||
liftIO $ gitGetTransitiveClosure cache mempty h <&> Set.toList
|
||||
for_ refs $ \(_, r) -> do
|
||||
liftIO $ gitGetTransitiveClosure cache mempty r <&> Set.toList
|
||||
|
||||
-- notice "store dependencies to state"
|
||||
-- hashes <- readHashesFromBlock undefined
|
||||
|
@ -90,8 +90,9 @@ export h repoHead = do
|
|||
els <- liftIO $ Cache.toList (hCache cache)
|
||||
for_ els $ \(k,vs,_) -> do
|
||||
updateProgress mon1 1
|
||||
for_ (Set.toList vs) $ \h -> do
|
||||
stateAddDep k h
|
||||
for_ (Set.toList vs) $ \ha -> do
|
||||
trace $ "stateAdDep" <+> pretty k <+> pretty ha
|
||||
stateAddDep k ha
|
||||
|
||||
deps <- withDB db $ do
|
||||
x <- forM refs $ stateGetDeps . snd
|
||||
|
|
|
@ -173,6 +173,7 @@ transactional action = do
|
|||
throwM e
|
||||
|
||||
Right x -> do
|
||||
savepointRelease sp
|
||||
pure x
|
||||
|
||||
-- TODO: backlog-head-history
|
||||
|
|
Loading…
Reference in New Issue