aboutsummaryrefslogtreecommitdiff
path: root/Commands.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-14 22:09:03 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-14 22:09:03 -0400
commitc977b6b1f3833ed1ead9212d956d8f83a4ca9028 (patch)
treef81285552ae51c70883e18b5bd0bd2268e2a0d01 /Commands.hs
parent1ab3e54ca8e56f8d7b8fd6ad4ceda888e19205f1 (diff)
forcing
Diffstat (limited to 'Commands.hs')
-rw-r--r--Commands.hs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Commands.hs b/Commands.hs
index a16470fe3..6c519c294 100644
--- a/Commands.hs
+++ b/Commands.hs
@@ -144,7 +144,10 @@ wantCmd file = do error "not implemented" -- TODO
{- Indicates a file is not wanted. -}
dropCmd :: FilePath -> Annex ()
dropCmd file = notinBackend file err $ \(key, backend) -> do
- requireEnoughCopies key
+ force <- Annex.flagIsSet Force
+ if (not force)
+ then requireEnoughCopies key
+ else return ()
success <- Backend.removeKey backend key
if (success)
then do
@@ -220,6 +223,9 @@ requireEnoughCopies key = do
++ unsafe
listbad bad = "\nI was unable to access these remotes: " ++
(Remotes.list bad)
- unsafe = "\n -- According to the " ++ config ++
- " setting, it is not safe to remove it!"
+ unsafe = "\n" ++
+ " -- According to the " ++ config ++
+ " setting, it is not safe to remove it!\n" ++
+ " (Use --force to override.)"
+
config = "annex.numcopies"