sync: import when annex-tracking-branch is configured

This works, and tested syncing both gets changes from a special remote
and sends changes to it, keeping it fully in sync nicely!

But have not tried it with a subdir configured.
This commit is contained in:
Joey Hess 2019-03-09 13:57:49 -04:00
parent ca1a3caaa8
commit c755788256
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 41 additions and 9 deletions

View file

@ -104,12 +104,12 @@ seek o@(LocalImportOptions {}) = allowConcurrentOutput $ do
`withPathContents` importFiles o
seek o@(RemoteImportOptions {}) = allowConcurrentOutput $ do
r <- getParsed (importFromRemote o)
unlessM (Remote.isImportSupported r) $
giveup "That remote does not support imports."
subdir <- maybe
(pure Nothing)
(Just <$$> inRepo . toTopFilePath)
(importToSubDir o)
unlessM (Remote.isImportSupported remote) $
giveup "That remote does not support imports."
seekRemote r (importToBranch o) subdir
startLocal :: GetFileMatcher -> DuplicateMode -> (FilePath, FilePath) -> CommandStart