- Mailing Lists
- Contributors
- pre-commit changes
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
XML errors when upgrading modules, because of fields in unrelated modules
Q: How to Configure GS1 barcodes on Odoo 14 community version
pre-commit changes
Hi,
quick question about pre-commit changes during migration.
I'm migrating a module from 14.0 to 16.0. I've noticed that the first pre-commit related commit ("[IMP]: pre-commit stuff") takes care only of part of the changes needed to make pre-commit happy (it is possible due to the --no-verify). The missing part can be significant.
The following commit ("[MIG]: $MODULE: Migration to 16.0") must include those changes too, plus anything migration related.
So I was wondering if that defeats the purpose of having pre-commit changes separated in their own commit. Right now, my approach is to create a second commit, named "[IMP]: more pre-commit stuff", just to make pre-commit happy, and then add another commit with the migration stuff.
Alternatives I've considered: ignoring the issue and include both migration and the rest of pre-commit changes in one commit ("[MIG]: $MODULE: Migration to 16.0"), or do as I do now but squash the two pre-commit related commits before merge (or equivalently, get rid of the --no-verify in the first place, and manually add all changes to the first commit).
Thoughts / suggestions?
The following commit ("[MIG]: $MODULE: Migration to 16.0") must include those changes too, plus anything migration related.
So I was wondering if that defeats the purpose of having pre-commit changes separated in their own commit. Right now, my approach is to create a second commit, named "[IMP]: more pre-commit stuff", just to make pre-commit happy, and then add another commit with the migration stuff.
Alternatives I've considered: ignoring the issue and include both migration and the rest of pre-commit changes in one commit ("[MIG]: $MODULE: Migration to 16.0"), or do as I do now but squash the two pre-commit related commits before merge (or equivalently, get rid of the --no-verify in the first place, and manually add all changes to the first commit).
Thoughts / suggestions?
by Marco Colombo - 01:46 - 2 Dec 2022
Follow-Ups
-
Re: pre-commit changes
The idea of the first pre-commit set is to store the automatic changes, so you don't have to review them extensively. The rest of the manual changes to make the linter happy must be on the migration commit, as a third extra commit doesn't make too much sense. You have to review these manual changes, and they can be even provoked by the new code you are introducing for the migration, so better to have all of them in the same migration commit.Regards.
by Pedro M. Baeza - 08:31 - 5 Dec 2022