venv-patcher reset
Revert all patches applied in the current environment.
venv-patcher reset [-p <package> ...]
What it does
For each package in the manifest:
End a
git amthat stopped half way, if there is one.git reset --hardto its initial commit.git clean -fd, to remove files that patches added.Empty its patch list in the manifest.
The package is then as it was installed.
Options
Option |
Meaning |
|---|---|
|
only reset this package. Give it more than once for more packages |
Examples
venv-patcher reset
venv-patcher reset -p requests
venv-patcher reset -p requests -p urllib3
reset idna to initial state (0918fb5d)
Notes
The git repository in the package folder stays. So does the initial commit in the manifest. The next
applyuses them again.A package with no initial commit yet is skipped. This happens when its first
applyfailed beforegit init.A package whose folder is gone gets a warning and is skipped.
A
-pname that is not in the manifest does nothing.With an empty manifest,
resetprintsNo patches to reset.
A package that changed
If the files differ from the last commit, someone else changed them, for
example pip during an upgrade. Then a hard reset would put back old files.
So reset keeps the installed files instead. It drops the git history and
the patch list:
warning: requests changed since venv-patcher patched it; kept the installed files
See also
apply --force: reset and apply in one step.