Modify

Opened 3 years ago

Closed 2 years 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:

Description

Hi,

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 (https://ourdomain.com)

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

http://www.ubergeek.tv/article.php?pid=136
http://kenai.com/jira/browse/KENAI-601

Regards

Attachments (0)

Change History (5)

comment:1 Changed 2 years ago by michiel

Hi,

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 2 years ago by sander.bogaert@…

Hi,

Here is the content of the post-commit hook: http://pastebin.com/H8QMhPax
And here is the result when executing it ( as root ): http://pastebin.com/5tqG3P8Y

Thanks for your reply!
Greets

comment:3 Changed 2 years ago by michiel

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:

#!/bin/sh
### SUBMIN AUTOCONFIG, DO NOT ALTER FOLLOWING LINE ###
/usr/bin/python /usr/lib/python2.6/dist-packages/submin/static/hooks/svn/mailer.py commit "$1" "$2" "/var/lib/submin/conf/mailer.py.conf"
### SUBMIN TRAC AUTOCONFIG, DO NOT ALTER FOLLOWING LINE ###
#/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 2 years ago by anonymous

Hi,

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 2 years ago by michiel

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.