Results 1 to 4 of 4

Thread: How to create pre-commit hooks on collabnet.

  1. #1

    Lightbulb 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:
    #!/bin/sh
    REPOS="$1"
    TXN="$2"

    #SVNLOOK=/usr/bin/svnlook

    # Make sure that the log message contains some text.
    SVNLOOK=/usr/bin/svnlook
    #$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.
    exit 
    please help me in that problem, i don't know to fix that error, thanks all.

  2. #2
    Senior Member Site ModeratorSite Admin
    Join Date
    Mar 2011
    Location
    Chesterfield, UK
    Posts
    771
    It might help to look in the server error log to see what the problem was.
    Mat Booth
    Software Engineer
    WANdisco, Inc.

    I joined the blog-o-web-o-sphere! Linux and Coding Blog

    How To Ask Smart Questions

  3. #3

    Lightbulb

    Quote 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 at 01:30 AM.

  4. #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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •