Announcement

Collapse
No announcement yet.

post-commit hook - nothing happens

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • post-commit hook - nothing happens

    Hi everybody!
    I'm new SVN user and need help to manage hooks.
    At repository\hooks folder I've created .cmd file named post-commit.cmd.
    Placed two strings in it:

    echo qqq > e:\123.txt
    exit 0

    after I commit changes to my project - nothing happens and no file e:\123.txt is created
    It seems like hooks don't work at all, but if I delete " exit 0 " - while commiting changes it syas: "Post-commit failed(exit code 1)". So I think hooks work.
    But why nothing happens when exit 0 is present?
    Double-clicking post-commit.cmd causes e:\123.txt creating properly
    Using VisualSVN Manager 2.5.4 at Win2008ServerR2.
    Thanks in advance!

  • #2
    Originally posted by versus;
    nothing happens
    meant a new version is commited to repository, no error messages shown and no file is created by the hook

    Comment


    • #3
      Is e:\ a network share?

      Comment


      • #4
        Originally posted by mbooth View Post
        Is e:\ a network share?
        No. It's a local drive.
        If executing post-commit.cmd manually - 123.txt is created successfully.
        Is there any log of executing hook where I can see any error?
        Last edited by versus; 09-17-2012, 12:46 PM.

        Comment


        • #5
          Hmm, on Windows don't hook scripts have to have a ".exe" or ".bat" file extension?

          Comment


          • #6
            Originally posted by mbooth View Post
            Hmm, on Windows don't hook scripts have to have a ".exe" or ".bat" file extension?
            using .bat extension - result is the same.
            tried to put post-commit.exe - I don't see it starting. Nothing happens - commit is executed as if there is no hooks.
            Last edited by versus; 09-17-2012, 06:19 PM.

            Comment


            • #7
              Originally posted by versus View Post
              using .bat extension - result is the same.
              tried to put post-commit.exe - I don't see it starting. Nothing happens - commit is executed as if there is no hooks.
              You can't just change a .BAT extension to .EXE - a .EXE must be a compiled executable program.

              Comment


              • #8
                Originally posted by andyl View Post
                You can't just change a .BAT extension to .EXE - a .EXE must be a compiled executable program.
                Of course I know it. I just took a working programm and renamed it to post-commit.exe. But after comitting I don't see it starting.

                Comment


                • #9
                  solved

                  solved. SVN service is starting under NETWORK SERVICE by default. By default it hasn't any rights on writing to disk. Giving rights on writing helped.
                  Thanks to all.

                  Comment

                  Working...
                  X