Question

Svn is generating automatic numbers for revisions.

RevNo  Date         Desc
1      2012-01-01   Initial directories are created 
2      2012-01-02   Something added 
3      2012-03-10   something changed
4      2012-03-18   Ready for Release_1.0 and tags/Release_1.0 is ok
5      2012-03-19   Bug fixed
6      2012-03-18   Release_1.0.1 

Can I change the revNo 4 to 1.0 ? Can I add some property which can carry the Release Number like:

ReleaseNo RevNo  Date         Desc
0          1      2012-01-01   Initial directories are created 
0          2      2012-01-02   Something added 
0          3      2012-03-10   something changed
1.0        4      2012-03-18   Ready for Release_1.0 and tags/Release_1.0 is ok
0          5      2012-03-19   Bug fixed
1.0.1      6      2012-03-18   Release_1.0.1 

And If I can add property how can I retrieve using by svn.exe ? Like: c:\Projects\Test\trunk\>svn.exe infowith what kind params should I run?

Thanks in advance for your kind help...

Was it helpful?

Solution

You can't change revision numbers, but you can add revision properties with svn propset <PROPNAME> --revprop -r <REV> <PROPVAL> [TARGET]. You can also set a revision property during commit, e.g.:

svn commit -m "Commit message" --with-revprop "release-version=2.0.1"

To retrieve revision property use svn propget <PROPNAME> --revprop -r <REV> [TARGET]. See Version Control with Subversion for more information on properties.

Note: often by default setting of revision properties is disabled altogether or allowed only for svn:log property. You need to modify pre-revprop-change hook (or to contact your SVN administrator to do it for you).

You can also tag your code. See Version Control with Subversion. The advantage of tagging is that you can use code from different revisions in the same tag (say, one component can come from a different revision, including a different branch).

OTHER TIPS

References: http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-propertypage.html http://svnbook.red-bean.com/en/1.7/svn.advanced.props.html http://johnbokma.com/mexit/2008/09/30/subversion-svn-keywords-property.html http://svnbook.red-bean.com/en/1.0/re23.html

I used tortoise to make it happen.

SVN Property will be setted

Property name: ReleaseNo Default value: 0.0 In this folder every new file/folder will have ReleaseNo attribute with the 0.0 default value. I will be able to set the RleaseNo property when I create every tag. Propset and propget will work to setting and getting the ReleaseNo. I wanted to add new textbox into branch/tag form of Tortoise to enter the right ReleaseNo quickly but it'll take a lot time. Under the tags folder ReleaseNo property has been created

Folders are setted with set Release Number

With a commit changings are submitting to the repository

And the result

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top