From b0e388747c5f5667dc38030f6b20fada49627e61 Mon Sep 17 00:00:00 2001 From: Ondrej Grover Date: Mon, 28 Apr 2014 21:47:18 +0200 Subject: [PATCH] Fix #1277 use rsync -c option as all output is rewritten Because Pelican always rewrites all output, the mtimes always change, so rsync would always transfer all the files which defeats the purpose of rsync. The '-c' option (--checksum) compares the checksums rather than mtimes. --- pelican/tools/templates/Makefile.in | 2 +- pelican/tools/templates/fabfile.py.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pelican/tools/templates/Makefile.in b/pelican/tools/templates/Makefile.in index c542e588..6bfa7b0c 100644 --- a/pelican/tools/templates/Makefile.in +++ b/pelican/tools/templates/Makefile.in @@ -88,7 +88,7 @@ ssh_upload: publish scp -P $$(SSH_PORT) -r $$(OUTPUTDIR)/* $$(SSH_USER)@$$(SSH_HOST):$$(SSH_TARGET_DIR) rsync_upload: publish - rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude + rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude dropbox_upload: publish cp -r $$(OUTPUTDIR)/* $$(DROPBOX_DIR) diff --git a/pelican/tools/templates/fabfile.py.in b/pelican/tools/templates/fabfile.py.in index fb56ae85..fbd03e2c 100644 --- a/pelican/tools/templates/fabfile.py.in +++ b/pelican/tools/templates/fabfile.py.in @@ -68,5 +68,6 @@ def publish(): remote_dir=dest_path, exclude=".DS_Store", local_dir=DEPLOY_PATH.rstrip('/') + '/', - delete=True + delete=True, + extra_opts='-c', )