How increment in revision number calculated in sub

2019-07-19 15:30发布

For one of my project I'm using Subversion(Rabbit VCS). The revision number is incremented for every check-in, but I'm unable to understand all the factors on which amount of increment in revision number on check-in depends. Check-ins caused an increment from 1 to 25 and branch merge did an increment of 94. Can anyone point out to algo used for calculating this revision number change.

1条回答
放荡不羁爱自由
2楼-- · 2019-07-19 16:06

Every single commit againt Subversion counts as one revision. The number reported by Subversion is simply the sequence number of that commit. For example if there is a jump of 94 between any two of your commits one or more other users of the subversion repository have completed 93 other commits.

In some development environments in addition to humans there are also automated processes, e.g. automated builds that create tags or branches, and therefore cause the revision number to increase.

The algorithm used by Subversion is very simple: Start with zero when the repository is created then count the number of successful commits against the repository. Note that commits are atomic (or transactional) and hence completely sequential similar to a database system with transaction support.

查看更多
登录 后发表回答