Mercurial > piecrust2
comparison piecrust/publishing/rsync.py @ 624:b45fb2137a07
publish: Add option to change the source for the `rsync` publisher.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 08 Feb 2016 21:29:35 -0800 |
parents | 5d8e0c8cdb5f |
children | 6abb436fea5b |
comparison
equal
deleted
inserted
replaced
623:42da89d8bd51 | 624:b45fb2137a07 |
---|---|
5 PUBLISHER_NAME = 'rsync' | 5 PUBLISHER_NAME = 'rsync' |
6 PUBLISHER_SCHEME = 'rsync' | 6 PUBLISHER_SCHEME = 'rsync' |
7 | 7 |
8 def _getCommandArgs(self, ctx): | 8 def _getCommandArgs(self, ctx): |
9 if self.has_url_config: | 9 if self.has_url_config: |
10 orig = ctx.bake_out_dir | |
10 dest = self.parsed_url.netloc + self.parsed_url.path | 11 dest = self.parsed_url.netloc + self.parsed_url.path |
11 else: | 12 else: |
13 orig = self.getConfigValue('source', ctx.bake_our_dir) | |
12 dest = self.getConfigValue('destination') | 14 dest = self.getConfigValue('destination') |
13 | 15 |
14 rsync_options = None | 16 rsync_options = None |
15 if not self.has_url_config: | 17 if not self.has_url_config: |
16 rsync_options = self.getConfigValue('options') | 18 rsync_options = self.getConfigValue('options') |
17 if rsync_options is None: | 19 if rsync_options is None: |
18 rsync_options = ['-avc', '--delete'] | 20 rsync_options = ['-avc', '--delete'] |
19 | 21 |
20 args = ['rsync'] + rsync_options | 22 args = ['rsync'] + rsync_options |
21 args += [ctx.bake_out_dir, dest] | 23 args += [orig, dest] |
22 return args | 24 return args |
23 | 25 |