On Sun, Nov 10, 2013 at 1:09 AM, Gabriela Gibson
<gabriela.gibson_at_gmail.com>wrote:
> On Sat, Nov 9, 2013 at 9:03 AM, anatoly techtonik <techtonik_at_gmail.com>wrote:
>
>> ping
>>
>> Please, CC.
>>
>> On Mon, May 28, 2012 at 7:26 PM, anatoly techtonik <techtonik_at_gmail.com>
>> wrote:
>> > [[[
>> > * tools/examples/svnlook.py: Make it usable as a library
>> > ]]]
>> >
>> > Of course it would be better to use iterator interface instead of
>> > copying lists in memory, but I don't know if Subversion bindings have
>> > one. Not all commands are implemented, as I don't have time to
>> > rewrite everything, but at least it is clearly documented what is left,
>> > so it should easy do to if anyone will need it for their hook scripts.
>> >
>> > This is the same as:
>> > https://github.com/apache/subversion/pull/1/files
>> >
>> > Please, CC.
>>
>
> Ok I bite :)
>
> (note I'm the app around here, so... :)
>
> I looked at it (looks good code-wise) but I'm not sure what it does!
>
> Could you please explain what it is and how and why I would use it?
>
No problem. When writing cross-platform hook scripts in Python, you
often need to execute svnlook (svnlook.exe). It is possible to execute
external process from Python, but it is slow and not effective,
especially if you need to do several different lookups. This patch
makes it possible to use provided svnlook.py (which works through API)
as a library, meaning you can do `import svnlook` in your hook script
and use its more high level API.
It also allows to use this high-level API for different other tasks
with repository.
--
anatoly t.
Received on 2013-11-10 16:15:00 CET