lektor / lektor

The lektor static file content management system

Home Page:https://www.getlektor.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rsync --delete-delay is not supported on macOS

relikd opened this issue · comments

lektor/lektor/publisher.py

Lines 187 to 188 in 0ce8fd4

if delete:
argline.append("--delete-delay")

--delete                delete extraneous files from dest dirs
--delete-before         receiver deletes before transfer (default)
--delete-during         receiver deletes during xfer, not before
--delete-after          receiver deletes after transfer, not before
--delete-excluded       also delete excluded files from dest dirs

... and since we are on the topic of rsync: I'd like to suggest to add support for local filesystem sync (e.g., if you are working on the same machine on which the web service is running). Currently providing a rsync:///absolut/path will crash Lektor. (haha, I have the same scenario as #699, currently using a custom plugin for that)

... and yet another request: I would welcome the addition of a dry-run option to see what changes exist. :)

... also: add --no-motd? – to omit the first few lines? =)

Background: The --delete-delay option was added in rsync version 3.0.0, released March 2008. Apparently macOS ships with a version of rsync older than that, because that is also the version where rsync's license changed to GPLv3 from GPLv2, which Apple took exception to for whatever reason. (A modern version of rsync is available via Homebrew, and is one possible workaround.)

Question: Would we be happy with always using --delete-after, or must we conditionally use --delete-after only when --delete-delay is not available? As I understand it, the difference between the two is largely one of efficiency: --delete-delay allows for the use of rsync's new memory-friendly incremental recursion mode, while --delete-after forces the full recursive file list to be read into memory. I'm guessing no one would notice if we always used --delete-after.