From: Joey Hess Date: Fri, 29 Jan 2021 19:11:19 +0000 (-0400) Subject: get: Improve output when failing to get a file fails X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~98^2~107 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8d4eb2d34e3273e4310d00ee531cf564256f6f54;p=git-annex.git get: Improve output when failing to get a file fails 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". --- diff --git a/CHANGELOG b/CHANGELOG index 80d8444244..68da7273a5 100644 --- 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 Thu, 28 Jan 2021 12:34:32 -0400 diff --git a/Command/Get.hs b/Command/Get.hs index 433889f448..f443c86bf3 100644 --- a/Command/Get.hs +++ b/Command/Get.hs @@ -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. diff --git a/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 b/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 19e839263e..5653653880 100644 --- a/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 +++ b/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 @@ -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]]