Changeset identity

Scott Scriven bzr at toykeeper.net
Wed Jul 30 09:58:04 BST 2008


* Russel Winder <russel.winder at concertant.com> wrote:
> Context:  I have a development mainline branch and a 
> maintenance branch ...
>
> Is push an acceptable technique here or is merge and commit 
> mandated?

Given that you're dealing with trunk and a maintenance branch, 
they are diverged by definition.  So, pull/push won't work.

It sounds like you want to cherry-pick bug fixes between 
permanently diverged branches.  This usually works fine.

> 1.  Git (and Mercurial?) label a changeset and that label can 
> be used to refer to the changeset.  Bazaar appears not to have 
> this, a changeset can only be referred to by a revision number 
> relative to a branch.

Do you mean tags?  You can add any tags you like to revisions.  
Look at "bzr help tag" or add tags via a GUI (bzr vis).

> 2.  When I tried using revision numbers to do a merge -r XXX 
> appeared to imply a range of changesets and not a particular 
> changeset.  I ended up having to say -r(XXX-1)..XXX to get the 
> single changeset.

The "-c" option is probably what you want.
"bzr merge -c 1234 ../other-branch"

> > Bazaar doesn't have changesets.  It has revisions.
>
> I guess part of my goal here is to pin down the semantics of 
> certain labels ...  Differences in nomenclature ...

For most purposes, changesets and revisions are interchangeable.  
That is, one can be computed from the other.  But the 
implementation makes certain operations easier or harder.

Think of revisions as a series of snapshots, where you can 
compute a changeset by comparing two snapshots.

The main exception here is darcs, which is based on what it calls 
the "theory of patches".  The details are long and strange, but 
it achieves some interesting and unique features by tracking 
patches (and their dependencies) instead of revisions.  It's very 
good at cherry-picking changes between diverged branches.


-- Scott



More information about the bazaar mailing list