-
Notifications
You must be signed in to change notification settings - Fork 993
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
Allow passing patterns to --update
argument
#15652
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e821622
Initial sketch for passing patterns to --update argument
AbrilRBS 9822c2c
Simplify test
AbrilRBS 162e7f4
Cleanup diff
AbrilRBS a2f30cd
Revert "Cleanup diff"
AbrilRBS 4daad33
Revert "Simplify test"
AbrilRBS dbc18cb
Add test
AbrilRBS 3bc09c7
Add debug protect to check which update checks are left to upgrade
AbrilRBS a8eaf1e
Fix more tests
AbrilRBS 41045c9
Remove unused import
AbrilRBS a5740af
Merge branch 'develop2' into rr/update-patterns
AbrilRBS da7d4c2
Add negation test
AbrilRBS 132926a
Remove update check
AbrilRBS 31d7a0f
Cleaner way to handle legacy syntax support
AbrilRBS 1e1a1c9
Allow only match on name
AbrilRBS 20fc574
Update --update help
AbrilRBS fd66e1c
Wording
AbrilRBS 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,11 +52,19 @@ def add_common_install_arguments(parser): | |
"When using version ranges, it will install the latest version that " | ||
"satisfies the range. Also, if using revisions, it will update to the " | ||
"latest revision for the resolved version range.") | ||
parser.add_argument("-u", "--update", action='store_true', default=False, | ||
help=update_help) | ||
|
||
parser.add_argument("-u", "--update", action="append", nargs="?", help=update_help, const=True) | ||
add_profiles_args(parser) | ||
|
||
|
||
def protect_update(args): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used to check in the tests that no leftover |
||
if getattr(args, "update", None) is not None: | ||
class UpdateList(list): | ||
def __bool__(self): | ||
assert False, "This should not be called" | ||
setattr(args, "update", UpdateList(args.update)) | ||
|
||
|
||
def add_profiles_args(parser): | ||
contexts = ["build", "host"] | ||
|
||
|
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
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
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
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
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
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.
const=True
does not mean that the value is const, rather, when no argument is supplied, it will appendTrue
in this case to the list