سؤال

At least by default, and committed version number is a single number with 1 increment. Can I specify the version number as major.minor when committing? Or there is another mechanism I overlooked?

هل كانت مفيدة؟

المحلول

Revision numbers are automatically incremented by every commit in the branch, and thus they are integer numbers.

When you merge another branch into the current branch, the revisions of that branch will be renamed using a dotted notation, in the format BASE.BRANCH.REV, as you can observe for example in the Bazaar project itself:

bzr log --line -n0 -r6572..6573 lp:bzr

This dotted notation has nothing to with major-minor version numbers. You can read more about this in the documentation: http://doc.bazaar.canonical.com/beta/en/user-guide/zen.html

On the other hand, you can assign tags to revision numbers, and these are designed exactly for this kind of purpose, to mark release numbers. For example in one of my projects I have the following tags:

$ bzr tags
1.1              159
1.3              188

This means that I assigned (in the past) the tag "1.1" to revision 159 and "1.3" to revision 188. The "1.1" and "1.3" are indeed intended as major-minor release numbers.

Tags work like aliases to revisions. These commands are equivalent:

bzr log -r revno:159
bzr log -r tag:1.1

(As a matter of fact Bazaar is smart enough to figure out the right even if I drop the revno: and tag: prefixes)

You can create tags using bzr tag, you can assign tags to the latest revision or any past revision. See bzr tag --help for details.

نصائح أخرى

It's not a version number, not in the sense of a product's version number. It's a revision number -- you can consider it the number of changes made to your project.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top