1
votes

I can checkout, browse history etc... but when I try to commit any changes using Tortoise SVN I get an error:

Commit failed (details follow):

Commit blocked by pre-commit hook (exit code 255) with output:

The system cannot find the path specified.

If you want to break the lock, use the 'Check For Modifications' dialog or the repository browser.

This is happening after we set-up a new server and copied the repository data over from the old server. The error log on the server contains:

[Tue Dec 08 13:23:29.696220 2015] [dav:error] [pid 9044:tid 920] [client 192.168.16.150:59995] Could not MERGE resource "/svn/Phil/!svn/txn/2501-1w2" into "/svn/Phil". [500, #0]

[Tue Dec 08 13:23:29.696220 2015] [dav:error] [pid 9044:tid 920] [client 192.168.16.150:59995] Commit blocked by pre-commit hook (exit code 255) with output:\nThe system cannot find the path specified.\r\n [500, #165001]

[Tue Dec 08 13:23:29.789973 2015] [dav:error] [pid 9044:tid 920] [client 192.168.16.150:59997] Could not fetch resource information. [404, #0]

[Tue Dec 08 13:23:29.789973 2015] [dav:error] [pid 9044:tid 920] [client 192.168.16.150:59997] Named transaction doesn't exist. [404, #175002]

Any suggestions?

1
you have a pre-commit hook in your repository which seems to search for a file which is not there anymore?Peter Parker
Checked if svn has write/read permissions into the repository directory you defined? Also by the second error log (mentioning the pre-commit hook), check if the hook is executable. By the hook output, looks like there are some conflicting information about the paths which your svn is trying to read. Same for the 3rd and 4th error logs.Daniel Luz
I managed to find the option to edit the pre-commit hook, and it seems the path to CSVN is hard-coded in there. When I installed the software I put it in C:\Program Files\CSVN instead of C:\CSVN, so I think this is causing the problem.Phil Preen
Unfortunately it is not letting me edit the hook script: "The hook editor is disabled by default. Someone with access to the filesystem can enable this feature in security.properties with hook.script.editor.enabled=true Then restart the application." Where do I need to add this command?Phil Preen
I managed to edit the pre-commit.cmd file using notepad. Seems to have fixed the problem.Phil Preen

1 Answers

1
votes

This turned out to be because the software on the new server was installed into a different folder than it was on the original server, and the folder name was hard-coded into the pre-commit hook script in the repository.

Editing pre-commit.cmd found in the hooks subfolder and correcting the path fixed the problem.