Issue with pre-commit hooks in Subversion 1.7.7

49 views
Skip to first unread message

Ramachandran Raghavendran

unread,
Jan 29, 2014, 11:18:09 PM1/29/14
to us...@subversion.apache.org

Hi,

 

I’m using Subversion 1.7.7 on windows with hooks written in python 2.7.2

 

I’m running SVNLOOK  commands in my pre-commit hook with the syntax as folow

svnlook log -t  commit_txn   REPOS_PATH

 

I’m able to trap and echo the txn number in the hook but the svnlook fails with the following message

Error: svnlook: E160007: No such transaction '10271-a4o'   

 

I coded a sleep statement and am able to see the directory  '10271-a4o.txn' in the repository/db/transaction folder.

 

All was well a few hours ago and now this….

 

Can somebody suggest a fix please.

 

Regards,

Rama

   

 

Ryan Schmidt

unread,
Jan 30, 2014, 2:57:47 PM1/30/14
to Ramachandran Raghavendran, Subversion Users

On Jan 29, 2014, at 22:18, Ramachandran Raghavendran <Ramachandran...@flsmidth.com> wrote:

> I’m using Subversion 1.7.7 on windows with hooks written in python 2.7.2
>
> I’m running SVNLOOK commands in my pre-commit hook with the syntax as folow
> svnlook log -t commit_txn REPOS_PATH
>
> I’m able to trap and echo the txn number in the hook but the svnlook fails with the following message
> Error: svnlook: E160007: No such transaction '10271-a4o'
>
> I coded a sleep statement and am able to see the directory '10271-a4o.txn' in the repository/db/transaction folder.
>
> All was well a few hours ago and now this….


Regarding “REPOS_PATH” above: is that taken from the first argument that Subversion passed to the hook script, or have you hardcoded the repository path? If the latter, could you have hardcoded it incorrectly? For example, has the repository moved, or have you copied this script to this repository from a different repository or have you recently added new repositories and are sharing this hook script amongst them all?

I’m not sure it this applies on Windows servers, but on Unix servers another thing to check is if the permissions of the repository are correct. For example, does the user the hook script is running as have permission to read the repository, in particular the transactions directory and this particular transaction file?


Reply all
Reply to author
Forward
0 new messages