[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: version number

From: Ren Wang <renwang101_at_gmail.com>
Date: Sun, 21 Feb 2016 10:40:34 -0500

Hi Andreas,

Thank you so much for the answer!

Ren

-----Original Message-----
From: Andreas Mohr [mailto:andi_at_lisas.de]
Sent: Sunday, February 21, 2016 9:40 AM
To: Ren Wang <renwang101_at_gmail.com>
Cc: users_at_subversion.apache.org
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
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
Received on 2016-02-22 08:39:55 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.