Difference between revisions of "Development and submission steps using SVN - OOP344 20121"

From CDOT Wiki
Jump to: navigation, search
(Checkout team repository)
(Checkout and prepare your team's repository)
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{OOP344 Index | 20121}}
 +
==Checkout and prepare your team's repository ==
 +
# create a directory on your local workstation. This directory will hold your copy of the repository.  Usually, you do this only once on each workstation that you are using for development.
 +
# checkout the repository into the directory that you have created (your ''repo directory'')
 +
#: using TortoiseSVN (or other GUI) right click on the directory and select '''SVN Checkout'''
 +
#: enter the URL of the repository and click OK
 +
#: you should see the files being added to your repo directory.  Click OK when completed.
 +
#: you now have a copy of the whole repo on your local workstation.
 +
# check that your repo directory contains sub-directories named '''branches''', '''tags''', and '''trunk'''.  If not
 +
#: create these three sub-directories directly under the repo directory
 +
#: add them to the repository (right-click on the repo directory, select '''TortoiseSVN/Add''', and click OK)
 +
#: commit them to the repo (right-click on the repo directory, select '''SVN Commit''', add a note under Message describing your change, and click OK)
 +
# note that you may use the operating system to rename your repo directory as you do with any other directory, BUT if you wish to rename any versioned directory within your repo directory, you should use '''TortoiseSVN/Rename''' - you should not use the operating system for renaming a versioned directory or file
 +
''you are now ready to create your own workspace''
  
 +
== Create your own workspace ==
 +
# create your own sub-directory under '''branches''' and name it using your seneca id
 +
#: add this sub-directory to the repository (right click on the sub-dir, select '''TortoiseSVN/Add''', and click OK)
 +
#: commit your addition to the repo (right click on the sub-dir, select '''SVN Commit''', add a note under Messages describing your change, and click OK) this will save your addition on the repository server
 +
#: note that this sub-dir is referred as your ''workspace''
 +
''you are now ready to start development''
  
{{OOP344 Index | 20121}}
+
== Branch trunk for development ==
==Checkout team repository ==
+
# '''branch''' the '''trunk''' of the repository into a new sub-directory under your workspace, which is under '''branches'''
# create a directory on the local machine (you usually do this only once on each workstation for development)
+
#: Right-click on the '''trunk''' directory
# checkout the repository into this directory
+
#: Choose '''TortoiseSVN''' and click on '''branch/tag...'''
#: using the GUI (TortoiseSVN) right click on the directory and select '''SVN Checkout'''
+
#: Click on the [...] button to the right of "To URL:"
#: you should now have a copy of the whole repo on your workstation.
+
#: Click on the root directory, then on branches, then on your workspace, then press "OK"
 +
#: Select a name for your new sub-directory that refers to your particular task (whatever you are going to work on)
 +
#: Edit the URL created by adding a slash and the name of your new sub-directory (a.k.a create a new directory)
 +
#: Type in a log message that describes what you are doing and press "OK"
 +
# Right-click on your workspace and select '''SVN Update''' to download the branch that you have created
 +
''you are now ready to start working on your particular task''
  
== Create your workspace ==
+
== Start coding and complete your task==
# create a directory in branches using your seneca id
 
#: add this directory to the repository (right click on the dir and select '''TortoiseSVN/add)
 
#: commit this dir to repo so it will be saved on the server (right click on the dir and select '''SVN Commit'''
 
#: note that this dir is referred as your '''workspace'''
 
== branch the trunk for development ==
 
* branch the trunk into a dir under your workspace in branches
 
*: 1. Right-click on trunk directory
 
*: 2. Choose TortoiseSVN and click on branch/tag...
 
*: 3. Click on the [...] button on the right under "To URL:"
 
*: 4. Go to the root directory, then branches directory, click on your workspace, then press "OK"
 
*: 5. Edit the URL created by adding a slash and a directory name you want (a.k.a create a new directory)
 
*: 6. The directory name should be a name of your work (whatever you are going to work on)
 
*: 7. Type in the log message and press "OK"
 
* update your repository to get the branch on your local machine
 
 
 
== start coding and complete the task==
 
 
# code
 
# code
 
# compile
 
# compile
 
# test
 
# test
 
# compile
 
# compile
# commit (commit changes back to repo on server)
+
# commit (commit changes back to the repository on the server)
== merge the branch back to trunk==
+
''you are now ready to merge your completed work from your own workspace with trunk''
# make sure branch is commited
+
 
# right click on trunk and select TortoiseSVN/merge
+
== Merge your work back to trunk==
# select your branch
+
# make sure that you have committed the work in your workspace to the repository server - commit again if uncertain
# merge by default settings and resolve possible conficts
+
# right click on '''trunk''' and select '''TortoiseSVN/merge'''
 +
# select reintegrate a branch and Click Next
 +
# select the workspace that you wish to merge, use default settings, and Click Next
 +
# click Test Merge and resolve possible conficts  
 +
# once test is successful, Click Merge
 +
''you are now ready to test your merged trunk (on your local workstation) and commit your merge to the server''
 +
 
 
== Test and commit trunk ==
 
== Test and commit trunk ==
# recompile and test merged trunk  
+
# recompile and test the merged code in '''trunk'''
# update trunk status on wiki team page to  '''commiting'''
+
# update the trunk status on your team's wiki page to  '''committing'''
#: if the status is already commiting wait for it to be done
+
#: if the status is already committing wait for your other team member to finish their commit
# commit trunk
+
# commit your merged trunk to the repository server
 +
#: Right-click on '''trunk''' and select '''SVN Commit'''
 
# resolve possible problems  
 
# resolve possible problems  
 
# commit again
 
# commit again
# update trunk status on wiki team page to ''' commited'''
+
# update trunk status on wiki team page to ''' committed'''
 +
''you are now ready to start working on your next task''
  
 
== Resources ==
 
== Resources ==
 
* [[Hints for Using SVN to collaborate on school projects]]
 
* [[Hints for Using SVN to collaborate on school projects]]

Latest revision as of 11:43, 26 January 2012


OOP344 | Weekly Schedule | Student List | Teams | Project | Student Resources

Checkout and prepare your team's repository

  1. create a directory on your local workstation. This directory will hold your copy of the repository. Usually, you do this only once on each workstation that you are using for development.
  2. checkout the repository into the directory that you have created (your repo directory)
    using TortoiseSVN (or other GUI) right click on the directory and select SVN Checkout
    enter the URL of the repository and click OK
    you should see the files being added to your repo directory. Click OK when completed.
    you now have a copy of the whole repo on your local workstation.
  3. check that your repo directory contains sub-directories named branches, tags, and trunk. If not
    create these three sub-directories directly under the repo directory
    add them to the repository (right-click on the repo directory, select TortoiseSVN/Add, and click OK)
    commit them to the repo (right-click on the repo directory, select SVN Commit, add a note under Message describing your change, and click OK)
  4. note that you may use the operating system to rename your repo directory as you do with any other directory, BUT if you wish to rename any versioned directory within your repo directory, you should use TortoiseSVN/Rename - you should not use the operating system for renaming a versioned directory or file

you are now ready to create your own workspace

Create your own workspace

  1. create your own sub-directory under branches and name it using your seneca id
    add this sub-directory to the repository (right click on the sub-dir, select TortoiseSVN/Add, and click OK)
    commit your addition to the repo (right click on the sub-dir, select SVN Commit, add a note under Messages describing your change, and click OK) this will save your addition on the repository server
    note that this sub-dir is referred as your workspace

you are now ready to start development

Branch trunk for development

  1. branch the trunk of the repository into a new sub-directory under your workspace, which is under branches
    Right-click on the trunk directory
    Choose TortoiseSVN and click on branch/tag...
    Click on the [...] button to the right of "To URL:"
    Click on the root directory, then on branches, then on your workspace, then press "OK"
    Select a name for your new sub-directory that refers to your particular task (whatever you are going to work on)
    Edit the URL created by adding a slash and the name of your new sub-directory (a.k.a create a new directory)
    Type in a log message that describes what you are doing and press "OK"
  2. Right-click on your workspace and select SVN Update to download the branch that you have created

you are now ready to start working on your particular task

Start coding and complete your task

  1. code
  2. compile
  3. test
  4. compile
  5. commit (commit changes back to the repository on the server)

you are now ready to merge your completed work from your own workspace with trunk

Merge your work back to trunk

  1. make sure that you have committed the work in your workspace to the repository server - commit again if uncertain
  2. right click on trunk and select TortoiseSVN/merge
  3. select reintegrate a branch and Click Next
  4. select the workspace that you wish to merge, use default settings, and Click Next
  5. click Test Merge and resolve possible conficts
  6. once test is successful, Click Merge

you are now ready to test your merged trunk (on your local workstation) and commit your merge to the server

Test and commit trunk

  1. recompile and test the merged code in trunk
  2. update the trunk status on your team's wiki page to committing
    if the status is already committing wait for your other team member to finish their commit
  3. commit your merged trunk to the repository server
    Right-click on trunk and select SVN Commit
  4. resolve possible problems
  5. commit again
  6. update trunk status on wiki team page to committed

you are now ready to start working on your next task

Resources