Issue 29798: Handle "git worktree" in "make patchcheck" (original) (raw)

Created on 2017-03-12 06:13 by ncoghlan, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 629 merged ncoghlan,2017-03-12 06:57
PR 633 merged ncoghlan,2017-03-12 09:39
PR 634 merged ncoghlan,2017-03-12 09:40
PR 635 merged ncoghlan,2017-03-12 09:42
PR 1057 merged ncoghlan,2017-04-09 08:43
PR 1060 merged ncoghlan,2017-04-09 08:44
PR 1059 merged ncoghlan,2017-04-09 08:44
PR 1058 merged ncoghlan,2017-04-09 08:44
Messages (12)
msg289481 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-03-12 06:13
While backporting issue 29656 to get "make patchcheck" to play nice with git PR branches, I discovered an incompatibility between the way "git worktree" works and the assumptions in "patchcheck.py". Specifically, in a worktree, ".git" is a file, rather than a directory: $ cat .git gitdir: /home/ncoghlan/devel/cpython/.git/worktrees/py27 So the current isdir() check should be relaxed to just an exists() check.
msg289529 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-03-13 03:54
Turns out I missed another isdir() check in get_base_branch(), so this still isn't working properly in git worktree directories.
msg290209 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-03-24 22:24
New changeset 61a82a5fbf1a674b91764652ab70f5dbb9ba50f2 by Nick Coghlan in branch '3.6': bpo-29798: Handle git worktree in `make patchcheck` (#629) (#633) https://github.com/python/cpython/commit/61a82a5fbf1a674b91764652ab70f5dbb9ba50f2
msg290210 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-03-24 22:24
New changeset a6aac8c87036c3180916b893d66b1e257b5e2ec2 by Nick Coghlan in branch '3.5': bpo-29798: Handle git worktree in `make patchcheck` (#629) (#634) https://github.com/python/cpython/commit/a6aac8c87036c3180916b893d66b1e257b5e2ec2
msg290211 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-03-24 22:24
New changeset ee10fb9c5b0ae8706bcf7ab70d8d65604f2517a7 by Nick Coghlan in branch '2.7': bpo-29798: Handle git worktree in `make patchcheck` (#629) (#635) https://github.com/python/cpython/commit/ee10fb9c5b0ae8706bcf7ab70d8d65604f2517a7
msg290214 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-03-24 22:24
New changeset 6a6d090612dd7deaac2bc0399fad743e5e2db606 by Nick Coghlan in branch 'master': bpo-29798: Handle git worktree in `make patchcheck` (#629) https://github.com/python/cpython/commit/6a6d090612dd7deaac2bc0399fad743e5e2db606
msg290604 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-27 12:59
Tools/scripts/patchcheck.py still checks isdir() in get_base_branch(): @status("Getting base branch for PR", info=lambda x: x if x is not None else "not a PR branch") def get_base_branch(): if not os.path.isdir(os.path.join(SRCDIR, '.git')): # Not a git checkout, so there's no base branch return None ... Was it deliberate to not change this line?
msg290697 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-03-28 11:00
No, that's the bug that prompted me to reopen the issue. I just got distracted and never submitted the follow-up PR :(
msg291358 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-04-09 08:43
Oops, the new PRs and merges haven't shown up automatically because I didn't fix the spelling of the issue number. 3.7 (master): https://github.com/python/cpython/pull/1058 3.6: https://github.com/python/cpython/pull/1060 3.5: https://github.com/python/cpython/pull/1059 2.7: https://github.com/python/cpython/pull/1057 I'll see what happens if I edit the PR titles after the fact.
msg291362 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-04-09 09:22
New changeset 4c116cb3b3ee38cae229f7e0df0cd2045fe73c27 by Nick Coghlan in branch '3.6': bpo-29798: Handle git worktree in patchcheck (#1058) (#1060) https://github.com/python/cpython/commit/4c116cb3b3ee38cae229f7e0df0cd2045fe73c27
msg291363 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-04-09 09:22
New changeset c82d39479a88154bd72a3a304be5f473c118da95 by Nick Coghlan in branch '3.5': bpo-29798: Handle git worktree in patchcheck https://github.com/python/cpython/commit/c82d39479a88154bd72a3a304be5f473c118da95
msg291364 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2017-04-09 09:24
OK, this should really be working now (and I checked it on my 2.7 checkout before submitting that PR). Any further problems found should go in a new issue.
History
Date User Action Args
2022-04-11 14:58:44 admin set github: 73984
2017-04-09 09:24:05 ncoghlan set status: open -> closedresolution: fixedmessages: + stage: needs patch -> resolved
2017-04-09 09:22:52 ncoghlan set messages: +
2017-04-09 09:22:38 ncoghlan set messages: +
2017-04-09 08:44:40 ncoghlan set pull_requests: + <pull%5Frequest1207>
2017-04-09 08:44:21 ncoghlan set pull_requests: + <pull%5Frequest1206>
2017-04-09 08:44:09 ncoghlan set pull_requests: + <pull%5Frequest1205>
2017-04-09 08:43:59 ncoghlan set pull_requests: + <pull%5Frequest1204>
2017-04-09 08:43:42 ncoghlan set messages: +
2017-03-28 11:00:44 ncoghlan set messages: +
2017-03-27 12:59:28 vstinner set nosy: + vstinnermessages: +
2017-03-24 22:24:55 ncoghlan set messages: +
2017-03-24 22:24:29 ncoghlan set messages: +
2017-03-24 22:24:22 ncoghlan set messages: +
2017-03-24 22:24:16 ncoghlan set messages: +
2017-03-13 03:54:34 ncoghlan set status: closed -> openresolution: fixed -> (no value)messages: + stage: resolved -> needs patch
2017-03-12 10:04:15 ncoghlan set status: open -> closedresolution: fixedstage: resolved
2017-03-12 09:42:46 ncoghlan set pull_requests: + <pull%5Frequest523>
2017-03-12 09:40:03 ncoghlan set pull_requests: + <pull%5Frequest522>
2017-03-12 09:39:44 ncoghlan set pull_requests: + <pull%5Frequest521>
2017-03-12 06:57:14 ncoghlan set pull_requests: + <pull%5Frequest517>
2017-03-12 06:13:31 ncoghlan create