why tag doesn't need commit ?

Aaron Bentley aaron.bentley at utoronto.ca
Thu Sep 20 17:07:58 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

William Dode wrote:
> I wonder why setting a tag doesn't need a 'commit' like others changes 
> in the branch ? It's not really a problem but i find it not very 
> consistent.

Tags are not versioned.  They are not part of revisions.  So they don't
have commit messages, and they can be changed after the fact.  In fact,
tags aren't stored in the repository, only in the branch.  The
fundamental reason why they don't need a commit is because they don't
affect the repository.

We did not want to force people to commit in order to tag an existing
revision, or prevent people from tagging existing revisions.  And we did
want it to be possible to move a tag from one revision to another.
These meant that tags could not be part of the revision they apply to.

> bzr tag mytag
> bzr ci -m 'set my tag'

We should probably add a --tag flag to commit, as we do with --fixes.  I
don't really understand the rest of your complaint.  Why is it a
disadvantage to *not* be forced to commit?

> Also, it's strange to don't see any comment when pushing
> bzr tag mytag
> bzr st
> => i was waiting for 'you add a tag'

Status shows you uncommitted changes, but tags don't need to be
committed.  "mytag" has already been completely applied to your branch,
so there are no changes to show.

> bzr push
> No new revisions to push. (should be no 's' isn't it ?)

No, either form is correct here.  "revisions" suggests that multiple
revisions could be pushed, while "revision" suggests that only one
revision would be pushed, even if there were multiple revisions
available to push.  So while both are correct, I prefer "revisions".

However, when using the number zero, the plural form is always used:
0 revisions pushed
1 revision pushed
2 revisions pushed

> => but yes something was pushed silently.

That should be fixed.

> I read the wiki page about the spec but could'nt find an answer, could 
> you explain me or point me to the discussion about this ?

http://article.gmane.org/gmane.comp.version-control.bazaar-ng.general/8540
http://article.gmane.org/gmane.comp.version-control.bazaar-ng.general/13658
http://article.gmane.org/gmane.comp.version-control.bazaar-ng.general/21387

And no doubt more.  It's been quite a contentious issue-- centralized
tags are well understood (and also don't require a commit, in most
systems), but extending tagging to decentralized systems is not an
obvious transformation.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8pre0F+nu1YWqI0RAmGTAJ99RG4ZG3W8WoWEEThKqA4roHv7ggCeKhoE
kP2HAAbxFXSmeC9sJcec5ws=
=20PQ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list