Details
Details
What's the best way to remove some commits from the server which have been pushed by error?
I can login to the server and issue hg strip in the repo folder but this leaves dangling objects in the DB;
I've found that the commands:
./bin/repository discover ./bin/repository refs ./bin/repository parents
are able to restore the diffusion view to a working state after the strip.
Is there any way to cleanup the database? Is this work flow discouraged or unsupported? Are there any alternatives?
Answers
Answers
I've had to do this once. A branch was merged which should not have been merged. The steps I took were:
- Stop all Phabricator services
- Strip the merge & branch
- hg strip -r [bad-merge-commit]
- hg strip -B [bookmarked-bad-branch]
- Start Phabricator services
- Repair the repository
- ./bin/repository update [repo]
- I may have also run reparse
- ./bin/repository reparse [repo]
New Answer
New Answer