# HG changeset patch # User Ludovic Chabant # Date 1454995775 28800 # Node ID b45fb2137a070ea4c34f90b3f186aebe72f5a340 # Parent 42da89d8bd5117372a0fc67c9d4d0788674e38f6 publish: Add option to change the source for the `rsync` publisher. diff -r 42da89d8bd51 -r b45fb2137a07 piecrust/publishing/rsync.py --- a/piecrust/publishing/rsync.py Mon Feb 08 21:05:26 2016 -0800 +++ b/piecrust/publishing/rsync.py Mon Feb 08 21:29:35 2016 -0800 @@ -7,8 +7,10 @@ def _getCommandArgs(self, ctx): if self.has_url_config: + orig = ctx.bake_out_dir dest = self.parsed_url.netloc + self.parsed_url.path else: + orig = self.getConfigValue('source', ctx.bake_our_dir) dest = self.getConfigValue('destination') rsync_options = None @@ -18,6 +20,6 @@ rsync_options = ['-avc', '--delete'] args = ['rsync'] + rsync_options - args += [ctx.bake_out_dir, dest] + args += [orig, dest] return args