subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ren Wang" <>
Subject RE: version number
Date Sun, 21 Feb 2016 15:40:34 GMT
Hi Andreas,

Thank you so much for the answer!


-----Original Message-----
From: Andreas Mohr [] 
Sent: Sunday, February 21, 2016 9:40 AM
To: Ren Wang <>
Subject: Re: version number

On Sun, Feb 21, 2016 at 08:45:56AM -0500, Ren Wang wrote:
>    Is there a way or API to set and get a file version number instead of
>    revision number? For my case, when a file is created, the version by
>    default should be 1, every change the version number will be 
> incremented

Generally spoken this is a pretty simple matter:

[number of log entries for this file] == "version number"

Since your requirement is compatible enough that the number of log entries
directly corresponds to the version number, we now at least know that there
is no *extra* state data needed which would need to be stored in database

As an svn semi-expert (insufficiently informed since SvnBridge devel), I
don't know which particular APIs might be available to retrieve this
information in the most direct/efficient manner, though.
You are likely looking for something
which directly returns a shallow "number of log entries"
rather than deep (per-entry) log information...


Andreas Mohr

View raw message