Skip to content

Commit

Permalink
Merge pull request #1171 from kyleknap/sync-recursive-remove
Browse files Browse the repository at this point in the history
Remove unnecessary --recursive from sync command
  • Loading branch information
kyleknap committed Feb 23, 2015
2 parents ee499af + 1732b8a commit 12c8669
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
CHANGELOG
=========

Next Release (TBD)
==================

* bugfix:``aws s3 sync``: Remove ``--recursive`` parameter. The ``sync``
command is always a recursive operation meaning the inclusion or
exclusion of ``--recursive`` had no effect on the ``sync`` command.
(`issue 1171 <https://github.com/aws/aws-cli/pull/1168>`__)


1.7.11
======

Expand Down
7 changes: 4 additions & 3 deletions awscli/customizations/s3/subcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
'Using a lower value may help if an operation times out.')}


TRANSFER_ARGS = [DRYRUN, QUIET, RECURSIVE, INCLUDE, EXCLUDE, ACL,
TRANSFER_ARGS = [DRYRUN, QUIET, INCLUDE, EXCLUDE, ACL,
FOLLOW_SYMLINKS, NO_FOLLOW_SYMLINKS, NO_GUESS_MIME_TYPE,
SSE, STORAGE_CLASS, GRANTS, WEBSITE_REDIRECT, CONTENT_TYPE,
CACHE_CONTROL, CONTENT_DISPOSITION, CONTENT_ENCODING,
Expand Down Expand Up @@ -526,7 +526,8 @@ class CpCommand(S3TransferCommand):
USAGE = "<LocalPath> <S3Path> or <S3Path> <LocalPath> " \
"or <S3Path> <S3Path>"
ARG_TABLE = [{'name': 'paths', 'nargs': 2, 'positional_arg': True,
'synopsis': USAGE}] + TRANSFER_ARGS + [EXPECTED_SIZE]
'synopsis': USAGE}] + TRANSFER_ARGS + \
[EXPECTED_SIZE, RECURSIVE]
EXAMPLES = BasicCommand.FROM_FILE('s3/cp.rst')


Expand All @@ -537,7 +538,7 @@ class MvCommand(S3TransferCommand):
USAGE = "<LocalPath> <S3Path> or <S3Path> <LocalPath> " \
"or <S3Path> <S3Path>"
ARG_TABLE = [{'name': 'paths', 'nargs': 2, 'positional_arg': True,
'synopsis': USAGE}] + TRANSFER_ARGS
'synopsis': USAGE}] + TRANSFER_ARGS + [RECURSIVE]
EXAMPLES = BasicCommand.FROM_FILE('s3/mv.rst')


Expand Down
5 changes: 5 additions & 0 deletions tests/unit/customizations/s3/test_sync_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ def test_website_redirect_ignore_paramfile(self):
self.operations_called[1][1]['website_redirect_location'],
'http://someserver'
)

def test_no_recursive_option(self):
cmdline = '. s3://mybucket --recursive'
# Return code will be 2 for invalid parameter ``--recursive``
self.run_cmd(cmdline, expected_rc=2)

0 comments on commit 12c8669

Please sign in to comment.