aboutsummaryrefslogtreecommitdiff
path: root/Annex/NumCopies.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-09 15:14:25 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-09 15:14:25 -0400
commite36bfabb0e56087771d385a9f4ecdb342f1f14db (patch)
tree8b8eabfa82a4253c537dde601a074bfb2fad8ded /Annex/NumCopies.hs
parent25fe225df2f6edd79ad0bbbbcbfcc72e736b6a17 (diff)
improve message when drop failed due to no locked copy
Diffstat (limited to 'Annex/NumCopies.hs')
-rw-r--r--Annex/NumCopies.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/Annex/NumCopies.hs b/Annex/NumCopies.hs
index f6ce05230..b51d3815b 100644
--- a/Annex/NumCopies.hs
+++ b/Annex/NumCopies.hs
@@ -175,10 +175,14 @@ instance Exception DropException
notEnoughCopies :: Key -> NumCopies -> [VerifiedCopy] -> [UUID] -> [Remote] -> String -> Annex ()
notEnoughCopies key need have skip bad nolocmsg = do
showNote "unsafe"
- showLongNote $
- "Could only verify the existence of " ++
- show (length have) ++ " out of " ++ show (fromNumCopies need) ++
- " necessary copies"
+ if length have < fromNumCopies need
+ then showLongNote $
+ "Could only verify the existence of " ++
+ show (length have) ++ " out of " ++ show (fromNumCopies need) ++
+ " necessary copies"
+ else do
+ showLongNote "Unable to lock down 1 copy of file that is required to safely drop it."
+ showLongNote "(This could have happened because of a concurrent drop, or because a remote has too old a version of git-annex-shell installed.)"
Remote.showTriedRemotes bad
Remote.showLocations True key (map toUUID have++skip) nolocmsg