bzr pack leaves files in obsolete_packs, therefore doubles repository size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I was more than a little surprised when my repository was 27Mb. A single working tree costs about 7megs. There was a single branch in the repo. Granted, I had had many branches, but all of them had been removed, so I thought it was time to do a 'bzr pack' on the shared repo. Boy was I wrong?
sehe@intrepid:
current
sehe@intrepid:
total 8.0K
drwxr-xr-x 4 sehe sehe 74 2008-04-24 00:56 .bzr
drwxr-xr-x 4 sehe sehe 31 2009-01-22 08:51 .
drwxr-xr-x 13 sehe sehe 4.0K 2009-01-22 22:31 ..
drwxr-xr-x 13 sehe sehe 4.0K 2009-02-06 22:59 current
sehe@intrepid:
27M .bzr
27M total
sehe@intrepid:
sehe@intrepid:
sehe@intrepid:
52M .bzr
52M total
sehe@intrepid:
sehe@intrepid:
52M .bzr
52M total
You see, my repository was doubled in size. This is not the documented goal of pack, to put it mildly.
Additional info:
sehe@intrepid:
Bazaar (bzr) 1.10
Python interpreter: /usr/bin/python 2.5.2
Python standard library: /usr/lib/python2.5
bzrlib: /usr/lib/
Bazaar configuration: /home/sehe/.bazaar
Bazaar log file: /home/sehe/.bzr.log
Copyright 2005, 2006, 2007, 2008 Canonical Ltd.
http://
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
sehe@intrepid:
bzrtools 1.10
Various useful commands for working with bzr.
email
Allow sending an email after a new commit.
gtk 0.95.0.final.1
Graphical support for Bazaar using GTK.
launchpad
Launchpad.net integration plugin for Bazaar.
pqm 1.0dev
Functionality for controlling a Patch Queue Manager (pqm).
qbzr 0.9.2
QBzr - Qt-based front end for Bazaar
rebase 0.3
Rebase support.
stats
A Simple bzr plugin to generate statistics about the history.
svn 0.4.16
Support for Subversion branches
vimdiff
vimdiff plugin for bzr
Changed in bzr: | |
importance: | Undecided → Medium |
summary: |
- bzr pack doubles repository size + bzr pack leaves files in obsolete_packs, therefore doubles repository + size |
tags: | added: packs |
tags: | added: check-for-breezy |
Inspired by similar topic in the bug tracker, I delved a bit deeper and found:
sehe@intrepid: ~/UWV/work$ du -shc .bzr/repository/* /format /indices /lock /no-working- trees /obsolete_ packs /pack-names /packs /shared- storage /upload
4.0K .bzr/repository
988K .bzr/repository
0 .bzr/repository
0 .bzr/repository
26M .bzr/repository
4.0K .bzr/repository
25M .bzr/repository
0 .bzr/repository
0 .bzr/repository
52M total
So it turns out, in fact, I was right: my repository was doubled. In fact, it seems like it has been a very fancy way to say
cp -a .bzr/repository /packs .bzr/repository /obsolete_ packs
Ok, perhaps (or not, because that info doesn't follow from these figures) at most 1Mb was shaved of the size of the packs subdir. But the benefit is more than thwarted by the fact that I'm now the proud owner of 26Mb in obsolete packs. I'm not sure why these are kept (perhaps a backup measure?) but I'm pretty sure there is no mention of it in the docs for the pack command, and it seems to grossly violate the principle of least surprise.
I'd guess I should run 'bzr pack' before rsync-ing my repository. It turns out, this is exactly what I shouldn't do, because it will (can?) double the volume of the transfer.
- is there any mention of this behaviour (+reason?) in the docs for 'bzr pack'
- is there a specific command to get rid of the bloat in obsolete-packs (clean-tree doesn't, and pack doesn't)
- shouldn't the user be warned that backups are taken and not going to be freed automatically?
Regards,
Seth