You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andrea Polci <an...@eng.it> on 2008/12/12 09:48:05 UTC

log-police.py svn.core.SubversionException: ('No such transaction', 160007)

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:
/opt/CollabNet_Subversion/lib/svn-python/libsvn/fs.py:7: RuntimeWarning: 
Python C API version mismatch for module _fs: This Python has API 
version 1012, module _fs has version 1011.
  import _fs
/opt/CollabNet_Subversion/lib/svn-python/libsvn/fs.py:7: RuntimeWarning: 
Python C API version mismatch for module swig_runtime_data3: This Python 
has API version 1012, module swig_runtime_data3 has version 1011.
  import _fs
/opt/CollabNet_Subversion/lib/svn-python/libsvn/core.py:7: 
RuntimeWarning: Python C API version mismatch for module _core: This 
Python has API version 1012, module _core has version 1011.
  import _core
/opt/CollabNet_Subversion/lib/svn-python/libsvn/delta.py:7: 
RuntimeWarning: Python C API version mismatch for module _delta: This 
Python has API version 1012, module _delta has version 1011.
  import _delta
/opt/CollabNet_Subversion/lib/svn-python/libsvn/repos.py:7: 
RuntimeWarning: Python C API version mismatch for module _repos: This 
Python has API version 1012, module _repos has version 1011.
  import _repos


What is the problem? Am I doing something wrong?

Andrea

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=983310

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: log-police.py svn.core.SubversionException: ('No such transaction', 160007)

Posted by Ul...@elektrobit.com.
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@subversion.tigris.org].