drop unwanted content in the transfer scan

This was complicated quite a bit by needing to check numcopies. I optimised
that, so it only looks up numcopies once per file, no matter how many
remotes it checks to drop from. Although it did just occur to me that
it might be better to first check if it wants to drop content, and only
then check numcopies..
This commit is contained in:
Joey Hess 2012-10-18 14:55:59 -04:00
parent dbe8de40ab
commit f7f34d2072
3 changed files with 57 additions and 14 deletions

View file

@ -48,7 +48,7 @@ startLocal file numcopies key = stopUnless (inAnnex key) $ do
startRemote :: FilePath -> Maybe Int -> Key -> Remote -> CommandStart
startRemote file numcopies key remote = do
showStart "drop" file
showStart ("drop " ++ Remote.name remote) file
next $ performRemote key numcopies remote
performLocal :: Key -> Maybe Int -> CommandPerform