LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2010, 02:12 PM   #1
madsovenielsen
Member
 
Registered: Aug 2009
Posts: 183

Rep: Reputation: 15
Versioning software


Hello.

I am working on some minor programming projects. and wouldt like to keep track of them by version numbers. E.g. 1.0.0

Is there a tool or other method for automatically assigning version numbers to software ?

I am currently using Mercurial. as far as i can see it only assigns revision numbers. E.g. 5

Any input wouldt be greatly appriciated.

/mads
 
Old 10-02-2010, 02:34 PM   #2
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
I'm sure you could use the commit hooks of SVN. May be apply tag the code as part of a post commit hook.
 
Old 10-02-2010, 02:47 PM   #3
madsovenielsen
Member
 
Registered: Aug 2009
Posts: 183

Original Poster
Rep: Reputation: 15
I wouldt very much like to do it with Mercurial - if possible
 
Old 10-02-2010, 08:19 PM   #4
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
First I would say that there is a difference between revisions and versions. A version consists of a variable number of revisions and there is no clear cut way of knowing automatically when you will change from a bug fix to a minor or to a major version. So this is something that you will have to decide upon rather than relying on an automated or semi-automated solution.

Second does your code need to know the version number? Such as a response to a --version switch or in an about box? Or in deciding which files or libraries it should be working with? If that is the case then you will need to have the version number embedded within the source code not in some external repository.

My recommendation would be to use a constant within the code to hold the version number.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File versioning ssilayaraja Linux - Software 2 03-17-2008 09:23 AM
LXer: Tips on Software Versioning LXer Syndicated Linux News 0 04-11-2007 11:46 PM
libstdc++ versioning vani Linux - Software 4 12-06-2005 12:33 PM
What is symbol versioning newbie Mike Linux - Software 1 04-01-2004 04:24 AM
Module Versioning!!!???? Creator Linux - Newbie 9 01-07-2002 05:58 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration