Simple Patch Workflow?

Asked by Glen Mailer

I've got a slightly unusual (I think) workflow for applying small patches to a code tree:

I've got a local copy of the central trunk branch.
In order to fix a bug I make some changes to trunk.
This fix cant actually go live yet, so I need to save it somewhere.
I have a demo branch which is basically trunk + stuff that isn't live yet.
I want to apply the fix to the demo branch, then once confirmed apply it to trunk.

Obviously the best way to deal with this problem is simply a feature branch - but I don't really want to create a whole branch for a small single-commit change. Another downside to this would be the nested merge revision is a bit untidy in this case.

The other option is using "bzr shelve" to save the changes, and then "bzr unshelve --keep; bzr merge --uncommitted" to move them about, but this means I have keep to commit the changeset separately in each branch.

The reason I can't just merge from the demo branch to the trunk, is that I won't necessarily be taking all the fixes currently on the main demo.

I think what I'm looking for is some sort of lightweight mini-branch for single-commit patch storage of generally orthogonal patches. Or am I overcomplicating this?

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Martin Pool (mbp) said :
#1

Hi Glen,

From what you said, I think you should actually use feature branches
for each change. Even if most of them only ever have one commit, if
they can be deployed separately it may be worth keeping a history of
them, and the possibility to make more than one change if some bugs
turn out to need more than one change.

To make it easier to test them, you might want to use a single working
tree for your demo site and switch it among multiple branches using
the bzr-colo plugin, or just plain switch.

hth
--
Martin

Can you help with this problem?

Provide an answer of your own, or ask Glen Mailer for more information if necessary.

To post a message you must log in.