Repository size . . . is this right
Matt Nordhoff
mnordhoff at mattnordhoff.com
Tue Dec 9 17:04:57 GMT 2008
Russel Winder wrote:
> On Tue, 2008-12-09 at 16:43 +0000, Matt Nordhoff wrote:
>> 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.)
>
> It would be good to know what constitutes a "repack" option that causes
> the deletion. No matter how many times I run bzr pack is steadfastly
> refuses to delete stuff.
If you run "bzr pack" twice without committing or pulling or adding new
revisions in any other way, it will exit without doing anything.
>> "bzr pack" should have a warning message: "If you're hoping to save disk
>> space, you will be sorely disappointed by this." :-P
>
> Quite :-)
>
>> So anyway, to get the true size of a repository, you should exclude
>> .bzr/repository/obsolete_packs.
>
> so that is 300MB (NB I was using the wrong scale in the original email
> those figures were KB). SO that is half the total which is consistent.
>
>> 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.
>
> 300MB compared to 130MB is a bit of a disappointment.
Right. I hope someone else will be able to help you with that.
>> 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.
>
> I think I'd prefer never to touch anything in .bzr!
Yeah, you don't have to. I was just saying that you could if you wanted to.
--
More information about the bazaar
mailing list