[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bazaar workflow for GRUB
From: |
Colin Watson |
Subject: |
Re: Bazaar workflow for GRUB |
Date: |
Mon, 18 Jan 2010 18:15:37 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Mon, Jan 18, 2010 at 09:49:15AM -0800, Colin D Bennett wrote:
> Do you want to mention how GRUB committers should merge features to the
> official trunk branch? I think the appropriate process, assuming
> (1) either a merge directive or a feature branch provides the change
> the we want to merge, and (2) we already have a local mirror branch of
> GRUB's trunk branch:
>
> # 1. Update local trunk mirror.
> cd trunk
> bzr pull
>
> # 2. Merge the feature branch or merge directive.
> bzr merge URL_OF_BRANCH
> # (Or bzr merge /path/to/merge_directive.patch)
> # If there are conflicts reported, fix them and use “bzr resolve” to
> # mark them as resolved.
> [ make grub ... and test it ]
>
> # 3. Commit the change locally.
> bzr commit
>
> # 4. Push to the upstream trunk.
> bzr push :parent
> # (The :parent argument can be omitted after the first time you do
> # this, since Bazaar will remember the given location from that
> # point on as the “push location” for the local branch.)
> # Note that in the unlikely event that someone happened to commit to
> # upstream trunk in the meantime since you did “bzr pull”, Bazaar
> # will tell you that the branches have diverged. You should try
> # again, doing “bzr pull --overwrite” and go back to step 2.
I recommend using a checkout for trunk, because that way bzr takes out a
write lock on the branch when you start committing and doesn't release
it until it's finished; it also warns you immediately if you're out of
date rather than making you commit and try to push before you find out.
This is a much more robust workflow for shared branches in my
experience.
The workflow for a trunk checkout, based on what you have above, is
simply:
# 1. Update local trunk checkout.
cd trunk
bzr update
# 2. Merge the feature branch or merge directive.
bzr merge URL_OF_BRANCH
# (Or bzr merge /path/to/merge_directive.patch)
# If there are conflicts reported, fix them and use “bzr resolve” to
# mark them as resolved.
[ make grub ... and test it ]
# 3. Commit the change.
bzr commit
# If someone happened to commit to upstream trunk since you did “bzr
# update”, Bazaar will tell you that you need to update again.
--
Colin Watson address@hidden