info: When run on a file now includes an indication of whether the content is present locally.
This commit is contained in:
parent
00a5e7475c
commit
f0886a1bdd
3 changed files with 9 additions and 0 deletions
|
@ -18,6 +18,8 @@ git-annex (6.20160726) UNRELEASED; urgency=medium
|
||||||
* When built with uuid-1.3.12, generate more random UUIDs than before.
|
* When built with uuid-1.3.12, generate more random UUIDs than before.
|
||||||
(However, this did not impact git-annex much, so a hard depedency has
|
(However, this did not impact git-annex much, so a hard depedency has
|
||||||
not been added on uuid-1.3.12.)
|
not been added on uuid-1.3.12.)
|
||||||
|
* info: When run on a file now includes an indication of whether
|
||||||
|
the content is present locally.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Wed, 20 Jul 2016 12:03:15 -0400
|
-- Joey Hess <id@joeyh.name> Wed, 20 Jul 2016 12:03:15 -0400
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ import Logs.Location
|
||||||
import Annex.NumCopies
|
import Annex.NumCopies
|
||||||
import Remote
|
import Remote
|
||||||
import Config
|
import Config
|
||||||
|
import Git.Config (boolConfig)
|
||||||
import Utility.Percentage
|
import Utility.Percentage
|
||||||
import Logs.Transfer
|
import Logs.Transfer
|
||||||
import Types.TrustLevel
|
import Types.TrustLevel
|
||||||
|
@ -220,6 +221,7 @@ file_stats f k =
|
||||||
[ file_name f
|
[ file_name f
|
||||||
, key_size k
|
, key_size k
|
||||||
, key_name k
|
, key_name k
|
||||||
|
, content_present k
|
||||||
]
|
]
|
||||||
|
|
||||||
remote_fast_stats :: Remote -> [Stat]
|
remote_fast_stats :: Remote -> [Stat]
|
||||||
|
@ -354,6 +356,9 @@ key_size k = simpleStat "size" $ showSizeKeys $ foldKeys [k]
|
||||||
key_name :: Key -> Stat
|
key_name :: Key -> Stat
|
||||||
key_name k = simpleStat "key" $ pure $ key2file k
|
key_name k = simpleStat "key" $ pure $ key2file k
|
||||||
|
|
||||||
|
content_present :: Key -> Stat
|
||||||
|
content_present k = stat "present" $ json boolConfig $ lift $ inAnnex k
|
||||||
|
|
||||||
bloom_info :: Stat
|
bloom_info :: Stat
|
||||||
bloom_info = simpleStat "bloom filter size" $ do
|
bloom_info = simpleStat "bloom filter size" $ do
|
||||||
localkeys <- countKeys <$> cachedPresentData
|
localkeys <- countKeys <$> cachedPresentData
|
||||||
|
|
|
@ -2,3 +2,5 @@ ATM in DataLad we rely on 'git annex find' to determine either files have conten
|
||||||
|
|
||||||
|
|
||||||
[[!meta author=yoh]]
|
[[!meta author=yoh]]
|
||||||
|
|
||||||
|
> sure, [[done]] --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue