You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by William Ferguson <wi...@hubbub.com.au> on 2005/05/26 03:54:25 UTC

Fetched Revision from RA->get_file

Hi all,

I'm using SVN 1.1.4 and I was just wondering whether it is expected that the
fetchedRevision set during a call to svn_ra_plugin_t->get_file should always
equate to the latest revisioon number from te Repository. I was expecting it
to be set to the revision at which the resource was last updated.

Ie if current Repository Revision is 12 and you have 3 revisions of fileA
fileA:3
fileA:7
fileA:9

I expected that (pardon the pseudo code) :
RA->get_file('fileA', HEAD, &fetchedRev) gets fetchedRev of 9
RA->get_file('fileA', 7, &fetchedRev) gets fetchedRev of 7
RA->get_file('fileA', 8, &fetchedRev) gets fetchedRev of 7

But instead I getting answers of: 12, 7 and 8 respectively.
Ie regardless of what the Revision is on the target Resource I always get
back the Revision number that I supplied.
Or if I nominated the HEAD Revision then I get back the Repository Revision
number.

Have I configured something incorrectly or is this expected behaviour?


William

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Fetched Revision from RA->get_file

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Thu, 26 May 2005, William Ferguson wrote:

> I'm using SVN 1.1.4 and I was just wondering whether it is expected that the
> fetchedRevision set during a call to svn_ra_plugin_t->get_file should always
> equate to the latest revisioon number from te Repository. I was expecting it
> to be set to the revision at which the resource was last updated.
>
>
Yes, that's the expected behaviour. In Subversion 1.2, there is a new
call: svn_ra_stat that will give you the created-rev of a directory entry.
In earlier versions, you can just use RA->get_dir() on the parent path and
find the entry for the child in the returned hash. Note that you need that
as a fallback even if you're using svn 1.2 client libs, since svn_ra_stat
doesn't work against an svnserve older than 1.2. (ra_dav works, though).

Hope this helps,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org