tags vs branches in a repo
Jan Hudec
bulb at ucw.cz
Thu May 11 20:15:14 BST 2006
On Thu, May 11, 2006 at 10:48:40 -0700, John A Meinel wrote:
> Martin Pool wrote:
> > Please poke this straw man:
> >
> > We now have repositories which can contain branches; branches are just
> > directories containing a small number of control files. It's cheap and
> > (at least relatively) fast to pull or merge between two branches in a
> > repository. You can, with a plugin, list all the branches.
> >
> > There are proposals for tags but they are either a bit limited
> > (unversioned tags) or have not quite the right semantics (tags created
> > by new versions) or introduce substantially more complexity (meta-branch
> > revisions).
> >
> > How about instead doing something similar to arch and svn by just making
> > a practice of using branches within a repository as tags. To create or
> > update a tag you can pull, pull --overwrite, or merge onto it[*]. This
> > makes tags versioned, but without introducing a new time dimension. And
> > we don't have to do a new feature, we can just improve the one we
> > already have.
> >
> > [*] (Which suggests we should have a merge --overwrite too, which overwrites
> > the tree with the merge source.)
> >
> > I can think of some drawbacks, which I'll send in a separate post; I'll
> > just float this for now.
> >
>
> One of the major problems with svn tags is that they really are
> branches. So you can accidentally commit into your 'tag' branch.
>
> Also, I don't think it versions tags all that well. You can version them
> in the sense that Arch was able to version them. (tagname revno=1 is tag
> version a, revno=2 is b, etc).
>
> However, the general usage would certainly be different.
>
> And I think Michael has a good point about getting "bzr diff -rtag:foo"
> to work properly.
>
> So I think it is doable, but I think a versioned tags file is much more
> elegant.
Well, it's actually already done. And with the diff, it already works as well
-- bzr diff -rbranch:/path/to/tag/foo -- which is exactly how subversion does
it, so we are no worse than subversion.
That being said, I think that versioned tags file is indeed much better. For
several reasons:
- Every copy of the repository has it, so looking up the tag is fast.
- You don't have to do separate push when you create them offline.
- You can keep track of whether, when and why it has moved.
- It's common to have thousands of tags in a large project, which would be
pain in the arse with directories.
--
Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060511/c5f1a1ff/attachment.pgp
More information about the bazaar
mailing list