-
Notifications
You must be signed in to change notification settings - Fork 80
Add --exclude-from and --include-from flags to sync command #2660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anton-107
wants to merge
16
commits into
main
Choose a base branch
from
anton-107/sync-excludefrom
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
58bdc7f
add --exclude-from flag to sync commands
anton-107 20d6153
fix the acceptance tests
anton-107 2819c9b
add acceptance test for cmd/sync/from-file
anton-107 e817036
add acceptance test for bundle/sync/from-file
anton-107 93d7371
fix acceptance test
anton-107 f096b9e
update NEXT_CHANGELOG.md
anton-107 3d55de8
fix whitespace
anton-107 76acd9b
remove exclude-from flag from bundle sync
anton-107 fbaa1be
remove exclude-from flag from bundle sync (fix acceptance test)
anton-107 2c66d9e
fix acceptance test for dryrun sync
anton-107 7b10afe
fix acceptance tests
anton-107 1ec76c9
move acceptance test for sync-from-file one level up
anton-107 4cd963b
remove empty line and comments checks
anton-107 a63bc50
fix unit test
anton-107 34c8d43
more conditions for the test ignore file: 1) refers to exact file (ex…
anton-107 a918047
add include-from flag support to cmd sync command
anton-107 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ignored-folder/ | ||
script | ||
output.txt | ||
repls.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project-folder/blob/* | ||
project-folder/static/**/*.txt | ||
project-folder/*.sql | ||
project-folder/app2.py | ||
ignored-folder2/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
>>> [CLI] sync . /Users/[USERNAME] --exclude-from ignore.test-fixture | ||
Initial Sync Complete | ||
Uploaded .gitignore | ||
Uploaded ignore.test-fixture | ||
Uploaded project-folder | ||
Uploaded project-folder/app.py | ||
Uploaded project-folder/app.yaml | ||
|
||
>>> [CLI] sync . /Users/[USERNAME] --include-from ignore.test-fixture | ||
Initial Sync Complete | ||
Uploaded ignored-folder2 | ||
Uploaded ignored-folder2/app.py | ||
Uploaded project-folder/app2.py | ||
Uploaded project-folder/blob | ||
Uploaded project-folder/blob/1 | ||
Uploaded project-folder/blob/2 | ||
Uploaded project-folder/query.sql | ||
Uploaded project-folder/static/folder1 | ||
Uploaded project-folder/static/folder1/1.txt | ||
Uploaded project-folder/static/folder2 | ||
Uploaded project-folder/static/folder2/2.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
mkdir "project-folder" "project-folder/blob" "project-folder/static" "project-folder/static/folder1" "project-folder/static/folder2" "ignored-folder" "ignored-folder/folder1" "ignored-folder2" ".git" | ||
touch "project-folder/app.yaml" "project-folder/app.py" "project-folder/app2.py" "project-folder/query.sql" "project-folder/blob/1" "project-folder/blob/2" "ignored-folder2/app.py" | ||
touch "project-folder/static/folder1/1.txt" "project-folder/static/folder2/2.txt" | ||
touch "ignored-folder/script.py" "ignored-folder/folder1/script.py" "ignored-folder/folder1/script.yaml" "ignored-folder/folder1/big-blob" | ||
mv gitignore.test-fixture .gitignore | ||
|
||
cleanup() { | ||
rm -rf project-folder ignored-folder ignored-folder2 .git | ||
} | ||
trap cleanup EXIT | ||
|
||
# Note: output line starting with "Action: " lists files in non-deterministic order so we filter it out | ||
trace $CLI sync . /Users/$CURRENT_USER_NAME --exclude-from 'ignore.test-fixture' | grep -v "^Action: " | sort | ||
trace $CLI sync . /Users/$CURRENT_USER_NAME --include-from 'ignore.test-fixture' | grep -v "^Action: " | sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can only specify this option once? rsync supports multiple, let's make this a slice as well?