Comment 2 for bug 403203

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 403203] Re: Add a "close branch" command with optional message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> I agree that would be useful. One approach would be to write something
> into the branch config, which should be raised as an exception when
> trying to open it for writing - there would need however to be some way
> to get around it again, though perhaps just editing the file would be
> enough.
>
> Launchpad might like to read that field and mark the branch closed.
>
> ** Changed in: bzr
> Status: New => Confirmed
>
> ** Changed in: bzr
> Importance: Undecided => Medium
>

I sort of disagree that you should "disable pulling from the branch". If
you are going to do that, then just:

mv .bzr/branch-format .bzr/branch-format-old
echo "this branch is disabled, go somewhere else" > .bzr/branch-format

And boom, there you go. The branch will not be accessible anymore, and
all bzr clients will tell you about it.

bzr: ERROR: Unknown bzrdir format: 'This is a disabled branch, it used
to be\nBazaar-NG meta directory, format 1\n'

Perhaps not formatted as prettily as you might like, but it does work
with 100% of bzr clients.

Now, if you wanted to set a branch to be read-only... why not just set
it as such. I suppose you don't get a warning that you really should be
looking over at this other location.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkpoA8cACgkQJdeBCYSNAANvWQCgm3YCPBgXSZu3CbGHmvOh9X0T
AxsAnAyzYLPWN2n0qKjDBfD+Zmb7t8gT
=S1HH
-----END PGP SIGNATURE-----