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".
This commit is contained in:
Joey Hess 2021-01-29 15:11:19 -04:00
parent 7e9617ef47
commit 8d4eb2d34e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 5 additions and 3 deletions

View file

@ -9,6 +9,7 @@ git-annex (8.20210128) UNRELEASED; urgency=medium
such as "foo (bar or baz)", which was incorrectly handled as if such as "foo (bar or baz)", which was incorrectly handled as if
it were "(foo or bar) and baz)" rather than the intended it were "(foo or bar) and baz)" rather than the intended
"foo and (bar or baz)" "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 -- Joey Hess <id@joeyh.name> Thu, 28 Jan 2021 12:34:32 -0400

View file

@ -92,7 +92,7 @@ getKey' key afile = dispatch
where where
dispatch [] = do dispatch [] = do
showNote "not available" showNote "not available"
showlocs showlocs []
return False return False
dispatch remotes = notifyTransfer Download afile $ \witness -> do dispatch remotes = notifyTransfer Download afile $ \witness -> do
ok <- pickRemote remotes $ \r -> ifM (probablyPresent r) ok <- pickRemote remotes $ \r -> ifM (probablyPresent r)
@ -103,9 +103,9 @@ getKey' key afile = dispatch
then return ok then return ok
else do else do
Remote.showTriedRemotes remotes Remote.showTriedRemotes remotes
showlocs showlocs (map Remote.uuid remotes)
return False return False
showlocs = Remote.showLocations False key [] showlocs exclude = Remote.showLocations False key exclude
"No other repository is known to contain the file." "No other repository is known to contain the file."
-- This check is to avoid an ugly message if a remote is a -- This check is to avoid an ugly message if a remote is a
-- drive that is not mounted. -- drive that is not mounted.

View 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) ### 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 mixed success
> [[fixed|done]] --[[Joey]]