diff options
author | Joey Hess <joeyh@joeyh.name> | 2018-02-28 12:09:03 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2018-02-28 13:36:20 -0400 |
commit | 3c2887bcfdacd2676386e2e97c29e22c7570cd67 (patch) | |
tree | 2c2f42b828adce13ef5e967b271fabe6f51f94b3 /Remote/Rsync | |
parent | ac782cf693bb579553186042490428245b482077 (diff) |
Support exporttree=yes for rsync special remotes.
Renaming is not supported; it might be possible to use --fuzzy to get rsync
to notice the file is being renamed, but that is a bit ..fuzzy.
On the other hand, interrupted transfers of an exported file are resumed,
since rsync is great at that. Had to adjust the exporttree docs, which
said interrupted transfers would restart.
Note that remove no longer makes the empty directory dummy, instead
sending the top-level empty directory. This works just as well and I
noticed the dummy was unncessary when refactoring it into removeGeneric.
Verified that behavior of remove is not changed, and git annex
testremote does pass.
This commit was sponsored by Brock Spratlen on Patreon.
Diffstat (limited to 'Remote/Rsync')
-rw-r--r-- | Remote/Rsync/RsyncUrl.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Remote/Rsync/RsyncUrl.hs b/Remote/Rsync/RsyncUrl.hs index c0f30c1fb..67ce7946b 100644 --- a/Remote/Rsync/RsyncUrl.hs +++ b/Remote/Rsync/RsyncUrl.hs @@ -1,6 +1,6 @@ {- Rsync urls. - - - Copyright 2014 Joey Hess <id@joeyh.name> + - Copyright 2014-2018 Joey Hess <id@joeyh.name> - - Licensed under the GNU GPL version 3 or higher. -} @@ -36,6 +36,9 @@ rsyncEscape o u | rsyncShellEscape o && rsyncUrlIsShell (rsyncUrl o) = shellEscape u | otherwise = u +mkRsyncUrl :: RsyncOpts -> FilePath -> RsyncUrl +mkRsyncUrl o f = rsyncUrl o </> rsyncEscape o f + rsyncUrls :: RsyncOpts -> Key -> [RsyncUrl] rsyncUrls o k = map use dirHashes where |