See PHI25. When a repository is removed with bin/remove destroy, we currently do not destroy the working copy. Two reasons are:
- This is super dangerous compared to other kinds of object destruction.
- We can't necessarily destroy all working copies in a cluster from whatever host is running bin/remove destroy.
A reasonable compromise on these issues is to emit a reminder message after destroying a repository, e.g.
Repository rXYZ was destroyed, but the working copy was left on disk at "/path/to/workingcopy". If you no longer want it, manually remove this directory.
The technical approach here is probably:
- Create a new interface like PhabricatorPolicyCodexInterface for PhabricatorDestructibleInterface.
- Have it provide a method that returns a new DestructibleCodex.
- Put getRemindersAboutAdditionalResources() on that object.
- Have DestrucitonEngine collect reminders as it destroys objects, then print them out at the end in bin/remove destroy.