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

svn_ra_get_log2() fails after cancelling svn_ra_get_location_segments() in 1.8.3

From: Martin Panter <vadmium+floss_at_gmail.com>
Date: Thu, 21 Nov 2013 05:52:35 +0000

I have a Python program using Subvertpy that worked with Subversion
1.7.8, but is failing in 1.8.3. I’m not familiar with the actual
Subversion API so I haven’t tried turning it into C code, but I have
pasted my simplified Python code below, in case someone can translate
it to test out.

This is what seems to be happening:

1. I call get_location_segments()
2. The callback is called by Subversion
3. The Python code causes the callback to return an error code
(370000), to cancel the iteration
4. get_location_segments() returns the error code, and we happily
return to my Python program
5. I call get_log()
6. The log receiver callback is never invoked. Instead, get_log()
returns immediately with the same error code used with
get_location_segements(). This should not happen.

I tried changing the error code at step 3 to 370001 and the same value
370001 is returned mirrored at step 6. I’m wondering if this is a bug,
or should Subvertpy be doing something special to clear the error or

I did try making my own simple repository (using “file:” protocol),
but so far I have only been able to produce the issue using HTTPS or
HTTP protocol, with the Google Code URL below, which made me wonder if
it is something to do with this Neon to Serf switchover in Subversion
1.8 I read somewhere.

The simplified Python code:

from subvertpy.ra import RemoteAccess
import subvertpy.ra

auth = subvertpy.ra.Auth((
ra = RemoteAccess("https://gmapcatcher.googlecode.com/svn/trunk", auth=auth)

def stop(*pos):
    raise StopIteration()
    ra.get_location_segments("", 343, 343, -1, stop) # calls stop()
once, sets Python exception, returns error 370000 to Subversion
except StopIteration as exc:
    # Subversion returns error, svn_error_clear() called, return to
Python with original exception

def dummy(*pos):
    strict_node_history=False, paths=None,
    start=315, end=343, limit=1,
) # Subversion returns error with code set to BZR_SVN_APR_ERROR_OFFSET = 370000
# log entry receiver callback is never called
raise NotImplementedError("doesn't get to this point due to error above")
Received on 2013-11-21 06:59:00 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.