What is the purpose of `rmbranch` command?

Alexander Belchenko bialix at ukr.net
Wed May 16 13:16:44 UTC 2012


John Arbash Meinel пишет:
> ....
> 
>>> I don't think Alexander asked for a separate command. Instead,
>>> AIUI, his point is that it makes little sense to remove the
>>> branch and leave an otherwise *empty* control directory (not to
>>> mention other possible bugs when trying to interact with this
>>> empty directory).
>> This isn't always the case though - there can be other colocated 
>> branches, a repository or a working tree. We have no way to remove
>> a repository for example.
>>
>> As far as I understand this would unversion the current directory,
>> which would seem a bit odd. Am I misunderstanding something?
>>
>> Cheers,
>>
>> Jelmer
>>
> 
> bzr branch --no-tree lp:bzr target
> bzr rmbranch target
> 
> Arguably, there should be no 'target/' directory left. Certainly that
> is what people expect.

Yes, that was my intuitive expectation.

I'm OK with any behavior and don't claim current behavior as bug, but 
I'd like to understand the intent of `rmbranch` command.

I see why Jelmer said that it was only useful for colocated branches.

My question arose because I tried to remove branch from bzr server 
(bzr:// protocol + Trac) with that command, and I found that `rmbranch` 
left almost everything on the server. That was confusing. (of course I 
was able to inspect what's left on disk to understood what'd happened).

Now I better understand why other people confused, see
http://stackoverflow.com/questions/10474291/remove-a-parent-branch-in-bazaar/

I can only imagine a simple way to improve the current status-quo:
print something to the user when `bzr rmbranch URL:/to/branch` command 
finishes, something about

`URL:/to/branch` is no more valid bzr branch, but still present on the disk.

In general, beyond colocated usage, this command is almost useless.

And I should note that for bzr-colo users it's useless at all, and 
better to use special colo-prune (colo-delete) or qprune (qdelete) GUI 
in all cases.

Thanks.



More information about the bazaar mailing list