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

From CDOT Wiki
Jump to: navigation, search
(Merge your work back to trunk)
Line 1: Line 1:
 
 
{{OOP344 Index | 20121}}
 
{{OOP344 Index | 20121}}
==Checkout and prepare your team repository ==
+
==Checkout and prepare your team's repository ==
# create a directory for your repo on your local workstation. Usually, you do this only once on each workstation that you use for development.
+
# 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 (the repo directory)
+
# 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'''
 
#: using TortoiseSVN (or other GUI) right click on the directory and select '''SVN Checkout'''
#: enter the URL of the team repository and click OK
+
#: enter the URL of the repository and click OK
#: you should see the files being added to your local repo directory.  Click OK when completed.
+
#: you should see the files being added to your repo directory.  Click OK when completed.
#: you should now have a copy of the whole repo on your workstation.
+
#: you now have a copy of the whole repo on your local workstation.
# check that your local repo directory contains sub-directories named '''branches''', '''tags''', and '''trunk'''.  If not
+
# check that your repo directory contains sub-directories named '''branches''', '''tags''', and '''trunk'''.  If not
#: create these three sub-directories under the repo directory
+
#: 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)
 
#: 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 describing your change under Message, 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)
: ''you are now ready to create your own workspace''
+
''you are now ready to create your own workspace''
  
 
== Create your own workspace ==
 
== Create your own workspace ==
 
# create your own sub-directory under '''branches''' and name it using your seneca id
 
# 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)
 
#: 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 describing your change under Messages, and click OK) this will save your addition on the server  
+
#: 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'''
+
#: note that this sub-dir is referred as your ''workspace''
: ''you are now ready to start development''
+
''you are now ready to start development''
  
 
== Branch trunk for development ==
 
== Branch trunk for development ==
# '''branch''' the '''trunk''' of the repository into a sub-dir under your workspace, which is under branches
+
# '''branch''' the '''trunk''' of the repository into a new sub-directory under your workspace, which is under branches
 
#: Right-click on the '''trunk''' directory
 
#: Right-click on the '''trunk''' directory
 
#: Choose '''TortoiseSVN''' and click on '''branch/tag...'''
 
#: Choose '''TortoiseSVN''' and click on '''branch/tag...'''
 
#: Click on the [...] button to the right of "To URL:"
 
#: 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"
 
#: Click on the root directory, then on branches, then on your workspace, then press "OK"
#: Edit the URL created by adding a slash and the name that you are giving to your new sub-directory (a.k.a create a new directory)
 
 
#: Select a name for your new sub-directory that refers to your particular task (whatever you are going to work on)
 
#: 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"
 
#: Type in a log message that describes what you are doing and press "OK"
# update your repository to download to your local workstation the branch that you have created
+
# Right-click and select '''SVN Update''' to download the branch that you have created to your local workstation
: ''you are now ready to start working on your particular task''
+
''you are now ready to start working on your particular task''
  
 
== Start coding and complete your task==
 
== Start coding and complete your task==
Line 38: Line 37:
 
# test
 
# test
 
# compile
 
# compile
# commit (commit changes back to repo on server)
+
# commit (commit changes back to the repository on the server)
: ''you are now ready to merge your completed work with trunk on your local workstation''
+
''you are now ready to merge your completed work with trunk on your local workstation''
  
 
== Merge your work back to trunk==
 
== Merge your work back to trunk==
Line 49: Line 48:
  
 
== Test and commit trunk ==
 
== Test and commit trunk ==
# recompile and test the code in the merged trunk on your local workstation
+
# recompile and test the merged code in '''trunk''' under your repo directory
 
# update the trunk status on wiki team page to  '''committing'''
 
# update the trunk status on wiki team page to  '''committing'''
 
#: if the status is already committing wait for your other team member to finish their commit
 
#: if the status is already committing wait for your other team member to finish their commit
Line 56: Line 55:
 
# commit again
 
# commit again
 
# update trunk status on wiki team page to ''' committed'''
 
# update trunk status on wiki team page to ''' committed'''
: ''you are now ready to start working on your next task''
+
''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]]

Revision as of 20:38, 19 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)

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 and select SVN Update to download the branch that you have created to your local workstation

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 with trunk on your local workstation

Merge your work back to trunk

  1. check and make sure that you have committed your work - commit again if uncertain
  2. right click on trunk and select TortoiseSVN/merge
  3. select your branch
  4. merge using default settings and resolve possible conficts
you are now ready to test your merged trunk and commit your work to the server

Test and commit trunk

  1. recompile and test the merged code in trunk under your repo directory
  2. update the trunk status on wiki team 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
  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