Add a "close branch" command with optional message

Bug #403203 reported by Jean-Francois Roy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Jelmer Vernooij

Bug Description

In order to facilitate migration to the 2a format, which will involving changing the development focus of series on Launchpad (and generally will involve changes to well-known branches), and for other purposes, Bazaar should have a formal mechanism (exposed by a new command) to close branches.

A closed branch will refuse any modification to its history, and the client should refuse to branch or pull from it as well.

When closing a branch, a message could be provided to state the reasons for closing the branch, or perhaps the new branch to use instead of the closed branch. Possibly, additional data could be stored by the close operation, such as a redirect URL.

Tags: ui
summary: - A a "close branch" command with optional message
+ A "close branch" command with optional message
summary: - A "close branch" command with optional message
+ Add a "close branch" command with optional message
Revision history for this message
Martin Pool (mbp) 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
importance: Undecided → Medium
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-----

Jelmer Vernooij (jelmer)
tags: added: ui
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Being able to set a message that is displayed to the user on pull seems useful.

tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.