Someone committed all binaries to our bazaar trunk, and i want to get rid of it. `bzr del file' only deletes the file from the current revision, but not the history of the file. is there a way we can remove the file history so we don't all have to download hundreds of MBs of sh*t?
There is 2 ways. But you need to be ready that you will re-create the part (or even full) of your branch history, so your current (local) branches will become incompatible with new branch after deleting the file.
1) Manual way. You can create a copy of your branch to revision just before big files have added. Then you need semi-manually re-commit your further revisions and exclude big files. Use replay
command from bzr-rewrite plugin (former bzr-rebase) to replay those revisions where no changes to big files present. And use merge -cN
for revisions where changes to big files are present, manually delete these files and commit. Thus you will keep most of your history intact and will keep unique file ids for other files of your branch.
2) Use bzr-fastimport
plugin to export your history as fast-import stream with bzr fast-export
command. Then filter out big files with bzr fast-import-filter -x FILE
command. And in the end re-create new branch without big files with bzr fast-import
command. This method w3ill destroy all your history and all your files will get new file ids, so your new branch will be totally incompatible with old branch.
In any case, if you have shared repository with big files history inside you need to create new empty shared repository and put your new filtered branch there.