forcing
This commit is contained in:
parent
1ab3e54ca8
commit
c977b6b1f3
1 changed files with 9 additions and 3 deletions
12
Commands.hs
12
Commands.hs
|
@ -144,7 +144,10 @@ wantCmd file = do error "not implemented" -- TODO
|
||||||
{- Indicates a file is not wanted. -}
|
{- Indicates a file is not wanted. -}
|
||||||
dropCmd :: FilePath -> Annex ()
|
dropCmd :: FilePath -> Annex ()
|
||||||
dropCmd file = notinBackend file err $ \(key, backend) -> do
|
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
|
success <- Backend.removeKey backend key
|
||||||
if (success)
|
if (success)
|
||||||
then do
|
then do
|
||||||
|
@ -220,6 +223,9 @@ requireEnoughCopies key = do
|
||||||
++ unsafe
|
++ unsafe
|
||||||
listbad bad = "\nI was unable to access these remotes: " ++
|
listbad bad = "\nI was unable to access these remotes: " ++
|
||||||
(Remotes.list bad)
|
(Remotes.list bad)
|
||||||
unsafe = "\n -- According to the " ++ config ++
|
unsafe = "\n" ++
|
||||||
" setting, it is not safe to remove it!"
|
" -- According to the " ++ config ++
|
||||||
|
" setting, it is not safe to remove it!\n" ++
|
||||||
|
" (Use --force to override.)"
|
||||||
|
|
||||||
config = "annex.numcopies"
|
config = "annex.numcopies"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue