include information about remotes just uloaded to when calling handleDropsFrom
This commit is contained in:
parent
7e6e018408
commit
e3625e3d89
1 changed files with 10 additions and 8 deletions
|
@ -504,11 +504,13 @@ syncContent rs f (k, _) = do
|
||||||
locs <- loggedLocations k
|
locs <- loggedLocations k
|
||||||
let (have, lack) = partition (\r -> Remote.uuid r `elem` locs) rs
|
let (have, lack) = partition (\r -> Remote.uuid r `elem` locs) rs
|
||||||
|
|
||||||
results <- mapM run =<< concat <$> sequence
|
getresults <- sequence =<< handleget have
|
||||||
[ handleget have
|
(putresults, putrs) <- unzip <$> (sequence =<< handleput lack)
|
||||||
, handleput lack
|
|
||||||
]
|
let locs' = catMaybes putrs ++ locs
|
||||||
handleDropsFrom locs rs "unwanted" True k (Just f) Nothing
|
handleDropsFrom locs' rs "unwanted" True k (Just f) Nothing
|
||||||
|
|
||||||
|
let results = getresults ++ putresults
|
||||||
if null results
|
if null results
|
||||||
then stop
|
then stop
|
||||||
else do
|
else do
|
||||||
|
@ -531,7 +533,7 @@ syncContent rs f (k, _) = do
|
||||||
)
|
)
|
||||||
get have = do
|
get have = do
|
||||||
showStart "get" f
|
showStart "get" f
|
||||||
getViaTmp k $ \dest -> getKeyFile' k (Just f) dest have
|
run $ getViaTmp k $ \dest -> getKeyFile' k (Just f) dest have
|
||||||
|
|
||||||
wantput r
|
wantput r
|
||||||
| Remote.readonly r || remoteAnnexReadOnly (Types.Remote.gitconfig r) = return False
|
| Remote.readonly r || remoteAnnexReadOnly (Types.Remote.gitconfig r) = return False
|
||||||
|
@ -543,8 +545,8 @@ syncContent rs f (k, _) = do
|
||||||
put dest = do
|
put dest = do
|
||||||
showStart "copy" f
|
showStart "copy" f
|
||||||
showAction $ "to " ++ Remote.name dest
|
showAction $ "to " ++ Remote.name dest
|
||||||
ok <- upload (Remote.uuid dest) k (Just f) noRetry $
|
ok <- run $ upload (Remote.uuid dest) k (Just f) noRetry $
|
||||||
Remote.storeKey dest k (Just f)
|
Remote.storeKey dest k (Just f)
|
||||||
when ok $
|
when ok $
|
||||||
Remote.logStatus dest k InfoPresent
|
Remote.logStatus dest k InfoPresent
|
||||||
return ok
|
return (ok, if ok then Just (Remote.uuid dest) else Nothing)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue