[PLUGIN] clean-branch and clean-weave
John Arbash Meinel
john at arbash-meinel.com
Mon Jan 9 00:04:55 GMT 2006
We discussed this in the past, but it turns out that it isn't that
difficult to clean up a weave file. You can do it just by walking the
weave, you don't have to extract any texts.
So I wrote a plugin, complete with quite a few tests, since this is the
type of thing which can break your repository.
Available from here:
http://bzr.arbash-meinel.com/plugins/clean-weave/
It provides 2 new commands, 'bzr clean-weave' to clean a single weave
file, and 'bzr clean-branch' which cleans the entire local repository.
clean-branch supports --dry-run, which lets you see what it thinks it
needs to remove before doing so.
Cleaning is actually a fairly fast process, but I run Weave.check()
afterwards, which is pretty expensive.
Anyway, it does provide a way to remove nuclear launch codes, as long as
they were committed on a private branch.
In my testing, bzr.dev has about 403 texts which are not referenced
anywhere. Probably mostly from aborted commits (or reverted merges).
There is also one revision:
mbp at sourcefrog.net-20051017093921-813c73465cb0de3a
Whose commit message is 'foo'.
So I'm pretty sure it was a test commit.
There might be more in bzr.dev proper. This is just from the last time I
did a rsync pull. (In general I do an http pull, which won't grab
unreferenced revisions).
Comments welcome. I don't know if we want to bring something like this
into the core. But we might.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060108/ea646921/attachment.pgp
More information about the bazaar
mailing list