all keys are still present on versioned remote after import of a tree
When importing from versioned remotes, fix tracking of the content of deleted files. Only S3 supports versioning so far, so only it was affected. But, the draft import/export interface for external remotes also seemed to need a change, so that versionedExport could be set.
This commit is contained in:
parent
e22c3b3d7c
commit
c2ad84b423
7 changed files with 35 additions and 9 deletions
|
@ -184,10 +184,13 @@ recordImportTree remote importtreeconfig importable = do
|
|||
unlessM (stillpresent db oldkey) $
|
||||
logChange oldkey (Remote.uuid remote) InfoMissing
|
||||
_ -> noop
|
||||
db <- Export.openDb (Remote.uuid remote)
|
||||
forM_ (exportedTreeishes oldexport) $ \oldtree ->
|
||||
Export.runExportDiffUpdater updater db oldtree finaltree
|
||||
Export.closeDb db
|
||||
-- When the remote is versioned, it still contains keys
|
||||
-- that are not present in the new tree.
|
||||
unless (Remote.versionedExport (Remote.exportActions remote)) $ do
|
||||
db <- Export.openDb (Remote.uuid remote)
|
||||
forM_ (exportedTreeishes oldexport) $ \oldtree ->
|
||||
Export.runExportDiffUpdater updater db oldtree finaltree
|
||||
Export.closeDb db
|
||||
|
||||
buildImportCommit' :: Remote -> ImportCommitConfig -> Maybe Sha -> History Sha -> Annex (Maybe Sha)
|
||||
buildImportCommit' remote importcommitconfig mtrackingcommit imported@(History ti _) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue