sync --content: Reuse smart copy code from copy command, including handling and repairing out of date location tracking info. Closes: #737480
This commit is contained in:
parent
1858c1f44a
commit
4676706756
2 changed files with 5 additions and 9 deletions
|
@ -34,8 +34,7 @@ import Git.FileMode
|
|||
import Annex.Wanted
|
||||
import Annex.Content
|
||||
import Command.Get (getKeyFile')
|
||||
import Logs.Transfer
|
||||
import Logs.Presence
|
||||
import qualified Command.Move
|
||||
import Logs.Location
|
||||
import Annex.Drop
|
||||
|
||||
|
@ -558,11 +557,5 @@ syncFile rs f (k, _) = do
|
|||
put dest = do
|
||||
ok <- commandAction $ do
|
||||
showStart "copy" f
|
||||
showAction $ "to " ++ Remote.name dest
|
||||
next $ next $ do
|
||||
ok <- upload (Remote.uuid dest) k (Just f) noRetry $
|
||||
Remote.storeKey dest k (Just f)
|
||||
when ok $
|
||||
Remote.logStatus dest k InfoPresent
|
||||
return ok
|
||||
next $ Command.Move.toPerform dest False k (Just f)
|
||||
return (ok, if ok then Just (Remote.uuid dest) else Nothing)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue