Take the 2-minute tour ×

I'm trying to change svn revision number due to obtain a major.minor.release format. In my configuration svn revision number is incremented by one for each commit. It should be possible to change it ?

I'm studying how to do this using perl but it would be gold for me if you could suggest a kind of ace in the hole solution.

share|improve this question

3 Answers 3

It's not possible, what you might want to do is tag the specific revisions corresponding to your releases

share|improve this answer

Do not mix version control numbers and release numbers. Just don't abuse it this way.

The latest when you switch RCS from say, subversion to git, you are screwed. Seriously, do your version numbering manually. At most, include the subversion revision number as a postfix build indicator.

What do you gain from tieing your release version numbers to your RCS system internal numbering? These numbers essentially are just unique ids for the system, but not software version numbers. They are commit numbers, so don't mess with that.

share|improve this answer

No, you cannot change the SVN revision number, and neither should you.

Under the hood, SVN makes a (lazy) copy of the whole repository tree each time you check in something. This copy is stored and accessed by an ID, and that ID is referred to as the revision number. It's a piece of information internal to your repository, and except for it being needed to refer to a specific revision, the value of this ID should be of no concern to you.

Which version number your piece of software is delivered to customers with is something that's decided externally from the repository and independently from the number of checkins into the repository. (Your customers do not care whether you needed a hundred checkins to implement the shiny new features and iron out those nasty bugs, or a thousand of them.)

It is your task as a developer to make the connection between an internal revision number and some externally used version number. This is done by tagging (or branching, if you will plan to have several minor releases from that major release). If there's a specific revision that you want to release as version 1.0, just copy this revision to something like tags/releases/1.0. (Note that this even allows you to mix source files from different revisions for a single release. Just selectively update them to specific revisions and when you have the state that you want tag off that mixed working copy.)

The SVN book explains all this. Do yourself a favor and take a few hours to read through it. This will pay off within days.

share|improve this answer

Your Answer


