subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Mohr <a...@lisas.de>
Subject Re: version number
Date Sun, 21 Feb 2016 14:40:09 GMT
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 area.


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...

HTH,

Andreas Mohr

Mime
View raw message