Repository size . . . is this right

Matt Nordhoff mnordhoff at mattnordhoff.com
Tue Dec 9 16:43:36 GMT 2008


Russel Winder wrote:
> I have a Git repository of the Gradle project with two branches and it
> is 132932 MB.
> 
> I have a Bazaar shared repository of the Gradle project with 4 branches
> (each branch working tree is about 30MB) and it was 481640 MB.  I did a
> pack on the 4 branches in the shared repository and now the shared
> repository is 758860 MB.
> 
> This is not good.

When a repository is packed, the old pack files are backed up to
.bzr/repository/obsolete_packs instead of being deleted outright. When
it's an auto-pack, it's a negligible amount of data, but when you run
"bzr pack", it's a copy of the entire repository. (The old
obsolete_packs will be cleaned out next time the repo is packed.)

"bzr pack" should have a warning message: "If you're hoping to save disk
space, you will be sorely disappointed by this." :-P

So anyway, to get the true size of a repository, you should exclude
.bzr/repository/obsolete_packs.

That explains why disk usage grew after running "bzr pack", but I can't
explain why the repository was so much larger in the first place. Sorry.
Hopefully someone else can.

BTW, you can delete the contents of obsolete_packs if you want to, but
don't delete the directory itself; bzr won't like that. There's no real
reason to, though, unless you're really short on disk space, since it'll
be cleaned out eventually.
-- 



More information about the bazaar mailing list