@@ -118,6 +118,30 @@ Vendoring is automated via the `vendoring <https://pypi.org/project/vendoring/>`
118
118
``pip/_vendor/vendor.txt `` and the different patches in
119
119
``tools/vendoring/patches ``.
120
120
Launch it via ``vendoring sync . -v `` (requires ``vendoring>=0.2.2 ``).
121
+ Tool configuration is done via ``pyproject.toml ``.
122
+
123
+
124
+ Managing Local Patches
125
+ ======================
126
+
127
+ The ``vendoring `` tool automatically applies our local patches, but updating,
128
+ the patches sometimes no longer apply cleanly. In that case, the update will
129
+ fail. To resolve this, take the following steps:
130
+
131
+ 1. Revert any incomplete changes in the revendoring branch, to ensure you have
132
+ a clean starting point.
133
+ 2. Run the revendoring of the library with a problem again: ``nox -s vendoring
134
+ -- --upgrade <library_name> ``.
135
+ 3. This will fail again, but you will have the original source in your working
136
+ directory. Review the existing patch against the source, and modify the patch
137
+ to reflect the new version of the source. If you ``git add `` the changes the
138
+ vendoring made, you can modify the source to reflect the patch file and then
139
+ generate a new patch with ``git diff ``.
140
+ 4. Now, revert everything *except * the patch file changes. Leave the modified
141
+ patch file unstaged but saved in the working tree.
142
+ 5. Re-run the vendoring. This time, it should pick up the changed patch file
143
+ and apply it cleanly. The patch file changes will be committed along with the
144
+ revendoring, so the new commit should be ready to test and publish as a PR.
121
145
122
146
123
147
Debundling
0 commit comments