diff --git a/CHANGELOG b/CHANGELOG index 56b6e138e9..2ec2c1983c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ git-annex (10.20230803) UNRELEASED; urgency=medium * Stop bundling curl in the OSX dmg and linux standalone image. * sync, assist, push, pull: Skip more types of remotes when they are not present due to eg being on a drive that is offline. + * info: Added available to the info displayed for a remote. * Added AVAILABILITY UNAVAILABLE and the UNAVAILABLERESPONSE extension to the external special remote protocol. * The remote.name.annex-availability git config is no longer used. diff --git a/Command/Info.hs b/Command/Info.hs index bfa045e7a5..f487f8db19 100644 --- a/Command/Info.hs +++ b/Command/Info.hs @@ -43,6 +43,7 @@ import Logs.Transfer import Types.Key import Types.TrustLevel import Types.FileMatcher +import Types.Availability import qualified Limit import Messages.JSON (DualDisp(..), ObjectMap(..)) import Annex.BloomFilter @@ -312,6 +313,7 @@ remote_fast_stats r = map (\s -> s r) [ remote_name , remote_cost , remote_type + , remote_availabile ] uuid_fast_stats :: UUID -> [Stat] @@ -397,6 +399,11 @@ remote_type :: Remote -> Stat remote_type r = simpleStat "type" $ pure $ Remote.typename $ Remote.remotetype r +remote_availabile :: Remote -> Stat +remote_availabile r = simpleStat "available" $ lift $ + either show (\av -> boolConfig (av /= Unavailable)) + <$> tryNonAsync (Remote.availability r) + local_annex_keys :: Stat local_annex_keys = stat "local annex keys" $ json show $ countKeys <$> cachedPresentData