summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-16 13:29:54 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-16 13:29:54 -0400
commit693d324e2b3e7af786a17f251fa8075593064883 (patch)
tree97d44100173c97d243e137f3289cc0af8b752c83
parent760f8ab86c916f884ee4666ab7203caa8f5ec686 (diff)
Fix wording of message displayed when unable to get a file that is available in untrusted repositories.
-rw-r--r--Command/Drop.hs2
-rw-r--r--Command/Get.hs2
-rw-r--r--Remote.hs8
-rw-r--r--debian/changelog2
4 files changed, 9 insertions, 5 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs
index 9460c47b4..3779b3459 100644
--- a/Command/Drop.hs
+++ b/Command/Drop.hs
@@ -156,7 +156,7 @@ notEnoughCopies key need have skip bad = do
show (length have) ++ " out of " ++ show (fromNumCopies need) ++
" necessary copies"
Remote.showTriedRemotes bad
- Remote.showLocations key (have++skip)
+ Remote.showLocations True key (have++skip)
"Rather than dropping this file, try using: git annex move"
hint
return False
diff --git a/Command/Get.hs b/Command/Get.hs
index a49c7c409..2213e32fb 100644
--- a/Command/Get.hs
+++ b/Command/Get.hs
@@ -79,7 +79,7 @@ getKeyFile' key afile dest = dispatch
( docopy r witness <||> trycopy full rs witness
, trycopy full rs witness
)
- showlocs = Remote.showLocations key []
+ showlocs = Remote.showLocations False key []
"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/Remote.hs b/Remote.hs
index 24923337b..a48c5f75e 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -272,11 +272,13 @@ keyPossibilities' key trusted = do
return (sortBy (comparing cost) validremotes, validtrusteduuids)
{- Displays known locations of a key. -}
-showLocations :: Key -> [UUID] -> String -> Annex ()
-showLocations key exclude nolocmsg = do
+showLocations :: Bool -> Key -> [UUID] -> String -> Annex ()
+showLocations separateuntrusted key exclude nolocmsg = do
u <- getUUID
uuids <- keyLocations key
- untrusteduuids <- trustGet UnTrusted
+ untrusteduuids <- if separateuntrusted
+ then trustGet UnTrusted
+ else pure []
let uuidswanted = filteruuids uuids (u:exclude++untrusteduuids)
let uuidsskipped = filteruuids uuids (u:exclude++uuidswanted)
ppuuidswanted <- prettyPrintUUIDs "wanted" uuidswanted
diff --git a/debian/changelog b/debian/changelog
index 4d27f6fb7..9216968fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ git-annex (5.20150114) UNRELEASED; urgency=medium
made after two LOSTNET messages were received in a row (perhaps due to
two different network interfaces being brought down).
* Fix build failure when wget is not installed.
+ * Fix wording of message displayed when unable to get a file that
+ is available in untrusted repositories.
-- Joey Hess <id@joeyh.name> Tue, 13 Jan 2015 17:03:39 -0400