How to get rid of big binary files buried in my repository's history

Tim Molendijk tim at timmolendijk.nl
Tue Feb 24 23:11:22 CST 2009


Hello,

I've recently moved most of my projects into Mercurial and so far my
experience has mainly been a positive one. But now I'm dealing with this
annoying issue and I cannot get my head around possible solutions.

A couple of commits ago I introduced a big video file into the repository.
At first I didn't see the harm, until I pushed to my code host which took
quite a while (obviously). Then I needed to change the path of the file
within the repository and even though I used 'hg rename', upon pushing I
noticed the complete video file (which hadn't changed apart from its
location) was uploaded again. Then I cloned my repository from my code host
to my web server. This took forever, which made me realize that the video
file has been stored in 'history' (.hg) twice, and it is there to stay.

I very much don't like this situation, but how can I truly get rid of the
file? If I simply remove it, it remains part of a past changeset, so every
time I make a new clone of the repository it will need to be downloaded
again (twice in my case). If I update back to a revision before I added the
file I lose all my changes that followed, and I cannot see how I could merge
these changes back in without merging back in the video file as well.

Any help would be greatly appreciated!

Thanks,
Tim Molendijk

-- 
http://timmolendijk.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20090225/934cdc35/attachment.htm 


More information about the Mercurial mailing list