New submission from Nick Coghlan:
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.
----------
assignee: ncoghlan
messages: 288588
nosy: brett.cannon, ncoghlan
priority: normal
severity: normal
status: open
title: Change "make patchcheck" to be branch aware?
type: enhancement
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29656>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com