Results 1 to 7 of 7

Thread: svn sync web root folder

  1. #1
    Senior Member t0kneneng's Avatar
    Join Date
    Jul 2008
    Posts
    132
    Thanks
    10
    Thanked 1 Time in 1 Post
    Rep Power
    7

    Default svn sync web root folder

    Hi! need some help regarding svn and apache, it is possible to auto sync apache root document when commit file to svn server?

    All commited files will be auto copy to /var/www/html/project so when I try to browse my local web server I'll be able to see the changes I made on svn. So no need for me to sftp and ftp to apache root document.

    Please let me know if this is possible... thanks...

  2. #2
    Senior Member ananth_ak's Avatar
    Join Date
    May 2010
    Location
    Vault 101
    Posts
    192
    Thanks
    23
    Thanked 19 Times in 17 Posts
    Rep Power
    7

    Default

    Hello,

    Are you aware of a program called viewvc? It allows you to browse/download your svn-repo from the master location.

    ViewVC: Repository Browsing


    Safest way to make a copy of your svn repo is to run svadmin hotcopy [repodir] [newrepodir] while no one is using the system.

  3. #3
    Contributors amitabh's Avatar
    Join Date
    Jul 2008
    Location
    New Delhi
    Posts
    123
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    9

    Default

    Are your svn server and apache servers on the same machines?

  4. #4
    Senior Member t0kneneng's Avatar
    Join Date
    Jul 2008
    Posts
    132
    Thanks
    10
    Thanked 1 Time in 1 Post
    Rep Power
    7

    Default

    Quote Originally Posted by amitabh View Post
    Are your svn server and apache servers on the same machines?
    yes it is on same machine... ananth_ak thanks for pointin me out on viewVC I haven't heard this I'll have take a look on it.

    What I would like to achieve is that can trunk folder be set as root document of apache so that once my developer commit he's work and check our www server (on same machine) he'll be avail to see that changes he made on the fly.

  5. #5
    Contributors amitabh's Avatar
    Join Date
    Jul 2008
    Location
    New Delhi
    Posts
    123
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    9

    Default

    In that case, look at the post commit hooks available with svn. What you basically need to do is set the document root folder as another svn client, and every time someone commits to the svn server, you use the post commit hook to call "svn update" command on your document root folder.

  6. #6
    Senior Member t0kneneng's Avatar
    Join Date
    Jul 2008
    Posts
    132
    Thanks
    10
    Thanked 1 Time in 1 Post
    Rep Power
    7

    Default

    Quote Originally Posted by amitabh View Post
    In that case, look at the post commit hooks available with svn. What you basically need to do is set the document root folder as another svn client, and every time someone commits to the svn server, you use the post commit hook to call "svn update" command on your document root folder.
    Thanks for the reply do I need to edit post-commit.tmpl... I kind of lost here don't know where to call svn update... I've already make svn client folder on my server and make it as web root folder.

  7. #7
    Contributors amitabh's Avatar
    Join Date
    Jul 2008
    Location
    New Delhi
    Posts
    123
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    9

    Default

    Rename post-commit.tmpl to post-commit and have the following code inside it after replacing the placeholders with values appropriate for your server environment:
    Code:
    #!/bin/sh
    {path to svn} update {document root}  --username '{username}' --password '{password}' --non-interactive 1>&2

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. sync out of range
    By peter maxwell in forum Ubuntu / Debian
    Replies: 3
    Last Post: 18th October 2009, 01:36 PM
  2. sync svn
    By myfoot in forum Ubuntu / Debian
    Replies: 0
    Last Post: 21st February 2008, 11:33 PM
  3. Replies: 1
    Last Post: 25th October 2007, 02:44 PM
  4. Password sync problem
    By ssent12 in forum Getting started tutorials
    Replies: 0
    Last Post: 17th August 2007, 02:08 PM
  5. Linux sync. out of range monitor error
    By harshala09 in forum Linux hardware
    Replies: 2
    Last Post: 14th June 2007, 10:37 AM

Posting Permissions

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