How do you track versions in Bugzilla? - versioning

We are in the process of migrating our bug tracking to Bugzilla from a really old version of track and I am running out of Advil.
We have a legacy application that has been around for a long time. Mix in the fact that our versioning management has been through a few iterations it generated a lot of different versions in the wild. To make matters worse, because of contractual limitations it is not always possible to upgrade the clients to the latest and greatest, so we must branch, fix, test and release, on the version they currently have, yielding yet another version number.
The end result is that the version combo box is ludicrously long. Lastly, for various reasons, we want to track three different version information :
the version in which the bug was found (version), the version in which we plan to fix (milestone) the bug and the version in which it has ultimately been fixed (open to suggestions). here is my problem in fact... this can actually be multiple numbers where we did a retroactive fix for some of these customers (this happens VERY often).
This is where I need your collective wisdom :
How do you keep track of these versions (found, planned and multiple fixed) in Bugzilla?
What are the best practices around linking versions and bug tracking ?
Answers
It seems that cloning the bug for each version is a good way to track, thus the target version is always tracked in the milestone as well as the fixed version, and the buggy version is always the native version.
Also to have each clone block the original bug make it a good way to trace the history back to the original submission.
Although I have accepted the answer I still welcome your input.

Often, if we need to fix something in multiple released versions (generally branches in the source code repository), the bug will be cloned for each branch so that all the commits and release status can be tracked separately. I think the only time we don't do this is when the change is not directly related to the codebase itself and cannot be fixed simply by updating our libraries.
As for version tracking in general, this has struck me as a reasonable way to do things, given that we generally only need to support 2-3 major versions (plus the trunk) at any time. If you have multiple disjoint versions that need supporting, e.g. customer-specific deployments, then things are going to be harder to track. (Arguably this is going to cause headaches in general and it would be better to unify things to a more central version theme).

I use Bugzilla to keep track not only of bugs, but also of new features, enhancements, and vague ideas. For each planned and released version, I have a Tracking Bug (something that I saw on the original Mozilla bugzilla, and found to be useful).
So if you have a bug report, you enter the bug with the version number that it was reported. Create additional bugs (one for each version you plan to fix it in) which all depend on (block) the original bug and block the version-specific Tracking Bugs.
If all bugs blocking the original bug are closed/verified (whatever your QA implements), you can also close the original bug.

I was looking for a similar feature in TFS, and while doing some investigation, I found that there is an enhancement request to manage "sightings" in Bugzilla:
"Bug 55970 - (bz-branch) Bugzilla needs to deal better with branches (implement sightings)":
https://bugzilla.mozilla.org/show_bug.cgi?id=55970
There is also a proposed design:
https://bug55970.bugzilla.mozilla.org/attachment.cgi?id=546912
For information, we are going to implement something similar in TFS 2010, with a "Bug Parent" or "Bug Master" to hold the information about the bug itself (repro steps, severity, technical info, impacted components...), that can have child of type "Bug Child" or "Sighting" that will hold the information specific to a given branch (target milestone, priority, specific information for that branch...).

We are using jira and still have this problem. I think it is a question of requirements and how are versions used rather than any one tool.
Who uses versions and how do they use them?
How are versions related to milestones in a project plan?
We use a 4 dectet version (major.minor.patch.buildNO). buildNo is the SVN head revision # at time of build. Each version is stored in JIRA and issues have an affects version and fixed-in version field that's a multi select.
After a short while we have many versions. Jira does allow us to control the list in two ways
1. Archive versions (greyed out from pick list)
2. Merge versions (rolls several versions together into a new version - no undo)
We have used Archive, but have avoided Merge due to the lack of the undo. So we still have a list of many many versions.
I'm sure you could probably accomplish a merge action in Bugzilla with some scripting and time, the question is: when is it OK to merge several older versions together?
If I have released, do I need to know that I have 17 builds between start and release? Do I need to keep the knowledge of a bug being found in build 1, fixed in 2, found again in 7, fixed again 9? Or is Found in release 1.0.0 fixed in release 1.0.1 good enough?
i'm going to ask a large question on this topic later on today, but I know the basic answer already:
- Depends on how your team wants to track things.
Implementation is fun, but it all comes down to requirements, goals and working back from user experience to solution. Which is rough when people don't necessarily know how that want to use something that doesn't quite exist in the form they'd like to use.

I have created a custom field (string) to list to version(s) (as V.M.P.B) where a bug has been fixed.
I have created also another custom field (string) to list to version(s) affected by a bug.
Doing that you are able to perform quick-search on specific version.

Related

Using semver, should pre-release versions be based off the previous version number, or the next version number?

Doing a pseudo-CD strategy for dev environments and we want to make sure all interim builds are tagged and versioned in a way that provides traceability but also conforms to semver so that helm etc doesn't yell at us and also I can sleep at night knowing I've bikeshedded correctly. I was thinking about the semantics of semver and how intra-release builds/versions might be tagged.
Assuming our process doesn't provide sufficient reliability for a "look-ahead" version (e.g. I don't know if our next release is going to be a major, minor, or patch increment), what would the best practice be for applying versions to builds between releases.
e.g.
Given last release of 1.2.3
Given a timestamp postfix for build metadata (e.g. a build might be called {version}-1668519441 )
Given that I don't know if the next official release is going to be 2.0.0, 1.3.0, or 1.2.4
Do I:
Apply the build number to the previous versionto generate the build version? 1.2.3-1668519441
this feels kinda yucky because technically it's the build of the next alpha version, not a build of the previous release version
Apply the build number to my best guess next version to generate the build version? 1.3.0-alpha-1668519441
this feels better, but we get burned if we guess wrong
simply weep, because the answer is "there's no one right answer" and now I have to make my own decisions?
;-;
Reasonable smart will be "modified 1" (because "internal builds" are just builds, for which we have to have "some id", which must just allow internal
identification of it and nothing more):
with something like git describe HEAD you'll get 1.2.3--14-g2414721, 1.2.3-21-g975b, 1.2.3-25-g2dc6 etc and any of these builds later according to (existing, I hope) Release Policy may become 1.2.4, 1.3.x or even 2.x.x (see idea of conventional commits and versioning of releases based on it), "just because..."
Answer 3 is daring and unequivocal version, but it's bad, because it does not answer the question and does not give at least a mediocre solution to the problem, but it's bad, because it does not answer the question and does not give at least a mediocre solution to the problem

Maintaining web-application version number

I want some suggestions about web-application versioning system.
Currently I use SVN commit number as version number of the application. So if the commit number is around 596 then I call it version 5.96
What is the most used approach for keeping a transparent versioning system of web application?
Check out 'semantic versioning'
It's a pretty popular standard these days.
Essentially version numbers consist of three numbers
major.minor.patch
major version is only updated any time you are doing a major release which has 'breaking' changes in it (essentially 3rd party integrating with your site will need to adjust their code for it to work with yours again)
minor version is updated when you are adding non-breaking changes
patch version is updated when you check in any small changes/bug fixes.
If the major version gets reset then the other two go back to zero. So you might be at 3.1.17 and when you move to 4 it becomes 4.0.0 then you might do a small bug fix so it goes to 4.0.1 the you might add a small feature and it goes to 4.1.0 and another bug fix so it goes and another bug fix so it goes to 4.1.1 and another feature so it changes to 4.2.0 etc.
My explanation isn't perfect so go look it up. It's a pretty sensible versioning system and allows anyone using your library / integrating with you to instantly know whether or not to expect breaking changes, new functionality or bug fixes.

How do you know what version number to use?

Here's one I have always wondered about...
Please excuse my naivety, but - How do you decide what version number to name your software?
I assume, when somebody creates a "final" version of an application/program it is version 1.0? - Then, what happens when you update it, how do you decide to call it 1.1 or 1.03 etc etc.
Is this mostly for the developer?
I've recently heard a pithier versioning strategy, that I first encountered at Eric Elliot's Medium account. It's more weighted towards library versioning that customer facing version numbers, but it has the advantage of simplicity. Use a three part version number, where each number means:
breaking.feature.fix
breaking: Something has changed that means code/expectations must change
feature: Something new is added, but old code/expectations will still work fine.
fix: Nothing's new, but a bug has been fixed.
I leave my old answer below, as it's still relevant to customer facing versions.
I tend to weight the significant digits as follows....
w.x.y.z (or w.xyz)
w - Major version, with many new
features. A paid upgrade. The first
public release of software is 1.X
(pre-release versions are 0.X)
x -
Significant release, but without
groundbreaking new features.
y -
Bugfix releases
z - Patchlevel
releases (fixing an emergency bug,
perhaps just for one client).
If you choose to use the w.xyz format, you only get 9 digits before overflow. However, if you're releasing that often, you may have a bigger problem.
Let's illustrate with FooApp, my new product!
0.9 - The first public beta
0.91 - The second public beta
0.911 - The emergency beta release to fix a crash on the Motorola 68010
1.0 - The first public release
1.1 - Added new BlahBaz feature
1.11 - Bugfixes
2.0 - Totally redeveloped interface.
Jeff Atwood has a blog post about this, where he advocates just using dates, and not to confuse the user with version numbers. However, he does discuss the approach Microsoft has taken: Using dates to determine version numbers. He goes into quite a bit of depth in his post, so I won't duplicate his work here. As for Versioning:
Versions (at least in .NET, go something like this):
1.2.3.4 where:
1 is the major release
2 is the minor release
3 is the build number
4 is the revision number
Major Release - Signifies a 'complete' system with whatever features that version was meant to have. Normally any subsequent 'major' versions are rewrites, or architecture changes, or (excuse the redundancy) major changes to the software.
Minor Release - Signifies a less significant release, with perhaps bug fixes, small features added, or any number of other 'minor' events. This could include interface changes and additions. Normally applications should be somewhat compatible in their 'major release' tree, so minor versions of the same major release should be architecturally the same.
Build Number - Generally signifies just bug fixes, small fixes, and are somewhat insignificant in their scope. It could be something as simple as changing the contrast between the foreground and background of the app. Generally, Builds are internal designations such as nightly builds, so you always have a place to revert back to that is stable.
Revision Number - signifies when bug fixes are released or VERY minor enhancements are made. These are generally reserved for just bug fixes -- don't include major feature enhancements as revisions.
We assign each build of any application unique four part version number defined as Major.Minor.Maintenance.Build.
Major -
The Major number is associated with significant changes to the application. This number also determines compatibility with other applications in the same "suite". This number is incremented when new releases are made. This usually means major architectural changes have taken place.
Minor - The Minor number is associated with new functionality and breaking bug fixes. Any time new functionality is introduced or when a breaking bug fix is applied, this number will be advanced and the Maintenance number will be set to zero.
Maintenance - The Maintenance number is associated with non-breaking bug fixes. This number will be advanced whenever a release is made that contains only non-break bug fixes.
Build - The Build number is associated with the subversion changeset (revision number) from which the application was compiled. This will provide an easy way of matching the version number to a precise set of code in subversion.
The only number the developers are really interested in this scheme is the Build. number. By tying the Build number to the subversion revision number we can guarantee what code was used to create the released application.
I think that the Linux kernel is a good reference for this:
The version number of the Linux kernel
currently consists of four numbers,
following a recent change in the
long-standing policy of a three-number
versioning scheme. For illustration,
let it be assumed that the version
number is composed thus: A.B.C[.D]
(e.g. 2.2.1, 2.4.13 or 2.6.12.3).
* The A number denotes the kernel version. It is rarely changed, and
only when major changes in the code
and the concept of the kernel occur.
It has been changed twice in the
history of the kernel: In 1994
(version 1.0) and in 1996 (version
2.0).
* The B number denotes the major revision of the kernel.
o Prior to the Linux 2.6.x series, even numbers indicate a stable
release, i.e. one that is deemed fit
for production use, such as 1.2, 2.4
or 2.6. Odd numbers have historically
been development releases, such as 1.1
or 2.5. They were for testing new
features and drivers until they became
sufficiently stable to be included in
a stable release. It was an even/odd
version number scheme.
o Starting with the Linux 2.6.x series, there is no significance to even or odd numbers, with new
feature development going on in the
same kernel series. Linus Torvalds has
stated that this will be the model for
the foreseeable future.
* The C number indicates the minor revision of the kernel. In the old
three-number versioning scheme, this
was changed when security patches, bug
fixes, new features or drivers were
implemented in the kernel. With the
new policy, however, it is only
changed when new drivers or features
are introduced; minor fixes are
handled by the D number.
* A D number first occurred when a grave error, which required immediate
fixing, was encountered in 2.6.8's NFS
code. However, there were not enough
other changes to legitimize the
release of a new minor revision (which
would have been 2.6.9). So, 2.6.8.1
was released, with the only change
being the fix of that error. With
2.6.11, this was adopted as the new official versioning policy. Bug-fixes
and security patches are now managed
by the fourth number, whereas bigger
changes are only implemented in minor
revision changes (the C number). The D
number is also associated with the
number of times that the compiler has
built the kernel, and thus is called
the "build number."
Also, sometimes after the version
there will be some more letters such
as 'rc1' or 'mm2'. The 'rc' refers to
release candidate and indicates a
non-official release. Other letters
are usually (but not always) the
initials of a person. This indicates a
development branch of the kernel by
that person. e.g. ck stands for Con
Kolivas, ac stands for Alan Cox,
whereas mm stood for Andrew Morton.
Sometimes, the letters are related to
the primary development area of the
branch the kernel is built from, for
example, wl indicates a wireless
networking test build.
From http://en.wikipedia.org/wiki/Linux_kernel#Version_numbering
Whatever numbering scheme you pick, it is critical to make clear to your users when a new version is compatible with old client code versus when a new version requires changes to existing clients. Most projects I know bump the very first number when client code has to change.
Beyond compatibility, I too think there's a lot to be said for using dates. Although it gets embarrassing if, like me, your release schedule is once every two years (but that's for a tool first released in 1989).
More than likely some one in sales or marketing will decide that they need some buzz. This will determine if the next release is 1.01 or 1.1 or 2.0. Kind of works the same in open source but it tends to tied to a fancy new feature that the team is proud of.
A.B.C.D
A: 0 when beta, 1 when first release, larger then 1 on almost entire rewrite.
B: New features added
C: Bug fixes done
The revision number of the version control repository
This is what I use for modules in embedded C projects:
1.00 - Initial release
1.01 - Minor revision
No interface changes to the module (i.e. header file didnt change).
Anybody using my module can upgrade without having to be afraid of breaking code.
I might have done some refactoring or code cleanup.
2.00 - Major revision
Module interface changed (i.e. functions added, removed or functionality of certain functions changed). An upgrade to this revision will most likely break existing code and will require refactoring of code using this module.
I should add that this refers to development stage, i.e. internal releases of modules into the project.
To add to all the explanation above, I will suggest use a versioning scheme which, will be easy for your customers to remember and easy for you to baseline and manage your software versions. Also, if you are supporting different framework such as .Net 1.0, .Net1.1 etc, then make sure your versioning scheme takes care of that also.
some good info here as well..
When to Change File/Assembly Versions
When to Change File/Assembly Versions
First of all, file versions and assembly versions need not coincide with each other. I recommend that file versions change with each build. But, don’t change assembly versions with each build just so that you can tell the difference between two versions of the same file; use the file version for that. Deciding when to change assembly versions takes some discussion of the types of builds to consider: shipping and non-shipping.
Non-Shipping Builds
In general, I recommend keeping non-shipping assembly versions the same between shipping builds. This avoids strongly-named assembly loading problems due to version mismatches. Some people prefer using publisher policy to redirect new assembly versions for each build. I recommend against that for non-shipping builds, however: it doesn’t avoid all of the loading problems. For example, if a partner x-copies your app, they may not know to install publisher policy. Then, your app will be broken for them, even though it works just fine on your machine.
But, if there are cases where different applications on the same machine need to bind to different versions of your assembly, I recommend giving those builds different assembly versions so that the correct one for each app can be used without having to use LoadFrom/etc.
Shipping Builds
As for whether it’s a good idea to change that version for shipping builds, it depends on how you want the binding to work for end-users. Do you want these builds to be side-by-side or in-place? Are there many changes between the two builds? Are they going to break some customers? Do you care that it breaks them (or do you want to force users to use your important updates)? If yes, you should consider incrementing the assembly version. But, then again, consider that doing that too many times can litter the user’s disk with outdated assemblies.
When You Change Your Assembly Versions
To change hardcoded versions to the new one, I recommend setting a variable to the version in a header file and replacing the hardcoding in sources with the variable. Then, run a pre-processor during the build to put in the correct version. I recommend changing versions right after shipping, not right before, so that there's more time to catch bugs due to the change.
In the case of a library, the version number tells you about the level of compatibility between two releases, and thus how difficult an upgrade will be.
A bug fix release needs to preserve binary, source, and serialization compatibility.
Minor releases mean different things to different projects, but usually they don't need to preserve source compatibility.
Major version numbers can break all three forms.
I wrote more about the rationale here.
It depends on the project. below is haskell's package versioning policy.
-- The package version. See the Haskell package versioning policy (PVP)
-- for standards guiding when and how versions should be incremented.
-- http://www.haskell.org/haskellwiki/Package_versioning_policy
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
version: 0.1.0.0

How to do version numbers? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
My company is building a product. It's going to be versioned by SVN. It's a webapp so basically there will never be a version out which doesn't have some features in them and thus could always be labeled as beta. But since it's going to be a corporate product I really don't want the "unstable watchout" on there. So how would you go about versioning? Is 1.0 stable? Should the build date be in the version number? Tell me what you guys think!
[major].[minor].[release].[build]
major: Really a marketing decision. Are you ready to call the version 1.0? Does the company consider this a major version for which customers might have to pay more, or is it an update of the current major version which may be free? Less of an R&D decision and more a product decision.
minor: Starts from 0 whenever major is incremented. +1 for every version that goes public.
release: Every time you hit a development milestone and release the product, even internally (e.g. to QA), increment this. This is especially important for communication between teams in the organization. Needless to say, never release the same 'release' twice (even internally). Reset to 0 upon minor++ or major++.
build: Can be a SVN revision, I find that works best.
Examples
My current chrome: 83.0.4103.61
x.y.z.g
increments in g are unstable. (or RCs)
increments in z are stable and mean bug fixes.
increments in y are stable and mean new features.
increments in x are stable, major release without 100% backward compatibility.
I once wrote an elaborate "versioning style guide" for a large project of mine. The project failed to materialize, but the style guide is still available online. It's my personal opinion, perhaps it is helpful (or inspirational) to you.
Beware, it's a long text, and goes into component versioning vs. product versioning and stuff like that. It also expresses strong opinions on some versioning schemes popular in the OSS community, but I have them, so I express them. ;-)
I disagree with using the Subversion revision number, for example. You might want to maintain a released version while continuing development in TRUNK, so you'll set up a maintenance branch - and your revision number versioning goes down the drain.
Edit: As a summary, it distinguishes between versioning source files, components, and the overall product. It uses a system of seperate x.y versoning for components and the product, with a nice interdependency between the two that makes tracing which component version belongs to which product version trivial. It also talks about how to handle alpha / beta / release / patch cycles without breaking the system. Actually, it's a modus operandi for the whole development cycle, so you might want to cherry-pick. ;-)
Edit 2: As enough people found my article useful to make this a "Nice Answer", I started working on the article again. PDF and LaTeX versions are now available, a complete rewrite including better language and explanatory graphics will follow as soon as I can find the time. Thank you for your votes!
Get yourself some inspiration from Wikipedia: "Software versioning"
Another "new" and "relatively popular" option is Semantic Versioning
Summary:
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.
Additional labels for pre-release and build metadata are available as
extensions to the MAJOR.MINOR.PATCH format.
a.b.c.d
Increments : when
- d: bug fixes
- c: maintenance, e.g. performance improvement
- b: new features
- a: architecture change
The mandatory is the most left one e.g. if there are for example a new feature and a bug fixed then you only have to increment b.
Based on my experience with complex enterprise platform level dependency management and release versioning I've come to recommend an approach I like to call Semi-Semantic Versioning.
Basically it builds off of Semantic Versioning 2.0 but is not quite as strict.
Semi-Semantic Version Segments:
<primary.release.segment>[-<pre.release.segment>][+<post.release.segment>]
Primary Release Segment Format:
MARKETTING.MAJOR.MINOR.PATCH
Each segment should allow alphanumerics, but pure numerics are recommended for logical incremental changes.
Like SemVer, I recommend Major, Minor, and Patch components to represent reverse compatibility tiers, but I also recommend prepending a Marketing component. This allows product owners, feature epics/groups, and business concerns to bump the primary component independent of technical compatibility concerns.
Unlike other answers, I don't recommended appending a Build number to the primary segment. Instead, add a Post-Release Segment following a '+' (ex: 1.1.0.0+build.42). SemVer calls this build metadata, but I think Post-Release Segment is clearer. This segment is great for declaring the suffix data as not related to the compatibility info in the primary Release Segment. Your continuous integration builds can then be given the previous release number appended with an incremental build number that resets after each primary release (ex: 1.1.0.0 -> 1.1.0.0+build.1 -> 1.1.0.0+build.2 -> 1.1.0.1 ). Some people alternately like to put the svn revision number here or the git commit sha to make it easy to tie to the code repository. Another option is to use the post-release segment for hotfixes and patches, tho it might be worth considering adding a new primary release component for that. It can always get dropped when the patch component is incremented, since the versions are effectively left-aligned and sorted.
In addition to the release and post-release segments, people often want to use a Pre-Release Segment to indicate almost-stable pre-releases like alphas, betas and release candidates. The SemVer approach to this works well, but I recommend separating numerical components from alpha-numeric classifiers (ex: 1.2.0.0+alpha.2 or 1.2.0.0+RC.2). Normally you would bump the release segment at the same time as adding the post-release segment and then drop the pre-release segment when you next bump them primary release segment (ex: 1.0.1.2 -> 1.2.0.0-RC.1 -> 1.2.0.0). Pre-release segments get added to indicate that the release version is coming up, usually just a fixed set of features for more in-depth testing and sharing that doesn't change minute to minute based on more commits.
The beauty of having all of this semantically defined in a way that covers almost all use-cases is that you can parse, sort, compare and increment them in a standard way. This is especially important when using CI systems for complex applications with lots of small independently versioned components (like micro-services) each with their own managed dependencies.
If you're interested, I wrote a semi-semantic parser in ruby. I needed to not just use this pattern but be able to manage other apps that used it.
"Version numbers" are a matter for your internal version control system. Release numbers are a different matter (and should be KEPT different).
Stick to a simple MAJOR.MINOR release system (like v1.27), where MAJOR is the compatibility level (version 2.x is incompatible with or at least majorly different from version 1.x) and MINOR is your bugfix releases or minor enhancements. As long as you follow the X.Y format, you can also use other systems like YEAR.MONTH (2009.12) or YEAR.RELEASE (2009.3). But really you're probably best sticking to MAJOR.MINOR unless you have a good reason not to.
Definitely don't use anything that doesn't fit the X.Y format, as it'll make it tough for distros, announcement websites, etc. to work with you, and that alone could seriously affect your project's popularity.
Use branches and tags in your (preferably distributed) version control system to mark specific internal version numbers as relating to MAJORS and MINORS respectively.
And yes, 1.0 should be stable. All releases should be stable, unless they're marked alpha, beta, or RC. Use Alphas for known-broken-and-incomplete. Betas for known-broken. RCs for "try it; you'll probably spot things we missed". Anything without one of these should (ideally, of course) be tested, known good, have an up to date manual, etc.
Version scheme: [major].[minor].[devrel][mark]
[major]: increment if you have a drastic change in development.
[minor]: increment if you have a minor change in development.
[devrel]: increment if you have a bug fix. Reset to zero if major++ or minor++.
[mark]: a, b or rc: a is an alpha release, b is beta release, and rc is a release candidate. Note that versions like 1.3.57a or 1.3.57b or 1.3.57rc is before the version 1.3.57. Start at 0.0.0.
It's pretty popular these days to just use the Subversion revision number.
If it's in SVN then why not use the SVN revision number?
If you look at the bottom right of this web page you'll see the Stack Overflow version number which is the SVN revision number.
Versioning is up to you; I'd put 1.0 on the first version I was confident in. You may want to follow it up quickly with other versions, since some software vendors have given 1.0 a bad reputation.
You do want some way of tying the version number to the exact build used, but you probably want it to be nice and simple for your end users. Consider using standard version numbers, and tagging the SVN repository with the version number included.
While just going with the Subversion revision number is nice and simple, it does remove information from the version number. Users might consider this a bad thing.
I assume that your webapp will have some kind of deployment procedure, so that not each revision in Subversion is actually published. Since it is impossible from the "outside" (from the user's perspective) to determine when releases are being made, and how many revisions the code will undergo between them, it makes the numbers almost random. They will be increasing, and I guess it's possible to surmise some kind of distance from comparing two revisions, but not much.
Classical version numbers tend to "dramatize" releases, so that users can build some kind of expectation. It is easier to think "I have version 1.0, now version 1.1 is out adding this and that, that sounds interesting" than to think "yesterday we ran SO revision 2587, today it's 3233, it must be lots better!".
Of course, this dramatization can be inflated too, with companies picking version numbers that are meant to sound more interesting than is motivated by the actual differences in the product, I guess going with the revision number counters this a bit.
We've spent way too much time deciding when to increment the major version. Some shops would rarely do it so you would have releases like 1.25.3 and others would do it for ever release giving you 15.0
I got fed up with that and convinced everyone the major release number is just the year and the minor is just a sequential release within the year. The users seemed to like it and it's a no-brainer to come-up with the next version number.
Year.Release.build
year = current year
release = sequence # of public releases with
new functionality - reset to 1 every
year
build = incremented for bug
fixes and internal releases
EDIT
** Now this was for an internal app that was continually enhanced **
This would probably not work for commercial apps where it's important to have major releases at different times of the year for marketing and financial purposes.
The reason why this question exists is because we don't have a single agreed upon way to do configuration management.
The way I like to do version number is just increment integer from 1. I don't want a multi part version number that I will have to explain or document. And I don't want to use SVN rev number as that will require some explaining as well.
You would need some release scripts on top of SVN to make this happen
I have very little experience in the area. However, here's what I'd do:
Choose a scheme for numbering revisions and stick to it. Be consistent.
Each version change should represent a significant change. How small a change is significant and the levels of change that are reflected in the version number are up to you.
Of course, you can just use the svn revision number --- like many others have suggested!!!
I hope this helps.
We use a simple major.minor.julian_date syntax.
Where;
major - First release is 1 and then when we introduce major new features or changes so significant they are not backwards compatible increase this number.
minor - The major milestone releases. For each build pushed by production this number increases.
julian_date - The Julian Day the build was pushed to QA.
Example of the first release pushed to QA on 1/15 is -> 1.0.015
Example of the first release pushed to Production on 3/4 is -> 1.1.063
It's not perfect, but handy as we push builds to QA near daily.
Some good info here:
When to Change File/Assembly Versions
First of all, file versions and assembly versions need not coincide with each other. I recommend that file versions change with each build. But, don’t change assembly versions with each build just so that you can tell the difference between two versions of the same file; use the file version for that. Deciding when to change assembly versions takes some discussion of the types of builds to consider: shipping and non-shipping.
Non-Shipping Builds
In general, I recommend keeping non-shipping assembly versions the same between shipping builds. This avoids strongly-named assembly loading problems due to version mismatches. Some people prefer using publisher policy to redirect new assembly versions for each build. I recommend against that for non-shipping builds, however: it doesn’t avoid all of the loading problems. For example, if a partner x-copies your app, they may not know to install publisher policy. Then, your app will be broken for them, even though it works just fine on your machine.
But, if there are cases where different applications on the same machine need to bind to different versions of your assembly, I recommend giving those builds different assembly versions so that the correct one for each app can be used without having to use LoadFrom/etc.
Shipping Builds
As for whether it’s a good idea to change that version for shipping builds, it depends on how you want the binding to work for end-users. Do you want these builds to be side-by-side or in-place? Are there many changes between the two builds? Are they going to break some customers? Do you care that it breaks them (or do you want to force users to use your important updates)? If yes, you should consider incrementing the assembly version. But, then again, consider that doing that too many times can litter the user’s disk with outdated assemblies.
When You Change Your Assembly Versions
To change hardcoded versions to the new one, I recommend setting a variable to the version in a header file and replacing the hardcoding in sources with the variable. Then, run a pre-processor during the build to put in the correct version. I recommend changing versions right after shipping, not right before, so that there's more time to catch bugs due to the change.
Or to use your 'thought' version number comma subversion number..
z.B.:
1.0.101 // revision 101, release
or 1.0.101-090303 // with release date, i use this

Repository organisation

When I first started using revision control systems like CVS and SVN, I didn't really understand the concepts of the "trunk", branching, merging and tagging. I'm now starting to understand these concepts, and really get the importance and power behind them.
So, I'm starting to do it properly. Or so I think... This is what I understand so far: The latest release/stable version of your code should sit in /trunk/ while beta versions or bleeding edge versions sit inside the /branches/ directory as different directories for each beta release, and then merged into the trunk when you release.
Is this too simplistic a view on things? What repository layouts do you guys recommend? If it makes a difference, I'm using Subversion.
See these two questions on SO for more information:
What does branch, tag and trunk really mean?
Subversion question
What I do and normally see as a standard is:
The trunk should contain your main line of development, your unstable version.
You should create release branches for your releases.
Something like:
/trunk (here your are developing version 2.0)
/branches/RB-1.0 (this is the release branch for 1.0)
/branches/RB-1.5
When you find a bug in 1.5, you fix it in the RB branch and then merge to the trunk.
I also recommend this book.
Eric has an excellent series of articles on Source Control use and organisational best practices.
Chapter 7 deals with branches (and yes, it recommends the /trunk/ and /branches/ directories you suggest).
I have used Perforce for a long time, and so my comments may be a little Perforce-centric, but the basic principles apply to any SCM software that has half decent branching.
I'm a very strong believer in using branched development practices. I have a "main" (aka "mainline") that represents the codebase from now to eternity. The aim is that this is, most of the time, stable and, if push came to shove, you could cut a release anytime that would reflect the current functionality of the system. Those pesky sales guys keep asking....
Developments happen in branches that are branched from MAIN (normally - occasionally you may want to branch from an existing dev branch). Integrate from MAIN to your dev branches as often as you can, to stop things diverging too much - or you can simply budget for a bigger integration period later. Only integrate your arse kicking new feature to MAIN when you are sure that it will go out in a forthcoming release.
Finally, you have a RELEASE line, which the option of different branches for different releases. There's some choices depending on the labelling capabilities of your SCM software,and how different major/minor revisions are likely to be. So you may opt, for example, for a release branch for every point release, or only for major rev number. Your mileage may vary.
Generally, branch from MAIN to release as late as possible. Bugfixes and last minute changes can either go straight into RELEASE for later integration to MAIN, or into MAIN for immediate integration back up. There's no hard and fast rule - do what works best. If, however, you have changes that may be submitted to MAIN (e.g. from a dev branch, or "little tweaks" by someone on MAIN), then do the former. It depends on how your team works, what your release cycles are etc.
E.g. I would have something like this:
//MYPROJECT/MAIN/... - the top level folder for a complete build of all the product in main.
//MYPROJECT/DEV/ArseKickingFeature/... - a branch from MAIN where developers work.
//MYPROJECT/RELEASE/1.0/...
//MYPROJECT/RELEASE/2.0/...
A non-trivial project will probably have a number of DEV branches active at once. When a development has been integrated into MAIN so that it is now part of the core project, kill off the old DEV branch as soon as you can. Many engineers will treat a DEV branch as their own personal space, and reuse it for different features over time. Discourage this.
If, after release, you have to fix a bug, then do that in the corresponding release branch. If the bug has been previously fixed in MAIN, then integrate across, unless the code has changed so much in MAIN the fix is different.
What really differentiates the codelines is the policies you use to manage them. For example, what tests get run, who reviews pre/post a change, what action happens if a build breaks. Typically policies - and therefore overhead - are strongest in release branches, and weakest in DEV. There's an article here that goes through some scenarios, and links to other useful things.
Finally, I recommend going with a simple structure to start with, and only introduce extra dev & release ones as needed.
Hope that helps, and is not stating-the-bleedin'-obvious too much.

Resources