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 something? 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(( subvertpy.ra.get_ssl_server_trust_file_provider(), )) ra = RemoteAccess("https://gmapcatcher.googlecode.com/svn/trunk", auth=auth) def stop(*pos): raise StopIteration() try: 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 print(repr(exc)) def dummy(*pos): pass ra.get_log(dummy, strict_node_history=False, paths=None, start=315, end=343, limit=1, discover_changed_paths=True, ) # 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")