[ANN][RFC] plugin package: ezbzr

John A Meinel john at arbash-meinel.com
Mon Feb 6 13:50:32 GMT 2006


Erik Bågfors wrote:
>> If space is an issue, there are things you can do. (I mirror pretty much
>> all branches I come across, which is about 1-2GB right now). I wrote a
>> script which goes through and finds weave files with matching md5 sums,
>> and then hardlinks them. It saves me about 1/2 GB on my bzr mirrors.
>> Which is not trivial. I can post it if people are interested.
>> It is relatively safe, since bzr atomically replaces weaves if they are
>> modified.
> 
> 
> John, Can you give me that script please.
> 
> Thanks
> Erik
> 

The attached script traverses the directories, looking for .weave files
whose md5 sums match. It builds up a big map, and then goes back and
replaces them with a hardlink. (It checks again to make sure that the
weave hasn't changed before it replaces them).

It doesn't attempt to merge two weaves together, or tell that one weave
is only a superset of the other, so it could be hardlinked. So you don't
get as much saving as you could, but on my trees there are a lot of
weaves which aren't modified often. And I have a lot of branches of bzr
on my machine. (Mirroring other people in case I want their patches).

John
=:->

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: hardlink_bzr_weaves.py
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060206/88bf7eb2/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060206/88bf7eb2/attachment.pgp 


More information about the bazaar mailing list