tags vs branches in a repo
zindar at gmail.com
Thu May 11 21:59:55 BST 2006
On 5/11/06, John A Meinel <john at arbash-meinel.com> 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
If we go in a way that tags and named revisions, that means that they
are not global for a repository. Using branches as tags has the
advantage that they are repository wide.
For example, tag "release1" might not exist in a branch, because it
was created before that tag was set, but is tags are branches, you
know that you can always find it in "tags/release1" for example.
I'd like to be able to do both, I see real use for "named
revisions"-tags as well as "tags as branches"..
More information about the bazaar