summaryrefslogtreecommitdiff
path: root/Command/DropUnused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-09 16:54:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-09 16:54:18 -0400
commit8ce7e73f74e95276472d18816b7c6a60bab25abb (patch)
treef4a29907c46af2735411fe9fcbeca0f9c3149cab /Command/DropUnused.hs
parent58563c5b1aa995ea3ce72cddaa1f02d2ea792c2d (diff)
reorg to allow taking content lock
The lock will only persist during the perform stage, so the content must be removed from the annex then, rather than in the cleanup stage. (No lock is actually taken yet.)
Diffstat (limited to 'Command/DropUnused.hs')
-rw-r--r--Command/DropUnused.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs
index 55c21f83b..2c3bb296a 100644
--- a/Command/DropUnused.hs
+++ b/Command/DropUnused.hs
@@ -55,7 +55,8 @@ perform key = maybe droplocal dropremote =<< Annex.getState Annex.fromremote
dropremote name = do
r <- Remote.byName name
showAction $ "from " ++ Remote.name r
- next $ Command.Drop.cleanupRemote key r
+ ok <- Remote.removeKey r key
+ next $ Command.Drop.cleanupRemote key r ok
droplocal = Command.Drop.performLocal key (Just 0) -- force drop
performOther :: (Key -> Git.Repo -> FilePath) -> Key -> CommandPerform