diff --git a/hbs2-git/lib/HBS2Git/Export.hs b/hbs2-git/lib/HBS2Git/Export.hs index 26839719..5c2a36e1 100644 --- a/hbs2-git/lib/HBS2Git/Export.hs +++ b/hbs2-git/lib/HBS2Git/Export.hs @@ -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 diff --git a/hbs2-git/lib/HBS2Git/State.hs b/hbs2-git/lib/HBS2Git/State.hs index b03dcf9e..0b413b9e 100644 --- a/hbs2-git/lib/HBS2Git/State.hs +++ b/hbs2-git/lib/HBS2Git/State.hs @@ -173,6 +173,7 @@ transactional action = do throwM e Right x -> do + savepointRelease sp pure x -- TODO: backlog-head-history