What is the best SVN setup for a web development project?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2433

    What is the best SVN setup for a web development project?

    I am looking for ideas on how to setup source control for web development projects?

    We have a live server, a development server, multiple workstations for developers and are planning on using Subversion for source control.

    These projects use databases so we need ideas on how to manage database changes too.
    niheel @ bytes
  • nathj
    Recognized Expert Contributor
    • May 2007
    • 937

    #2
    Hi,

    We are in a similar situation and are succesfully using SVN as our source control. We also use Tortoise SVN as the windows client and Versions as the Mac client.

    This works really well for us having set up users on SVN we can track the owner of the changes.

    As for the file structure I tend to run a locallatest directory that then has the code in there. The organisation of the code is then in accordance with the project in question.

    So, in a nutshell I have locally:
    E:\locallatest\ Code\ProjectNam e\src\.......

    Then on the Server there is a C:\svn\repos directory that is the SVN repository.

    Using the client like Tortoise makes setup and management really easy. You just need to update the passwd and auth files to add users to the system.

    One final tip wold be to have each user follow the same structure for local files and have a policy of checking in all code each day AND only checking in compiled code.

    I hope that helps.
    nathj

    Comment

    • RedSon
      Recognized Expert Expert
      • Jan 2007
      • 4980

      #3
      If you database files are in binary they will only be atomic commits that cannot be diffed. If you want to track individual database changes you will need to output the database as a series of SQL statements each time and check that in.

      As for you SVN setup your svn repo should mirror the file structure on your server. For example if you are serving bytes.com from /srv/bytes with config files located in /etc/apache2 then your subversion repo should have both /srv/bytes under version control and /etc/apache2 under version control. When you make changes to the code base and have tested it on your workstations, you should then tag that current revision and deploy it to the development server. If the changes go through a full test pass on the dev server and pass then that is the time that a branch should be created and then rolled out to the main site.

      When bugs are identified they should be fixed on the branch. Development should continue on the trunk where new features and enhancements are written.

      We can go over this in much more detail via IM or PM or whatever you like.

      Comment

      Working...