[Bug build/34393] [pre-commit] Add autoupdate script
"cvs-commit at gcc dot gnu.org via Gdb-prs" <[email protected]>
| Newsgroups | gmane.comp.gdb.bugs.discuss |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=34393 --- Comment #5 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom de Vries <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=55eed3660724f6927d5202b29316df1b483b3af5 commit 55eed3660724f6927d5202b29316df1b483b3af5 Author: Tom de Vries <[email protected]> Date: Thu Aug 27 11:19:51 2026 +0200 [pre-commit] Don't allow pre-release revisions Pre-commit has a convenient autoupdate command. The default behavior is: update to the latest tagged version. For most tools this is fine, and not too frequent. Isort however also tags pre-releases, so that has resulted in more frequent updates: ... $ git log .pre-commit-config.yaml | grep "Bump isort" [pre-commit] Bump isort to 9.0.0b1 [pre-commit] Bump isort to 9.0.0a3 [pre-commit] Bump isort to 9.0.0a2 [pre-commit] Bump isort to 8.0.1 [pre-commit] Bump isort to 8.0.0 ... Add a script gdb/contrib/pre-commit.py that for --config-check checks the revision numbers of all repos, and errors out when finding something like 9.0.0b1: ... $ ./gdb/contrib/pre-commit.py --config-check Revision 9.0.0b1 for repo https://github.com/pycqa/isort not allowed. ... Add a corresponding pre-commit check, and revert isort back to the last stable release: 8.0.1, to make the check pass. Consequently, pre-commit autoupdate now breaks the pre-commit check: ... $ pre-commit autoupdate [https://github.com/psf/black-pre-commit-mirror] already up to date! [https://github.com/pycqa/flake8] already up to date! [https://github.com/pycqa/isort] updating 8.0.1 -> 9.0.0b2 [https://github.com/codespell-project/codespell] already up to date! [https://github.com/nmoroze/tclint] already up to date! [https://github.com/adrienverge/yamllint.git] already up to date! $ ./gdb/contrib/pre-commit.py --config-check Revision 9.0.0b2 for repo https://github.com/pycqa/isort not allowed. ... so add gdb/contrib/pre-commit.py --autoupdate that can be used instead: ... $ ./gdb/contrib/pre-commit.py --autoupdate [https://github.com/psf/black-pre-commit-mirror] already up to date! [https://github.com/pycqa/flake8] already up to date! [https://github.com/pycqa/isort] updating 8.0.1 -> 9.0.0b2 Revision 9.0.0b2 for repo https://github.com/pycqa/isort not allowed. [https://github.com/codespell-project/codespell] already up to date! [https://github.com/nmoroze/tclint] already up to date! [https://github.com/adrienverge/yamllint.git] already up to date! ... The script could be extended to check that frozen revs stay frozen, but that's currently not needed. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34393 -- You are receiving this mail because: You are on the CC list for the bug.