[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [hook-script] new pre-commit script to add bugzilla urls to log messages

From: Jon Bendtsen <Jon.Bendtsen_at_laerdal.dk>
Date: 2005-09-09 17:42:37 CEST

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

> #!/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
and i've been looking under
     Documents & files
     the subversion book

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.


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

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.