Add warning on publish if no branch was found.#795
Merged
pv merged 1 commit intoairspeed-velocity:masterfrom Mar 13, 2019
Merged
Add warning on publish if no branch was found.#795pv merged 1 commit intoairspeed-velocity:masterfrom
pv merged 1 commit intoairspeed-velocity:masterfrom
Conversation
90c3081 to
c64af17
Compare
Contributor
Author
|
I've just amended my commit with an improvement to speed and readability by extracting the list of branches for the current commit out of the loop. |
philpep
reviewed
Mar 6, 2019
| results.commit_hash in commits] | ||
|
|
||
| # Print a warning message if we couldn't find the branch of a commit | ||
| if not len(branches_for_commit): |
Contributor
Author
There was a problem hiding this comment.
I figured this was more explicit that way, it's almost a question of code style. If you think it's cleaner, I'll remove it
When the history has been modified (either with draft changesets in hg, or with commit rebasing in git), it is possible that no corresponding branch be found when publishing. There is no real way of automatically fixing the issue, so we at least have to log a warning.
c64af17 to
865f0cc
Compare
Collaborator
|
If you want to add general tests for logging, that's of course welcome. Otherwise the change here looks ok, modulo the style comment. |
Collaborator
|
Thanks, merged, not going to hold it for a style issue. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When the history has been modified (either with draft changesets in hg, or with commit rebasing in git), it is possible that no corresponding branch be found when publishing. There is no real way of automatically fixing the issue, so we at least have to log a warning.
However, it does not seem like there are tests for logs except the console tests for indentation, and I feel like this change warrants one.
Do you have a preferred method of going about this?