Opened 6 years ago

Closed 6 years ago

Last modified 3 months ago

#269 closed defect (fixed)

svn: MERGE request failed

Reported by: anonymous Owned by: somebody
Priority: major Milestone:
Component: Backend Version: 2.0
Keywords: Cc:



Created a new repository and now always get this when commiting: svn: MERGE request failed on '/svn/repo/trunk' svn: MERGE of '/svn/repo/trunk': 200 OK (

This seems to be a know problem most likely caused by a faulty post-commit hook. Here is some info:


Change History (6)

comment:1 Changed 6 years ago by Michiel Holtkamp


Sorry for taking so long to respond. I was on holiday and there were some personal things that I had to take care of. If you are still interested in solving this problem, please read on.

To solve this problem, we need more information:

  • the contents of your post-commit hook (</path/to/submin>/svn/<your repository>/hooks/post-commit)
  • the output of your post-commit hook: ./post-commit </path/to/submin>/svn/<your repository> <revision>. Be advised that it will run everything in the post-commit, including sending e-mails or whatever is in your post-commit. Take care if these actions are only supposed to be run once. If in doubt, please create a testing repository and work on that.

From the above information, we can determine if the problem is caused by submin itself (due to configuration or code probems) or something else.

comment:2 Changed 6 years ago by sander.bogaert@…


Here is the content of the post-commit hook: And here is the result when executing it ( as root ):

Thanks for your reply! Greets

comment:3 Changed 6 years ago by Michiel Holtkamp

Hey Sander,

Ok, you didn't run the command with the arguments I asked for (should be something like: post-commit /var/lib/submin/svn/ODS 1, where 1 is the repository number).

Anyway, I think I have enough information as to why your post-commit is complaining. Apparently, it cannot import the trac module. You have two options:

  1. Install trac and make sure your python can import it (Easily checked. The following command should not give any import errors: python -c "import trac.env").
    1. If you already have trac installed, maybe you should add it to the python-path.
    2. If you have multiple versions of python installed, you can also change the line from /usr/bin/python to the complete path of your python executable.
  2. Remove the trac-hook from the post-commit hook, you will lose the feature "automatic ticket closing/referencing from commit". You can comment it out as shown in the file below. If you do not have trac at all (and don't want to), you can disable the trac-features with the following command:
    submin2-admin /var/lib/submin config set enabled_trac no

Post-commit hook with trac-hook commented out:

/usr/bin/python /usr/lib/python2.6/dist-packages/submin/static/hooks/svn/ commit "$1" "$2" "/var/lib/submin/conf/"
#/usr/bin/python /usr/lib/python2.6/dist-packages/submin/static/hooks/svn/trac-post-commit-hook -p /var/lib/submin/trac/ODS -r "$2"

Please let me know if it helps.

comment:4 Changed 6 years ago by anonymous


I used the first option to fix it ( since I'd like to have Trac as an option ). Now I don't have the error but only after I've created a trac environement. So when I didn't it still gives the same error.

comment:5 Changed 6 years ago by Michiel Holtkamp

Resolution: fixed
Status: newclosed

(In [1349]) Only enable trac hook when trac is on and trac env exists, disable otherwise. Fixes #269, refs #194

comment:6 Changed 3 years ago by Michiel Holtkamp <git@…>

In d9d48364d7a524e7d4ed0c13d607f7a1e63b065b:

Only enable trac hook when trac is on and trac env exists, disable otherwise. Fixes #269, refs #194

git-svn-id: 9dfea958-5e0b-0410-aa7e-b09452dc4efc

Note: See TracTickets for help on using tickets.