SVN Usage

From ScorecWiki

Revision as of 15:30, 25 August 2010; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

General

  • Get a redmine account:
    • Send an email to help [AT] scorec.rpi.edu requesting the creation of a new redmine account.
    • cc Fabien Delalondre, delalf [AT] scorec.rpi.edu.
    • Login redmine.scorec.rpi.edu. Once you will have logged in, your name will be in the data base and project managers will be able to add you up as a member.
  • Ask to be added as a member of a project by sending an email to the corresponding project manager.
  • Ask the project manager to be granted the right member permission. As for now, only members of a project that have "commiter" role can checkout and commit from/to svn. If you do not have such permission, contact the project manager
  • Subscribe to the list of SVN update newsletter: https://lists.scorec.rpi.edu/mailman/listinfo

How to use svn properly

Once you are a member of a project with commiter permission, you can start interracting with the code and get it dowloaded in your local repository as follows:

  • To checkout the last version of your code: svn co --username YourUserName --password YourPassword
  • To check the version of your files: svn info
  • To synchronize your local version with the svn version (be careful, your local changes will be lost): svn update
  • To commit your local changes to the svn repository (if no new file needs to be added): svn commit NameOfTheFilesToBeCommit -m "Description of your commit. This should be accurate and be organized as follows: 1) Commit title, Commit description"
    • List the files you made your major changes to.
    • For each file with major changes list all functions you've changed.
    • Describe WHY you changed it and WHAT was the desired state of the function - don't simply write "improved performance" or "removed the bug" - it does not tell anything.
    • (Try to avoid) If you changed something but did not test it - WRITE it explicitly. It is ok to submit the revision without full testing if you specifically mention that the part you are submitting requires additional testing. If the changed part was finally tested and working, write about it in your next submission.
    • Try to do frequent updates, do not make lots of local copies and try o merge them then into the one to commit. You can always revert the changes you've made to your latest svn revision, but you might forget to include all the changes when you assemble the revision for commit from several ones.
    • Do not forget that you probably understand the most about the software component you are developing. Other people might not be able to understand your technical details. Try to provide high-level description of changes along with your technical stuff which is helpful for you in the future.
  • To commit a new file: First add the new file to svn by using: svn add NameOfYourFile. Once this command is executed, svn knows that a new file should exist but does not have any info related to that file. The next step is to commit your new file as previously described.
  • To create a new folder in your project: svn mkdir URL_ofYourNewFolder -m "Message describing what has been added to the project"

More Information

Personal tools