add exportedtree to info
info: When used with an exporttree remote, includes an "exportedtree" info, which is the tree last exported to the remote. During an export conflict, multiple values will be listed. This commit was sponsored by John Pellman on Patreon.
This commit is contained in:
parent
3ad7b7927e
commit
b8f9dea27d
3 changed files with 32 additions and 1 deletions
|
@ -18,6 +18,8 @@ import Remote.Helper.Encryptable (isEncrypted)
|
|||
import Database.Export
|
||||
import Annex.Export
|
||||
import Config
|
||||
import Git.Types (fromRef)
|
||||
import Logs.Export
|
||||
|
||||
import qualified Data.Map as M
|
||||
import Control.Concurrent.STM
|
||||
|
@ -186,8 +188,11 @@ adjustExportable r = case M.lookup "exporttree" (config r) of
|
|||
, checkPresentCheap = False
|
||||
, mkUnavailable = return Nothing
|
||||
, getInfo = do
|
||||
ts <- map (\t -> ("exportedtree", fromRef t) )
|
||||
. map exportedTreeish
|
||||
<$> getExport (uuid r)
|
||||
is <- getInfo r
|
||||
return (is++[("export", "yes")])
|
||||
return (is++[("export", "yes")]++ts)
|
||||
}
|
||||
retrieveKeyFileFromExport getexportlocs exportinconflict k _af dest p = unVerified $
|
||||
if maybe False (isJust . verifyKeyContent) (maybeLookupBackendVariety (keyVariety k))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue