SubVersioN

From InteractivePrototyping

Jump to: navigation, search

SubVersioN (SVN) is a code repository. It keeps your code on a remote server, then allows you to checkout a working copy to your local drive. You work on your working copy (naturally), then commit your changes to the repository. When you want to get changes in the repository made by someone else, or changes you made on a different machine's working copy that you committed, you must update your working copy. Make sure you have the Subclipse plugin installed first.

Prepare SVN on Eclipse

  1. Open Eclipse
  2. Make sure you are using the Pydev "perspective"
    • Look at the top right corner of the interface.
    • Click the button with a window and plus sign
    • Click "Other..."
    • Scroll down and select Pydev
  3. If you get a dialog asking for the Python interpreter, do the following:
    • Open a new Terminal window
    • Type "which python". This will show you the Python path.
    • In the Eclipse window, click add and navigate to python
  4. Select File--> New--> Pydev Project
  5. Enter any project name you like
  6. Click Finish
  7. Right click (or Control click) on your new project.
  8. Select New--> Pydev Module
  9. Name the module whatever you like.
    • Don't worry about the package.
    • Also, don't worry about adding a ".py" to the end of the module. Eclipse will create this for you.
  10. Open your new module and write some code
    • Try:
    • print "Hello world!"
  11. Save the module
  12. Right click on you project again and go all the way down to Team--> Share Project
  13. Select "SVN" and click Next
  14. For the URL, enter: "http://svn.interactiveprototyping.org/spring2010" and click Next
  15. Select "Use specified folder name" and enter something like:
    • "yourName/yourProjectName"
  16. Fill in the commit comment with some note about your project.
  17. Click "Finish". Things will happen in the background.
  18. Click "OK" on the next window that pops up.
  19. You're ready with SVN. From here on out:
    • Right click and go to "Team--> Commit..." when you want to "upload" your changes to the remote server.
      • Be sure to fill in a helpful comment and check off any new files you want to add.
    • Right click and go to "Team--> Update" when you want to "download" changes you made on another computer or that someone else made on your files.