update location log during import
This commit is contained in:
parent
775e6ed86f
commit
b1f10fbb4d
2 changed files with 10 additions and 0 deletions
|
@ -37,6 +37,7 @@ import Utility.Metered
|
|||
import Utility.DataUnits
|
||||
import Logs.Export
|
||||
import Logs.ContentIdentifier
|
||||
import Logs.Location
|
||||
import qualified Database.Export as Export
|
||||
import qualified Database.ContentIdentifier as CID
|
||||
|
||||
|
@ -223,6 +224,8 @@ downloadImport remote importtreeconfig importablecontents = do
|
|||
Remote.retrieveExportWithContentIdentifier ia loc cid tmpfile (ingestkey loc tmpfile) p >>= \case
|
||||
Just k -> do
|
||||
recordcidkey cidmap db cid k
|
||||
logStatus k InfoPresent
|
||||
logChange k (Remote.uuid remote) InfoPresent
|
||||
return $ Just (loc, k)
|
||||
Nothing -> return Nothing
|
||||
where
|
||||
|
|
|
@ -12,6 +12,13 @@ this.
|
|||
|
||||
* need to check if a remote has importtree=yes before trying to import from it
|
||||
|
||||
* Importing from a remote updates the location log for downloaded keys to
|
||||
indicate they're present in the remote. So it should also update the
|
||||
location log for keys that were present in the remote, but no longer are.
|
||||
This will need a fast way to list the keys that are thought to be present
|
||||
in the remote; one way would be to remember the previous list of contents
|
||||
in the remote, and diff between it and the current one.
|
||||
|
||||
* "git annex import master --from rmt" followed by "git annex import master:sub --from rmt"
|
||||
first makes the tracking branch contain only what's in the remote,
|
||||
and then grafts what's in the remote into a subdir. Is that the behavior
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue