plumb in LiveUpdate (WIP)
Each command that first checks preferred content (and/or required content) and then does something that can change the sizes of repositories needs to call prepareLiveUpdate, and plumb it through the preferred content check and the location log update. So far, only Command.Drop is done. Many other commands that don't need to do this have been updated to keep working. There may be some calls to NoLiveUpdate in places where that should be done. All will need to be double checked. Not currently in a compilable state.
This commit is contained in:
parent
4885073377
commit
c3d40b9ec3
58 changed files with 363 additions and 247 deletions
|
@ -43,15 +43,15 @@ store remoteuuid gc runner k af o p = do
|
|||
metered (Just p) sizer bwlimit $ \_ p' ->
|
||||
runner (P2P.put k af p') >>= \case
|
||||
Just (Just fanoutuuids) ->
|
||||
storeFanout k InfoPresent remoteuuid fanoutuuids
|
||||
storeFanout NoLiveUpdate k InfoPresent remoteuuid fanoutuuids
|
||||
Just Nothing -> giveup "Transfer failed"
|
||||
Nothing -> remoteUnavail
|
||||
|
||||
storeFanout :: Key -> LogStatus -> UUID -> [UUID] -> Annex ()
|
||||
storeFanout k logstatus remoteuuid us =
|
||||
storeFanout :: LiveUpdate -> Key -> LogStatus -> UUID -> [UUID] -> Annex ()
|
||||
storeFanout lu k logstatus remoteuuid us =
|
||||
forM_ us $ \u ->
|
||||
when (u /= remoteuuid) $
|
||||
logChange k u logstatus
|
||||
logChange lu k u logstatus
|
||||
|
||||
retrieve :: RemoteGitConfig -> (ProtoRunner (Bool, Verification)) -> Key -> AssociatedFile -> FilePath -> MeterUpdate -> VerifyConfig -> Annex Verification
|
||||
retrieve gc runner k af dest p verifyconfig = do
|
||||
|
@ -66,10 +66,10 @@ retrieve gc runner k af dest p verifyconfig = do
|
|||
remove :: UUID -> ProtoRunner (Either String Bool, Maybe [UUID]) -> Maybe SafeDropProof -> Key -> Annex ()
|
||||
remove remoteuuid runner proof k = runner (P2P.remove proof k) >>= \case
|
||||
Just (Right True, alsoremoveduuids) ->
|
||||
storeFanout k InfoMissing remoteuuid
|
||||
storeFanout NoLiveUpdate k InfoMissing remoteuuid
|
||||
(fromMaybe [] alsoremoveduuids)
|
||||
Just (Right False, alsoremoveduuids) -> do
|
||||
storeFanout k InfoMissing remoteuuid
|
||||
storeFanout NoLiveUpdate k InfoMissing remoteuuid
|
||||
(fromMaybe [] alsoremoveduuids)
|
||||
giveup "removing content from remote failed"
|
||||
Just (Left err, _) -> do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue