improve "unable to lock down 1 copy" message

This is a fairly hard to understand situation for the user. Listing the
remotes should help them understand it a bit better.

This commit was sponsored by Ethan Aubin.
This commit is contained in:
Joey Hess 2020-06-26 13:00:40 -04:00
parent 7203353e24
commit a59e95a82d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 25 additions and 16 deletions

View file

@ -52,6 +52,7 @@ module Remote (
nameToUUID,
nameToUUID',
showTriedRemotes,
listRemoteNames,
showLocations,
forceTrust,
logStatus,
@ -365,8 +366,11 @@ showLocations separateuntrusted key exclude nolocmsg = do
showTriedRemotes :: [Remote] -> Annex ()
showTriedRemotes [] = noop
showTriedRemotes remotes =
showLongNote $ "Unable to access these remotes: " ++
intercalate ", " (map name remotes)
showLongNote $ "Unable to access these remotes: "
++ listRemoteNames remotes
listRemoteNames :: [Remote] -> String
listRemoteNames remotes = intercalate ", " (map name remotes)
forceTrust :: TrustLevel -> String -> Annex ()
forceTrust level remotename = do