On 4/10/07, David Anderson <email@example.com> wrote:
> On 4/6/07, David James <firstname.lastname@example.org> wrote:
> > If you take a look at the repository at
> > csvn.googlecode.com/svn/trunk/, you should note that csvn/constants.py
> > and csvn/core.py were autogenerated by the ctypes code generator.
> > Further, csvn/defines.py was generated by my generate-defines.py
> > script. If we integrated this code into SVN, these files would likely
> > be generated during the build process.
> There is no more core.py in the repository. Am I right in thinking
> that all of csvn.core, except for __init__.py and autogen.py were
> automatically generated, one way or another (ctypes code generator or
> generate-defines) ?
That's right. Under csvn/core/..., everything is (or should be)
automatically generated except for __init__.py and autogen.py.
However, if you look compare these files against pristine generated
output, you'll note that I've made a few changes:
- In core/functions.py, I added in some code for converting error
messages into friendly Python exceptions. All of this code is at the
top of the file (above the "############" marker).
- In core/functions.py, I also performed two find/replace
operations. I replaced "CFUNCTYPE(POINTER(svn_error_t)" with
"CFUNCTYPE(SVN_ERR_UNCHECKED", and I replaced "restype =
POINTER(svn_error_t)" with "restype = SVN_ERR".
I'd like to write a little build script for generating functions.py
and performing the above edits, so that I don't need to store the
generated code in the repository, but I haven't got around to it yet.
core/constants.py is a bit of a relic -- it mostly contains
definitions which are already in functions.py, so I can probably get
rid of it.
core/defines.py was generated by my generate-defines.py script. I also
added in a comment at the top of the generated file. It'd be good if I
updated the script to output that comment instead.
The higher-level classes, outside of the "core" directory, are mostly
what you want to look at. In particular, take a look at "repos.py" and
"client.py". Also take a look at the example scripts (e.g. example.py
and example2.py), which illustrate some of the cool stuff you can do
with the easy high-level interface.
It's still a work in progress so I apologize if there aren't enough
comments. I'm planning to add more comments, more documentation, and
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Tue Apr 10 16:30:42 2007