Search code examples
svndirectoryrevisionsubdirectorytrunk

Source code directly in trunk folder or in trunk/subfolder


Finally I am entering the world of revision control! I don't have any previous knowledge of Subversion, but have read most of the book, and I am currently installing Subversion and Trac. We will be two developers working on a PHP web application.

My question concerns the directory structure. Common practice seems to be to put the source code directly into trunk. But how do I handle files that isn't a direct part of the application, for instance:

  • Liquibase changelogs if we choose to have revision control over the MySQL history
  • Small PHP tools that won't be a direct part of the PHP application but is nice to have revision control
  • Other raw files/source files that we want to keep revision controlled

Can I add a subfolder under trunk for the application itself -- "app" -- and other subfolders for files that never will be deployed/in production? Or is there other and better ways of solving this?


Solution

  • For something like you described, it's typical that every app/project/tool/component/thingie gets its own directory, with its own trunk/tags/branches under that.

    /main-app/trunk
    /main-app/tags
    /main-app/branches
    /small-tool-1/trunk
    /small-tool-1/tags
    /small-tool-1/branches
    /small-tool-2/trunk
    /small-tool-2/tags
    /small-tool-2/branches
    

    You can read more in the online book Version Control with Subversion.