As far as I can tell, there is no way to invoke the revert() or apply() methods in a "test" mode that would check to see if the patch can be applied successfully without actually modifying the target file. As it happens, I have an application for this. Obviously, I can do this externally by copying the target file in advance and reverting it after the patch is (or isn't) applied, but it would be convenient to have this built in.
If you think this would be useful but don't have the time or interest to work on it, I'd be happy to attempt it, as it looks to be trivial to implement.
As far as I can tell, there is no way to invoke the revert() or apply() methods in a "test" mode that would check to see if the patch can be applied successfully without actually modifying the target file. As it happens, I have an application for this. Obviously, I can do this externally by copying the target file in advance and reverting it after the patch is (or isn't) applied, but it would be convenient to have this built in.
If you think this would be useful but don't have the time or interest to work on it, I'd be happy to attempt it, as it looks to be trivial to implement.