Andrea Polci wrote:
> I'm trying to use the log-police.py script from
> tools/hook-scripts but when i try to use as pre-commit hook i
> get this error:
> Traceback (most recent call last):
> File "/var/svn/repositories/test/hooks/log-police.py", line 140, in
> ? sys.exit(svn.core.run_app(main, sys.argv))
> File
> "/opt/CollabNet_Subversion/lib/svn-python/svn/core.py", line 288, in
> run_app return apply(func, (application_pool,) + args, kw)
> File "/var/svn/repositories/test/hooks/log-police.py", line 122, in
> main fix_txn(fs, txn_name)
> File "/var/svn/repositories/test/hooks/log-police.py", line 43, in
> fix_txn txn = svn.fs.svn_fs_open_txn(fs, txn_name)
> File
> "/opt/CollabNet_Subversion/lib/svn-python/libsvn/fs.py", line 209, in
> svn_fs_open_txn return apply(_fs.svn_fs_open_txn, args)
> svn.core.SubversionException: ('No such transaction', 160007)
> svn: MERGE of '/svn/test/test': 409 Conflict (https://svnesel.eng.it)
>
> Thi is the call to the script in the pre-commit hook: #!/bin/sh
> REPOS="$1"
> TXN="$2"
> log-police.py -t "$TNX" "$REPOS"
>
> If I try to use it at command line giving the revision number
> instead of the transaction id the script execute successfully:
> ./log-police.py -r 12345 /path/to/repos
>
> In both cases I get also some warnings:
[python warnings deleted]
> What is the problem? Am I doing something wrong?
Since I didn't see any answers to this yet, I'll bite...
I can't tell about the python problems, but you have a typo in your
pre-commit hook:
$TXN <> $TNX
I hope this helps. :-)
Cheers, Ulli
----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=984304
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-15 19:51:05 CET