Hi !
I have a problem with the Subversion Python Win32 bindings. The gist of
it is that I can't get any useful error messages out of Subversion's
libraries.
cmpilato was gracious enough to offer me some help, earlier on, but he
was using Linux, and he had no Win32 box to use.
If someone with Win32 could try the following script, or cmpilato's
modified one, I would be grateful. This problem is preventing me from
continuing on developing RSVN, at the moment. If the problem can be
found, then I'll be fine from here on.
BTW, this problem is not specific to me:
Thanks !
François
On 08/12/2004 13:23, C. Michael Pilato wrote:
> François Beausoleil <fbeausoleil@ftml.net> writes:
>
>>from svn import core, fs, repos
>>
>>def repro(pool):
>> repos.svn_repos_open('no-repos-named-that-way', pool)
>>
>>def main():
>> print core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO
>> core.run_app(repro)
>>
>>if __name__ == '__main__':
>> main()
>>
>>On my machine, the output looks like this:
>>1 1 1
>>Traceback (most recent call last):
>> File "C:\java\rsvn\recipe.py", line 11, in ?
>> main()
>> File "C:\java\rsvn\recipe.py", line 8, in main
>> core.run_app(repro)
>> File "C:\Python23\lib\svn\core.py", line 33, in run_app
>> return apply(func, (pool,) + args, kw)
>> File "C:\java\rsvn\recipe.py", line 4, in repro
>> repos.svn_repos_open('no-repos-named-that-way', pool)
>>SystemError: null argument to internal routine
>
>
> Somethis is wrong with your bindings, then, because I get:
>
> $ ./test.py
> 1 2 0
> Traceback (most recent call last):
> File "./test.py", line 12, in ?
> main()
> File "./test.py", line 9, in main
> core.run_app(repro)
> File "/usr/lib/python2.3/site-packages/svn/core.py", line 37, in run_app
> return apply(func, (pool,) + args, kw)
> File "./test.py", line 5, in repro
> repos.svn_repos_open('no-repos-named-that-way', pool)
> libsvn._core.SubversionException: ("Can't open file 'no-repos-named-that-way/format': No such file or directory", 2)
>
> I designed those SubversionException errors such that you can grab
> their apr_err member to get the numeric errorcode, too. So this
> slightly tweaked version of you script:
>
> #!/usr/bin/python
> from svn import core, fs, repos
>
> def repro(pool):
> try:
> repos.svn_repos_open('no-repos-named-that-way', pool)
> except core.SubversionException, e:
> print "ERROR (code=%d): %s" % (e.apr_err, str(e))
>
> def main():
> print core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO
> core.run_app(repro)
>
> if __name__ == '__main__':
> main()
>
> produces this output:
>
> $ ./test.py
> 1 2 0
> ERROR (code=2): ("Can't open file 'no-repos-named-that-way/format': No such file or directory", 2)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 13 15:21:57 2004