Added RevisionPurger.py, a tool to be used as a change-commit trigger that will remove files from the Perforce librarian.
It is similar in use like the +S type, but handles branches gracefully.
The trigger takes the changelist as an argument , scans through the changelist and finds files that are eligible for delete:
- Must have a predecessor revision
- Must be of the right type, that is binary full or compressed file
- Must have no lazy copies, unless every lazy copy has a successor
- Must not be a lazy copy itself, but will follow lazy copies to the parent and apply above algorithm on that revision
If all conditions are met, the depot file is removed from the archive, replaced with an empty file and the digest for verify is adjusted.