tahoe: Include tahoe capabilities in whereis display.
authorJoey Hess <joeyh@joeyh.name>
Mon, 30 Nov 2015 19:35:53 +0000 (15:35 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 30 Nov 2015 19:35:53 +0000 (15:35 -0400)
Remote/Tahoe.hs
debian/changelog

index 2ced67e308e30bb3963cd7a2ffaf31af30a6a3a1..5c28773ae6593079434052a0d450fb00c92b5a40 100644 (file)
@@ -75,7 +75,7 @@ gen r u c gc = do
                , lockContent = Nothing
                , checkPresent = checkKey u hdl
                , checkPresentCheap = False
-               , whereisKey = Nothing
+               , whereisKey = Just (getWhereisKey u)
                , remoteFsck = Nothing
                , repairRepo = Nothing
                , config = c
@@ -231,6 +231,12 @@ storeCapability u k cap = setRemoteState u k cap
 getCapability :: UUID -> Key -> Annex (Maybe Capability)
 getCapability u k = getRemoteState u k
 
+getWhereisKey :: UUID -> Key -> Annex [String]
+getWhereisKey u k = disp <$> getCapability u k
+  where
+       disp Nothing = []
+       disp (Just c) = [c]
+
 {- tahoe put outputs a single line, containing the capability. -}
 parsePut :: String -> Maybe Capability
 parsePut s = case lines s of
index 55f195dc495888fd4fcd0de9c648f2248baab877..282e54710e0e2e335573d60bd34e457e90a09372 100644 (file)
@@ -9,6 +9,7 @@ git-annex (5.20151117) UNRELEASED; urgency=medium
   * When core.sharedRepository is set, annex object files are not made mode
     444, since that prevents a user other than the file owner from locking
     them. Instead, a mode such as 664 is used in this case.
+  * tahoe: Include tahoe capabilities in whereis display.
 
  -- Joey Hess <id@joeyh.name>  Mon, 16 Nov 2015 16:49:34 -0400