Difference between revisions of "Hints for Using SVN to collaborate on school projects"

From CDOT Wiki
Jump to: navigation, search
(Directory Structure)
Line 29: Line 29:
 
</pre></big>
 
</pre></big>
  
=== Branches ===
+
==== Branches ====
 
* '''Branches''' is a common place for all team members' workspaces.  
 
* '''Branches''' is a common place for all team members' workspaces.  
 
* Each team member should create a home directory or '''workspace''' (member-id1, member-id2,...) for his own development tasks in branches.  
 
* Each team member should create a home directory or '''workspace''' (member-id1, member-id2,...) for his own development tasks in branches.  
 
* The team-member's workspace is then divided in several directories (workspaces) during the development of the project. These workspaces(Task1, Task2, ...) are usually copies of the '''trunk''' to be worked on.
 
* The team-member's workspace is then divided in several directories (workspaces) during the development of the project. These workspaces(Task1, Task2, ...) are usually copies of the '''trunk''' to be worked on.
 
*: ''These directories(Task1, Task2,...) are called branches of trunk. Also Note that when the word '''branch''' is used as a verb, it means copying the whole trunk into a subdirectory, either in '''Branches''' or '''tags'''.
 
*: ''These directories(Task1, Task2,...) are called branches of trunk. Also Note that when the word '''branch''' is used as a verb, it means copying the whole trunk into a subdirectory, either in '''Branches''' or '''tags'''.
=== Tags ===
+
==== Tags ====
 
* '''tags''' directory holds '''copies''' of successful stages of '''trunk''' during development. (''Also called as '''Milestones''''')
 
* '''tags''' directory holds '''copies''' of successful stages of '''trunk''' during development. (''Also called as '''Milestones''''')
 
* '''tags''' are never modified or edited. ''You may branch the a directory of tag into branches under a workspace and then modify it and apply the changes back to trunk, but the contents of a tag should never change''
 
* '''tags''' are never modified or edited. ''You may branch the a directory of tag into branches under a workspace and then modify it and apply the changes back to trunk, but the contents of a tag should never change''
Line 42: Line 42:
 
** When a release is due, always the latest version of that realease will be marked.  
 
** When a release is due, always the latest version of that realease will be marked.  
 
**: ''If R0.3 is due, and in '''tags''' R0.3, R0.31, R0.32 are present, then R0.32 will be marked
 
**: ''If R0.3 is due, and in '''tags''' R0.3, R0.31, R0.32 are present, then R0.32 will be marked
 +
==== Trunk ====
 +
* '''trunk''' IS the project at current staged, '''complied and run-able'''
 +
* '''trunk''' should never be at a non-complied stage. (usually trunk should be the exact copy as (or better than) the last version in tags).
 +
* If only one project is done within this repository, then trunk has no project level subdirectory and is the root of the project, otherwise, trunk is divided into several directories for each project to be version-controlled.
 +
*: ''In this case Tags should also be divided to the exact same project directories as trunk''
 +
  
 
== Starting the Project On SVN ==
 
== Starting the Project On SVN ==

Revision as of 14:57, 27 September 2010

Under construction

SVN Basics

Directory Structure

|-- Team_Repository_Account
  +--branches
  | +-- member-id1  <-- this is the student's home in branches
  |   +-- Task1
  |   +-- Task2
  | +-- member-id2
  |   +-- Task1
  |   +-- Task2
  |   +-- Task3
  | +-- member-id3
  |   +-- Task1
  +--tags
  | +-- R0.1
  | +-- R0.11
  | +-- R0.2
  | +-- R0.21
  | +-- ...
  | +-- R0.5
  | +-- ...
  | +-- R1.0
  | +-- R1.1
  | +-- R1.2
  | +-- R1.21
  +--trunk

Branches

  • Branches is a common place for all team members' workspaces.
  • Each team member should create a home directory or workspace (member-id1, member-id2,...) for his own development tasks in branches.
  • The team-member's workspace is then divided in several directories (workspaces) during the development of the project. These workspaces(Task1, Task2, ...) are usually copies of the trunk to be worked on.
    These directories(Task1, Task2,...) are called branches of trunk. Also Note that when the word branch is used as a verb, it means copying the whole trunk into a subdirectory, either in Branches or tags.

Tags

  • tags directory holds copies of successful stages of trunk during development. (Also called as Milestones)
  • tags are never modified or edited. You may branch the a directory of tag into branches under a workspace and then modify it and apply the changes back to trunk, but the contents of a tag should never change
  • The action of branching the trunk into tags is often referred to as a release.
  • Most importantly, we use the tags directory to submit the work to the professor to be marked. Your professor will specify what are the requirements of a release.
    • A release is usual tagged by a version like: R0.1, Prj0.2, As1_1.0
    • When a release is due, always the latest version of that realease will be marked.
      If R0.3 is due, and in tags R0.3, R0.31, R0.32 are present, then R0.32 will be marked

Trunk

  • trunk IS the project at current staged, complied and run-able
  • trunk should never be at a non-complied stage. (usually trunk should be the exact copy as (or better than) the last version in tags).
  • If only one project is done within this repository, then trunk has no project level subdirectory and is the root of the project, otherwise, trunk is divided into several directories for each project to be version-controlled.
    In this case Tags should also be divided to the exact same project directories as trunk


Starting the Project On SVN

There are two possibilities to initiate a project:

  1. Start the project from zero
    This is when you create a project and start the code yourself
  2. Start the project by continuing an existing work
    This is when you have the project started by someone else (i.e. Professor, other team-members, etc.) and you want to copy the work into your own repository and continue the work.

Start the Project from zero