extend Git.Queue to be able to queue more than simple git commands

While I was in there, I noticed and fixed a bug in the queue size
calculations. It was never encountered only because Queue.add was
only ever run with 1 file in the list.
This commit is contained in:
Joey Hess 2012-06-07 15:19:44 -04:00
parent 727158ff55
commit 0a11b35d89
8 changed files with 94 additions and 43 deletions

View file

@ -94,7 +94,7 @@ updateSymlinks = do
link <- calcGitLink f k
liftIO $ removeFile f
liftIO $ createSymbolicLink link f
Annex.Queue.add "add" [Param "--"] [f]
Annex.Queue.addCommand "add" [Param "--"] [f]
moveLocationLogs :: Annex ()
moveLocationLogs = do
@ -121,9 +121,9 @@ moveLocationLogs = do
old <- liftIO $ readLog1 f
new <- liftIO $ readLog1 dest
liftIO $ writeLog1 dest (old++new)
Annex.Queue.add "add" [Param "--"] [dest]
Annex.Queue.add "add" [Param "--"] [f]
Annex.Queue.add "rm" [Param "--quiet", Param "-f", Param "--"] [f]
Annex.Queue.addCommand "add" [Param "--"] [dest]
Annex.Queue.addCommand "add" [Param "--"] [f]
Annex.Queue.addCommand "rm" [Param "--quiet", Param "-f", Param "--"] [f]
oldlog2key :: FilePath -> Maybe (FilePath, Key)
oldlog2key l