python-patch
python-patch copied to clipboard
PatchSet apply will not restore directory in case of failure
PatchSet.apply needs a context manager to restore the prevdir cwd in case of exception. As it is now, the path remains the new root, which may be puzzling.