How to get the next version number in SVN

I am developing an Android application using eclipse and svn for version control.

I wanted to know the next svn version number before submitting my project source.

Form Properties->Team->Show History , I can get the current version number, but I can’t assume that the next version number will always be +1, because from the branch, if any commit is made, the next version number will be +2 or + 3 depends on the number of Commit from branch.

So please tell me how to get the next version number.

thanks

+4
source share
2 answers

I wanted to know the next svn version number before submitting my project source.

I don’t think it’s possible, for what reason you declare: there may be changes between when you receive the number and when you make. As far as I know, Subversion does not allow to “block” revision numbers - and this does not make sense.

I am trying to set the next version number as my version code

There is an established workflow for inserting the version number into the code base. This is probably what you want. This is explained in this question.

+5
source

There is no need to set the next version number. It doesn’t matter if you use the current revision + 1 or the current version + 42 or the current version - 123, if you use the same constant all the time (so that the version code increases when the revision changes).

Given the possible selection of all constants, as explained above, the current version + 0 is the easiest to select and implement, since most version control systems can insert this number directly into files.

0
source

Source: https://habr.com/ru/post/1440950/


All Articles