Den 9. sep 2005 kl. 17:24 skrev Philip Martin:
> Jon Bendtsen <Jon.Bendtsen@laerdal.dk> writes:
>
>
>> I have made a pre-commit hook script that adds bugzilla urls to log
>> messages.
>> It is a bash shell script, and it uses cut, sed, grep, echo, ...
>> It works on my debian stable using subversion 1.2.0-1 from testing?
>>
>> This script CHANGES the props file in the transaction directory.
>>
>
> Eeek! Modifying the database files directly is not recommended. It
> would be better to use the language bindings:
Yeah i know, but i couldnt find any other way to change it before
committing.
> #!/usr/bin/python
> import sys
> sys.path.append('/usr/local/subversion/lib/svn-python')
> from svn import repos, fs
> repos_handle = repos.open(sys.argv[1])
> fs_handle = repos.fs(repos_handle)
> txn_handle = fs.open_txn(fs_handle, sys.argv[2])
> log_msg = fs.txn_proplist(txn_handle)['svn:log']
> log_msg = log_msg + ' modified' # do the fancy bug URL stuff here
> fs.change_txn_prop(txn_handle, 'svn:log', log_msg)
Why are these language bindings not documented on the web?
At least not in anyplace i have looked. Naturally i look from
http://subversion.tigris.org/
and i've been looking under
Documents & files
the subversion book
development.
I just cant find it. Maybe if the language bindings was more easily
found i would not
have used the wrong way to do things. And it's not like it is the
first time i've been
looking for the language bindings. Back when i made a patch for
mailer.py i looked
after them as well, but the documentation is gone.
JonB
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 9 17:45:10 2005