[RFC] BzrTagging updates

Martin Pool mbp at canonical.com
Thu Jun 22 10:37:43 BST 2006


On 20 Jun 2006, Jelmer Vernooij <jelmer at samba.org> wrote:
> Hi,
> 
> I'm looking at updating Gustavo's patch for tags to work with current
> Bazaar. I've made some updates to the BzrTagging
> (http://bazaar-vcs.org/BzrTagging) wiki page to contain the spec of what
> I'd like to implement. 

Thanks, that's good.
> The main two open questions are:
> 
>  * Should the tags control file be a branch or repository property ?

What I have in mind for that spec is that the tags are stored in a
VersionedFile (knit, whatever) in the repository.  The branch indicates
which version of that file should be consulted.

So one repository can encompass several unrelated projects which might
use the same tag names (e.g. if they call it 'release-1'), or it could
have several related branches which disagree about the placement of a
tag (e.g. if I move an existing tag but it hasn't propagated yet.)

The biggest question with this approach is how you find tags which, from
your working directory's point of view, don't exist yet.  In a typical
case, you have a bzr-0.8 bugfix branch, and want to diff it against the
bzr-0.9 tag.  The bzr-0.9 tag doesn't exist in the bzr-0.8 branch
because it wasn't there when the branch split from mainline.  

They may or may not be in the same repository; it shouldn't matter
because our model is that repositories are only about storage and are
not semantic.

I think that a simple way to handle it is to just require that you must
point to the branch containing the tag you care about; e.g. 

  bzr diff -r -1..tag:bzr-0.9 . ../bzr.dev

(-r syntax could be better but that's another thread.)

>  * How do we handle conflicts? 

(To recap) The basic idea is that tag definitions are edited through the
working tree object; and a conflict in them is also present in the tree
and resolved there.

To start with I would suggest we just simply write out a .bzrtags
in human-readable form containing herringbone conflict markers.

Although handling tag conflicts properly is important, they will
probably be relatively rare and so we shouldn't block on working out
exact how they'll work.  We have the option in future to e.g. always
prefer the local tag, or do some kind of smarter interactive resolution.

-- 
Martin




More information about the bazaar mailing list