invalidate recorded content identifier tree when export changes
Fix bug that made changes to a special remote sometimes be missed when
importing a tree from it. The diff import would miss when a change was
exported, then manually undone on the special remote (eg deleting a newly
exported file). A full import is needed to catch such changes.
After upgrading, any such missed changes will be included in the next
tree imported from a special remote. This happens because the previously
recorded content identifier tree does not have export information included,
so it is treated as invalid, and a full import is done.
Fixes reversion introduced in version 10.20230626, commit
40017089f2
Unfortunately, this does mean that after each export, the next import will
be a full import. Which can take significantly longer than the diff import
does, when there are a lot of files in the tree.
It would be better if exporting also update the content identifier tree.
However, I don't know if that can be done inexpensively. It would be future
optimisation work, in any case.
(That could only be done for an export that is run in the same
repository as the import. When an export is run in a different repository,
the export.log gets updated, and that propagates to the repository where
import is later run. At that point, a full import is done.)
Sponsored-by: Luke T. Shumaker
This commit is contained in:
parent
a1cd61b1c4
commit
ff65cd6954
6 changed files with 111 additions and 41 deletions
|
|
@ -606,8 +606,8 @@ pullThirdPartyPopulated o remote
|
|||
Command.Import.listContents' remote ImportTree (CheckGitIgnore False) go
|
||||
where
|
||||
go (Just importable) = importChanges remote ImportTree False True importable >>= \case
|
||||
ImportFinished imported -> do
|
||||
(_t, updatestate) <- recordImportTree remote ImportTree Nothing imported
|
||||
ImportFinished postexportlogupdate imported -> do
|
||||
(_t, updatestate) <- recordImportTree remote ImportTree Nothing imported postexportlogupdate
|
||||
next $ do
|
||||
updatestate
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue