This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients brett.cannon, ncoghlan
Date 2017-02-26.04:52:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za>
In-reply-to
Content
With the switch to a PR based workflow, I'm finding the current incarnation of "make patchcheck" less helpful than it used to be, as it only checks uncommitted changes, rather than all changes relative to the base branch.

Looking at Tools/scripts/patchcheck.py, it seems like it should be possible to use sys.version_info to calculate a suitable base branch ('master' if the release is alpha, '{major}.{minor}' otherwise), but things get a bit trickier from there:

- the local branches may not be up to date if the PR branch is based directly on a remote branch, so we can't rely on those
- figuring out which remote to use isn't immediately obvious, but we could probably go with an approach of using "upstream/{branch}" if an "upstream" remote is defined, and "origin/{branch}" otherwise
- once we have a base branch to use, then `git diff --name-status {branch}` should give us the file list in a similar format to the current `git status --porcelain`

I'll put together a PR for this approach.
History
Date User Action Args
2017-02-26 04:52:17ncoghlansetrecipients: + ncoghlan, brett.cannon
2017-02-26 04:52:17ncoghlansetmessageid: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za>
2017-02-26 04:52:16ncoghlanlinkissue29656 messages
2017-02-26 04:52:14ncoghlancreate