Announcement

Collapse
No announcement yet.

svn2web - "svn: '.' is not a working copy" - need help

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

  • svn2web - "svn: '.' is not a working copy" - need help

    Hi folks,

    I have a problem getting svn2web to run on my centOS 6.2 machine.

    The repositories are in /var/svn/. I've checked out the projects onto my local windows machine. There are .svn folders. The pre-commit svn hook should upload the files, I've changed in eclipse on the local windows machine to the sftp-server and then commit them to the svn repository.

    Now when I type "svn status" on the server I get the following message: "svn: '.' is not a working copy". Because of this error, I do not get svn2web working.

  • #2
    That script, if I'm reading the instructions right, is a horrible idea. It tells you to install it as a pre-commit hook, which means that if the commit fails, your changes will be uploaded to your web server but won't actually exist in the repository (if it can also function as a post-commit hook, then he's giving people very bad advice in making pre-commit the default in his documentation).

    It's also abandoned - he references the Subversion 1.5 manual, and 1.5 is no longer supported. The last time the code was touched was 3 years ago.

    Using this script is a disaster waiting to happen.

    Write your own scripts, or use a continuous integration system to manage testing & deploying your code.

    Comment


    • #3
      Thanks for your reply. The thing is, I only want to use this for development purposes. For deployment I do not use hooks.

      It is not very comfortable, when I always have to upload the changed files manually to the sftp-server, e.g. when I want to test the functionality of the template engine. There, it would be more useful, if I can commit the changes to svn and then see if everything works as supposed to be (in the browser).

      Comment


      • #4
        Originally posted by fbgbr View Post
        Thanks for your reply. The thing is, I only want to use this for development purposes. For deployment I do not use hooks.
        OK, so only use a hook script or CI server in your development environment.

        Originally posted by fbgbr View Post
        It is not very comfortable, when I always have to upload the changed files manually to the sftp-server, e.g. when I want to test the functionality of the template engine. There, it would be more useful, if I can commit the changes to svn and then see if everything works as supposed to be (in the browser).
        Again, you can do this simply with a properly written post-commit hook script (one is even provided in the [url=http://subversion.apache.org/faq.html#website-auto-update]SVN FAQ[/quote]), or a Continuous Integration server. Or better yet, have a full environment able to run your application right on your workstation, so you can test your code before committing it.

        You'll note that I didn't say "don't to it." I said to not use svn2web.

        Comment


        • #5
          Thanks for the answer. Now I've done the following:

          First, did a checkout:

          svn co file:///var/svn/my_project/src/ /var/www/html/my_portal --> no problems.

          Then created a C Script in /var/svn/my_project/hooks called svnupdate.c with this content:

          #include<stddef.h>
          #include<stdlib.h>
          #include<unistd.h>
          int main(void) {
          execl("/usr/bin/svn","svn","update","/var/www/html/my_portal/", (const char *) NULL);
          return(EXIT_FAILURE);
          }


          After that compiled the script with GCC-Compiler and ran the program --> no problems - updates were applied to the /var/www/html/my_portal directory

          Ok, next thing was, I copied the post-commit.tmpl to post-commit and edited the file as following:

          /var/svn/my_project/hooks/svnupdate

          The problem now is, that I can execute the svnupdate program manually and it works. But when I commit in eclipse to the svn repository, the post-commit script seems not to be called by svn, because the commited changes are not updated to the /var/www/html/my_portal directory

          Comment


          • #6
            Check your file permissions. When executed as a hook script, your program executes as the user account your server runs under. You created the WC, so the program works for you, but another user (assuming you're running Apache or svnserve, which you should be) is running it in the hook scenario. Adjust the ownership and/or ACL on the WC you created.

            Comment


            • #7
              The owner of the working copy (/var/www/html/my_portal) is the same as the user running svn (it is apache) with all rights (wrx)

              Comment


              • #8
                problem solved.

                deleted the svnupdate program and script and changed the post-commit file this way:

                remove line /var/svn/my_project/hooks/svnupdate

                add line /usr/bin/svn update /var/www/html/my_portal

                works great!

                Comment

                Working...
                X