Showing newest posts with label Code Repository. Show older posts
Showing newest posts with label Code Repository. Show older posts

Wednesday, February 20, 2008

SVN Layout for My Django Project


django-site
|
------ trunk/
|
------ myproject/
| |
| ------ __init__.py
| |
| ------ initial_data.json
| |
| ------ manage.py
| |
| ------ settings.py
| |
| ------ urls.py
| |
| ------ views.py
| |
| ------ myapp1/
| | |
| | ------ __init__.py
| | |
| | ------ models.py
| | |
| | ------ views.py
| |
| ------ myapp2/
| | |
| | ------ __init__.py
| | |
| | ------ models.py
| | |
| | ------ views.py
| |
| ------ templatetags/
| |
| ------ __init__.py
| |
| ------ mytemplatetag.py
|
------ static/
| |
| ------ mediafiles/
|
------ templates/
|
------ admin/
| |
| ------ base_site.html
|
------ base.html


Note: since I serve my static content from a separate server dedicated to serving static content, I remove the folder from the mysite project but keep it within the same trunk. Also, moving the templates outside of the project and application code.

Replace 'myproject' with the actual project name and 'myapp' (both 1 and 2) with the actual application name!

UPDATED:
2008-11-22 -- Clarification
2008-12-22 -- Added Initial Data. See http://docs.djangoproject.com/en/dev/howto/initial-data/
2008-12-28 -- Added templatetags folder

Saturday, August 11, 2007

Free SVN Repository with Trac

I just found a free Subversion repository.

Give it a try and tell me what you think:
http://www.assembla.com

Saturday, July 7, 2007

SVN Structure

So, I am an SVN admin for my group at work and the questions the that come up over and over again are:

1) How do I structure my project in the repository; and,
2) What are the Branches, Tags and Trunk folders for?

Here is a basic diagram:



SVN Structure for Projects:


  • * /branches: This folder contains all official branches which hold the code being developed. Those branches happen after a software release, so that backporting of bugfixes from /trunk doesn't bring untested code.

  • * /braches/work: This folder contains working temporary branches. This is unstable code that is being developed before they are merged into /trunk. There is no naming convention for these folders. However, they should be given meaningful names. When done, please delete your working folder.

  • ** /tags: All production worthy software releases are tagged. That is, mark all revisions that are ready for a public release here with a tag.

  • *** /trunk: This is the folder where you 'good' working code is kept. When the work you've completed in the 'branches,' merger your code to the code in this folder.




-----
Commands to make a Software Release:
>> svn co -N https://url/path/to/project
>> svn up -N trunk branches tags
>> svn up project_name/branches project_name/tags
>> svn cp trunk project_name/branches/version_number
>> svn cp trunk project_name/tags/4.0.0



Feel free to download/copy the diagram should you want to use it for whatever reason.