SVN & Web Development

Discussion in 'Web Design and Development' started by SelfMadeCelo, Feb 2, 2009.

  1. SelfMadeCelo macrumors regular

    SelfMadeCelo

    Joined:
    Sep 9, 2008
    Location:
    Tulare, CA
    #1
    I've seen a lot of web developers using SVN lately and so I've tried my hand at setting it up and let me tell you...it's not easy. I was wondering if anybody else around these parts have ever set something up along these lines. We have a dedicated server running CentOS and Plesk. I had the server techs install SVN so it's ready to go but their support stops there.

    The way I wanted to have everything set up would be to have a "production" server, a "development" server and the repo server. I want to be able to take the files from the repo and develop on the development server and when it's ready update the production server from the same repo.

    I've done a lot of searching and can never find sort of a "how-to" on this kind of thing. And sometimes I can only find instructions on how to do a certain part.

    Anyways, if anybody has some advice or some tips and tricks they wouldn't mind sharing that'd be great. Thanks.
     
  2. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #2
    Read this entire page, especially the workflow part at the top which discusses in laymen terminology with some great tips. The page also has the SVN commands necessary to accomplish said tasks.

    Here is another page where the import and deployment process is discussed with actual scenarios explained, to give you additional help as necessary.

    And finally, a very cool page on automating deployment using hooks, a cool feature in Subversion, between development and production.

    -jim
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    Yea subversion is a little deceptive. It looks straight forward, but you soon realize you need to know what you're doing to even get started. I setup SVN on my MacBook and just use it locally for myself. No one else interacts with the repository. I use BBEdit, which can directly interact with SVN giving you ll the commands at your finger tips (at least the commonly used commands). Also, I installed a program that integrates with Finder so I can do Adds, Deletes, Commits, etc. right inside Finder. It's called SCPlugin. It's handy because it can also effect the Finder icons so you can see what files have been changed or not added yet just by browsing through your files.

    I had been working on some documentation as I was installing everything, but that was for local use, not SVN setup on a server, so it may not be very applicable. There's other GUI interfaces to SVN as well so search around. Some cost money, but a few are free.
     
  4. SelfMadeCelo thread starter macrumors regular

    SelfMadeCelo

    Joined:
    Sep 9, 2008
    Location:
    Tulare, CA
    #4
    @SrWebDeveloper -- In all my hours of searching I've never seen those three pages lol I will check them out. Thanks =)

    @angelwatt -- I will definitely check out that plugin. I've thought about using SVN locally but I think hosting repos on our server would be better. Especially if I'm not on my work computer and need to work on some sites from another location. Thanks =)
     
  5. memco macrumors 6502

    Joined:
    May 1, 2008
    #5
    You may also want to have a look at GIT. It has similar functionality to SVN and the like.
     
  6. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #6
    FYI

    -jim
     
  7. SelfMadeCelo thread starter macrumors regular

    SelfMadeCelo

    Joined:
    Sep 9, 2008
    Location:
    Tulare, CA
    #7
    I've figured it out! Turn out a few of the guides I was looking at for examples wrote the vhost.conf wrong. They forgot to add:
    Code:
    <Location \ >
    Also I had to update the Plesk config and then restart Apache. At first I was only restarting.

    I've also found out that if you create the repos anywhere but /var/www then you run into problems with permissions.

    Anyways, everything works now. Thanks for the help =)
     
  8. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #8
    Well, I keep my repository inside my Documents folder and I use a non-admin account, so it is possible to store it anywhere. Though, I may have had to tweak some permissions, like turning on read/execute rights to my group.
     

Share This Page