No announcement yet.

How to create pre-commit hooks on collabnet.

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create pre-commit hooks on collabnet.

    Hi all,

    I a newbee and I have a question, I have a script bash shell pre-commit hooks and i checked it on svn local but when i uploaded to git collanet on internet and test, i saw error:

    PHP Code:
    svnServer sent unexpected return value (409 Conflictin response to MERGE request for '/svn/my_repository 
    and my script is:

    PHP Code:


    # Make sure that the log message contains some text.
    #$SVNLOOK log -t "$TXN" "$REPOS" | \
    #   grep "[a-zA-Z0-9]" > /dev/null || { echo "<<Empty log message>>" >& 2; exit 1; } 

    # All checks passed, so allow the commit.
    please help me in that problem, i don't know to fix that error, thanks all.

  • #2
    It might help to look in the server error log to see what the problem was.


    • #3
      Originally posted by mbooth View Post
      It might help to look in the server error log to see what the problem was.
      Thanks for your answer but i don't have permission to access server, administrator allow me to access to git clone, and in the repository git clone has a folder hook/pre-commit/<pre-commit-hook>

      <pre-commit-hook>: pre-commit for my repository (ex: my_repository)

      And i use command "git add -A", "git commit -m" and "git push" to update my pre-commit hook. After that, I check with my repository but i have an error

      PHP Code:
      Commit failed (details follow):
      Server sent unexpected return value (409 Conflictin response to MERGE request for '/svn/my_repository' 
      And when I removed pre-commit on git server and check with my repository on desktop, it's ok so I think my file pre-commit hook error, but I checked that file on server SVN local successfully.

      Thanks for your supporting.
      Last edited by bkvtin; 04-10-2012, 09:30 AM.


      • #4
        Hi all, I can commit using pre-commit hook because I ask admin to view error and now i can check with pre-commit hook.

        But i have an error. when I commit with correct condition in pre-commit hook, commit successfully.
        And when I commit with incorrect condition in pre-commit hook, I don't see a warning error:
        <<Empty log message>>
        and I only see that error:
        Commit failed (details follow):
        svn: Server sent unexpected return value (409 Conflict) in response to MERGE request for '/svn/my_repository'
        I don't know what's happening, please help me and thanks for your viewing. many thanks.