-
Notifications
You must be signed in to change notification settings - Fork 910
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
(GH-293) choco upgrade all -except="package1,package2" #343
(GH-293) choco upgrade all -except="package1,package2" #343
Conversation
} | ||
} | ||
} | ||
} |
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.
This should roll in under the upgrade scenarios. Thoughts?
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.
That was my first attempt, but the Context
(the tests setup) was very different, so I thought it'd be easier to understand if it was separate. Merging the two would require a refactor of UpgradeScenarios
that goes beyond the PR.
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.
Why?
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.
Why I consider this refactoring outside of the PR? Because there was no test initially (that I could find) that tested "upgrade all", so I added some but the choco upgrade all
command already existed prior to that PR.
Also, the upgrade tests all shared a common "context" (test setup), so changing that would require refactoring the whole UpgradeScenarios
class, changing each test or restructuring them... but the PR only focus on filtering choco upgrade all
packages, so changing this file completely - adding to this eventual merge issues if the PR is not quickly merged - falls outside of the actual except
feature.
I tried to keep the new file as clean and simple as possible so that if eventually UpgradeScenarios
and UpgradeAllScenarios
were to be merged, there would be minimal headaches.
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.
Also, the upgrade tests all shared a common "context" (test setup), so changing that would require refactoring the whole UpgradeScenarios class, changing each test or restructuring them... but the PR only focus on filtering choco upgrade all packages, so changing this file completely - adding to this eventual merge issues if the PR is not quickly merged - falls outside of the actual except feature.
Well they share it, but they can override it in each individual spec class. And if you look through many of them, they do. Some override and still call the base, although not required. The way it is setup is quite flexible, no refactoring required.
Overall +1 |
Feedback included and merge complete. Is there anything to do for documentation, or will you be taking care of this? |
Documentation, yes, Would need to include some information in the help method related to this. |
I added some documentation to the |
@@ -97,7 +97,7 @@ public IEnumerable<PackageResult> list_run(ChocolateyConfiguration config) | |||
if (config.RegularOutput) this.Log().Debug(() => "Running list with the following filter = '{0}'".format_with(config.Input)); | |||
if (config.RegularOutput) this.Log().Debug(() => "--- Start of List ---"); | |||
foreach (var pkg in NugetList.GetPackages(config, _nugetLogger)) | |||
|
|||
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.
new line?
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.
This was from the merge, and was not my change (I should have just rebased)
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.
actually a rebase is what we always hope for. I don't like merge commits anywhere except for explicit merges.
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.
Understandable, I'd ask the same. I was lazy, I'll rebase as soon as I can :)
On the wiki, not at the current time. Sometimes when we add something new, we mention what version it is coming out in. |
b47dd09
to
1b6821f
Compare
Squashed and rebased on |
1b6821f
to
05cd7e7
Compare
05cd7e7
to
d8a258c
Compare
Merged the UpgradeScenarios and UpgradeAllScenarios, ready to merge |
Rebased, commit message fixed up and merged into stable. |
This pull request implements #293 by providing a list of packages to ignore.
These packages will not be upgraded because they were specified in '-except': package1
when specifying packages to skip-except
do not exist in the installed list of packages, it will display a warning:Some packages specified in '-except' were not found in the local packages: 'package1'
-except
argument is not provided, there is no differencechoco upgrade all
that I could find, so I added a very basic one, based on the fact that upgrades are already tested inUpgradeScenarios
-skip
but it seems-s*
will be catched by-source
, so I stucked with-except
Hopefully, all will be good with that pull request :)
Fixes #293.