I need to delete my “uploads” folder from the repository with all its history because it contains only junk testing data.
Please help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll want to use the convert extension that ships with mercurial. Since you want to scrub a directory from the history you’ll have to completely filter you’re existing repository, CONVERTing it into a new one.
Assume the following made up structure of your repo:
Create a simple text file with the following content
You can do more with this file but keep it simple to get to your goal. The path to be excluded is relative to the repository root
Now run mercurial convert
Change to the directory of the new repo. Notice that mercurial created a bare/null rev repo (no content but the .hg directory). Run the following to update to your latest changset. Notice the upload directory is gone!
WARNING: I do not know how this handles named branches or tags. You’re on your own. At least you’re not modifying the original repo. Make as many copies as you need to get it right.