diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-07 13:59:31 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-07 13:59:31 -0400 |
commit | bc51387e6dd426f46f9ab0ef23e6e3eefe7a4417 (patch) | |
tree | 9627f60c81d1852b731ea57171f4b36887847e9b /Upgrade | |
parent | 77f45e4e45d45a08bfe1bec210909345adb6f6d8 (diff) |
Periodically flush git command queue, to avoid boating memory usage too much.
Since the queue is flushed in between subcommand actions being run,
there should be no issues with actions that expect to queue up some stuff
and have it run after they do other stuff. So I didn't have to audit for
such assumptions.
Diffstat (limited to 'Upgrade')
-rw-r--r-- | Upgrade/V1.hs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Upgrade/V1.hs b/Upgrade/V1.hs index 4ce2612d6..9278bce60 100644 --- a/Upgrade/V1.hs +++ b/Upgrade/V1.hs @@ -24,6 +24,7 @@ import Types import Locations import LocationLog import qualified Annex +import qualified AnnexQueue import qualified GitRepo as Git import Backend import Messages @@ -68,7 +69,7 @@ upgrade = do updateSymlinks moveLocationLogs - Annex.queueRun + AnnexQueue.flush True setVersion -- add new line to auto-merge hashed location logs @@ -106,8 +107,7 @@ updateSymlinks = do link <- calcGitLink f k liftIO $ removeFile f liftIO $ createSymbolicLink link f - Annex.queue "add" [Param "--"] f - Annex.queueRunAt 10240 + AnnexQueue.add "add" [Param "--"] f moveLocationLogs :: Annex () moveLocationLogs = do @@ -137,10 +137,9 @@ moveLocationLogs = do old <- liftIO $ readLog f new <- liftIO $ readLog dest liftIO $ writeLog dest (old++new) - Annex.queue "add" [Param "--"] dest - Annex.queue "add" [Param "--"] f - Annex.queue "rm" [Param "--quiet", Param "-f", Param "--"] f - Annex.queueRunAt 10240 + AnnexQueue.add "add" [Param "--"] dest + AnnexQueue.add "add" [Param "--"] f + AnnexQueue.add "rm" [Param "--quiet", Param "-f", Param "--"] f oldlog2key :: FilePath -> Maybe (FilePath, Key) oldlog2key l = |