Update Perforce to use the new Patcher API.

Review Request #14237 — Created Nov. 8, 2024 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

Perforce's patching support is limited, using the patch command line
tool with a bit of special handling for added and deleted files (which
has been busted for a long time).

The problems we had were that a capability-checking method for empty
files had been renamed at one point, and the regexes weren't broad
enough to handle anything but depot paths starting with //depot.

We now use the new Patcher API, implementing just the part that handles
added/deleted files, fixing them in the process.

Unit tests pass.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Update Perforce to use the new Patcher API.
Perforce's patching support is limited, using the `patch` command line tool with a bit of special handling for added and deleted files (which has been busted for a long time). The problems we had were that a capability-checking method for empty files had been renamed at one point, and the regexes weren't broad enough to handle anything but depot paths starting with `//depot`. We now use the new Patcher API, implementing just the part that handles added/deleted files, fixing them in the process.
746047e8ae169ceb31405ca31b6a3d9dc5af7231 Christian Hammond
rbtools/clients/perforce.py
rbtools/clients/tests/test_p4.py
Loading...