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.
This commit is contained in:
parent
218c679af6
commit
bed6773346
6 changed files with 119 additions and 39 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue