get: Improve output when failing to get a file fails
authorJoey Hess <joeyh@joeyh.name>
Fri, 29 Jan 2021 19:11:19 +0000 (15:11 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 29 Jan 2021 19:11:19 +0000 (15:11 -0400)
showTriedRemotes lists the remotes it tried to access. So there's
no need to list those again in "Try making some of these remotes
available".

CHANGELOG
Command/Get.hs
doc/bugs/when_you_get_a_file_but_don__39__t_actually_have_enough_space_for_it__44___the_error_message_makes_useless_suggestions.mdwn

index 80d84442447b257773096f60050acf14efbeb2e5..68da7273a5b3ecc7e8e58e2c223e1f2fe4b838eb 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,7 @@ git-annex (8.20210128) UNRELEASED; urgency=medium
     such as "foo (bar or baz)", which was incorrectly handled as if
     it were "(foo or bar) and baz)" rather than the intended
     "foo and (bar or baz)"
+  * get: Improve output when failing to get a file fails.
 
  -- Joey Hess <id@joeyh.name>  Thu, 28 Jan 2021 12:34:32 -0400
 
index 433889f448b233496e631d90ea058587426091d4..f443c86bf380c502cdd940ed72433be90986c36a 100644 (file)
@@ -92,7 +92,7 @@ getKey' key afile = dispatch
   where
        dispatch [] = do
                showNote "not available"
-               showlocs
+               showlocs []
                return False
        dispatch remotes = notifyTransfer Download afile $ \witness -> do
                ok <- pickRemote remotes $ \r -> ifM (probablyPresent r)
@@ -103,9 +103,9 @@ getKey' key afile = dispatch
                        then return ok
                        else do
                                Remote.showTriedRemotes remotes
-                               showlocs
+                               showlocs (map Remote.uuid remotes)
                                return False
-       showlocs = Remote.showLocations False key []
+       showlocs exclude = Remote.showLocations False key exclude
                "No other repository is known to contain the file."
        -- This check is to avoid an ugly message if a remote is a
        -- drive that is not mounted.
index 19e839263ee8b63158b6cb082e58c7b658e9f425..5653653880aba2f7f353ba65cbdad6070a27ee9a 100644 (file)
@@ -19,3 +19,4 @@ git-annex: get: 1 failed
 ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
 
 mixed success
+> [[fixed|done]] --[[Joey]]