From 8d4eb2d34e3273e4310d00ee531cf564256f6f54 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 29 Jan 2021 15:11:19 -0400 Subject: [PATCH] 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". --- CHANGELOG | 1 + Command/Get.hs | 6 +++--- ...t__44___the_error_message_makes_useless_suggestions.mdwn | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) 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]]