> >> * use pure WebDAV commands (after turning on Autoversioning).
> >> You get minimal features, but the command set is very tiny
> >> and easy to use.
> > Is there a way to control log messages with this?
> >> * use WebDAV/deltaV commands.
> >> All features available, though the command set is larger
> >> and more complex.
> > I considered this, but [snip] too hard to roll on my own.
> Yup, versioning is hard.
> I think your life would be way easier just using the libsvn_client
> python bindings.
Here is how easy my life is now:
io = StringIO.StringIO(text)
c = pycurl.Curl()
c.setopt(pycurl.URL, self.url + '/' + page)
if self.username is not None:
c.setopt(pycurl.USERPWD, '%s:%s' % (self.username,
That does a SSL/digest auth PUT with no memory pools, no working copies,
etc. The only thing it doesn't do is have a log message. :-)
Okay, you got me, I don't have the slightest clue how to use the Subversion
C API and the Python bindings that (somewhat) wrap it (I'd love to see a
"real" wrapper that could do something like:
repo = Repo(myUrl, user, pass)
oldContents = repo.get('file.txt')
My first experience with the bindings was via Greg Stein's SubWiki, which I
was using back in the 0.1/2-ish days. Every ~6 months or so, I take another
look at code like:
And, you're right, I could cut/paste hack together something that works, but
deciphering the code out of SubWiki and keeping track of all the handles,
transactions, etc., etc., is not something I could do in a night. The pycurl
code I did in a night. I know I'm being lazy, but that is my guiding metric.
I get that the libsvn_client can do anything and everything. But I think I
can safely assert it is not easy to learn. For just dropping a file into a
svn repo, I think it is way too much overhead.
Perhaps I'm being idealistic, but I just want to put one file into
Subversion, with a log message, in less than 10 lines of code. If you could
provide the libsvn_client example code (preferably Python :-) that does it,
I would be very, very grateful (and would suggest keeping the example around
on the website to benefit others learning the bindings - heck, I could make
a patch for that if you help me with the code :-).
> Why are you determined to reimplement the wheel? Or
> is requiring the presence of svn libs too big a burden?
No, I'm certainly not trying to reinvent the wheel. I'm just being as lazy
as possible. And up until now when log messages created an itch, WebDAV
GET/PUT was, I think you'd have to admit, awesomely simple compared to the
libsvn_client stuff. It did exactly what I wanted.
So, that was my reasoning. You're frustrating me making this libsvn_client
stuff sound easy :-), so perhaps I'll take another crack at deciphering
stuff from the SubWiki code. I'll work on that over the next few days as I
have time. Any pointers would certainly be appreciated.
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Fri Jan 14 04:52:06 2005