Fwd: nuclear lauchcodes and nuclear waste
John Arbash Meinel
john at arbash-meinel.com
Tue Jan 10 13:32:48 GMT 2006
James Blackwell wrote:
> On Mon, Jan 09, 2006 at 03:32:45PM -0600, John Arbash Meinel wrote:
>
>>Jeff Hodges wrote:
>>
>>>I was wondering, besides editing files and deleting weaves, will there
>>>be (or perhaps is there) a way for bzr to remove files of "nuclear
>>>lauchcodes and nuclear waste" (as jblack aptly described them) from
>>>archives in the future?
>>>--
>>>Jeff
>>
>>I'm not sure exactly what bzr is going to have (forcing a revision to
>>become a ghost is a little bit tricky.)
>>
>>But I just posted a [PLUGIN] to the list (which didn't get any hits),
>>where I specifically implemented the ability to remove unused revisions
>>from the store.
>
>
> To be honest, I don't think that this sort of plugin would get much
> normal use. Its the sort of thing that a person usually doesn't want at
> all... until that particular moment that they want it a _lot_.
>
> Don't worry. Somewhere, sometime soon, there will be a Homer out there
> with glowy green stuff screaming "DoH!"
>
>
>>The plugin is here:
>>http://bzr.arbash-meinel.com/plugins/clean-weave/
>>
>>And the command is 'bzr clean-branch' optionally
>>'bzr clean-branch --all'
>
>
> Should it generally be considered safe or can it have intended, but not
> generally predictable, side effects?
'bzr clean-branch' will check what revisions you have in the
revision-store, and then go through all the weaves and clean out ones
that are not present. It does check the ancestry of every revision, so
it won't remove parents of revisions you are saving.
This is safe until we have a shared repository, (though if the
revision-store is also shared, then it would still be safe).
'bzr clean-branch --all', is a little more risky, since it grabs the
current revision, checks the ancestry of that revision, and removes
revisions from the revision store which are not in the ancestry. And
then it sanitizes the weaves. So if you merged from someone else, and
then decided you didn't want those revisions, you could clean them out.
In general, I think the code is safe. It pays attention to ancestry for
each weave, and it run 'Weave.check()' after sanitizing each weave,
before writing it back to disk. (If you run it, you will notice it says
'checking' much more than it says 'cleaning').
Honestly, I can see this being part of bzr core. I just knew it was
possible to write as a plugin, and that is where I prefer to do new work
if it is possible to do so.
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/20060110/5a7053bf/attachment.pgp
More information about the bazaar
mailing list