do commit location changes to remote in copy --to

test suite pointed out that if a file was copied from B to A, and then
A cloned, the clone ought to immediatly know it can get the file from A.
This commit is contained in:
Joey Hess 2011-10-27 18:03:36 -04:00
parent 1826b3bd67
commit c879eb873e

View file

@ -190,8 +190,11 @@ copyToRemote r key
let keysrc = gitAnnexLocation g key let keysrc = gitAnnexLocation g key
params <- rsyncParams r params <- rsyncParams r
-- run copy from perspective of remote -- run copy from perspective of remote
liftIO $ onLocal r $ Annex.Content.getViaTmp key $ liftIO $ onLocal r $ do
rsyncOrCopyFile params keysrc ok <- Annex.Content.getViaTmp key $
rsyncOrCopyFile params keysrc
Annex.Content.saveState
return ok
| Git.repoIsSsh r = do | Git.repoIsSsh r = do
g <- gitRepo g <- gitRepo
let keysrc = gitAnnexLocation g key let keysrc = gitAnnexLocation g key