option to protect a branch against commits/changes

Bug #82233 reported by Martin Pool
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned
Breezy
Triaged
Wishlist
Unassigned

Bug Description

When a release branch's release is made, it would be nice to have an option which says "I think this branch is finished, don't allow more commits or changes". This should disable modification of the history either through new commits or push/pull. It should be possible to turn the option off or to override it for a particular operation.

Perhaps something like 'bzr set branch protected'.

This is a bit like the --fix option in Arch and Baz. The arch feature modified the user-visible revision ids and could only be fired once per branch. I don't think either of those are necessary.

Revision history for this message
Martin Pool (mbp) wrote :

See also bug 73752, which asks for a similar option to prevent switches only.

Revision history for this message
Dan Watkins (oddbloke) wrote :

Could this be done with a pre-commit hook that stats a given file and just cancels the commit if it exists?

Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

Well, we have a switch to prevent changing the mainline (something like append_only=True).

I would probably go for a simple config item. I believe you could do it in a plugin, especially now that we have a hook for whenever the revision_id of a branch changes. (Unless that cannot prevent the change, and only reports that it *does* change.) We also have a push and pull hook that could probably handle some of it (you also need a commit hook, etc)

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: next-format
removed: check-for-breezy
tags: removed: next-format
Changed in brz:
status: New → Triaged
importance: Undecided → Wishlist
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.