User Tools

Site Tools


documentation:lab46svn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
documentation:lab46svn [2011/10/20 11:33]
mcooper6 [Step 1: Setting up your repository]
documentation:lab46svn [2013/02/01 09:16] (current)
wedge [Step 1: Setting up your repository]
Line 1: Line 1:
 +<WRAP round box>
 +\\ 
 +<WRAP centeralign bigger><​WRAP bigger fgred>​Corning Community College</​WRAP>​
 +<WRAP muchbigger>​Subversion on Lab46</​WRAP> ​
 +</​WRAP>​
 +</​WRAP>​
 +~~TOC~~
 +======Setting up your Subversion Repository======
 +A good place to stop before beginning this task would be to check out the first 2 chapters of the free [[http://​svnbook.red-bean.com | "​Version Control With Subversion"​ by Ben Collins-Sussman,​ Brian W. Fitzpatrick & C. Michael Pilato]] (an O'​Reilly book that is well worth familiarizing yourself with).
  
 +Subversion, and other version control systems, allow you to version (or snapshot) instances of files, much as one would manually file dated versions of documents, that can be referenced, retrieved, and compared with other versions. Version control is particularly important in program development as many thousands of changes take place in any code base.
 +
 +It is prudent to have a capability to "step back in time" should some modifications prove unsuccessful,​ to avoid needless data re-entry and effectively move forward.
 +
 +What we are going to do now is initialize your personal Lab46 Subversion repository- a resource that each user on Lab46 receives, and can be used for an array of purposes, far beyond the requirements of any class activities you may encounter. ​ Familiarize yourself with this important development tool, so that you can effectively use it into the future.
 +
 +=====Step 0: Create some files for our repository=====
 +For the purposes of this tutorial, we'll create a special directory in which to store our source files. We'll call this directory **cprog**, and we'll want create it underneath our **~/src/** subdirectory.
 +
 +At the Lab46 prompt, do the following:
 +
 +<cli>
 +lab46:~$ mkdir -p src/cprog
 +lab46:​~$ ​
 +</​cli>​
 +
 +=====Step 1a: Setting up your repository (local on Lab46)=====
 +
 +To accomplish this, do the following at the Lab46 prompt (**substitute your username in place of the literal string "<​username>"​ in the example below**):
 +
 +<cli>
 +lab46:~$ svn import src http://​www/​svn/<​username>/​src -m "​Initial import"​
 +Adding ​     src/cprog
 +Adding ​     src/submit
 +Adding ​     src/​Makefile
 +
 +Committed revision 1.
 +lab46:​~$ ​
 +</​cli>​
 +
 +To avoid some problems, you can move your existing **src** directory out of the way:
 +<cli>
 +lab46:~$ mv src src.bak
 +lab46:​~$ ​
 +</​cli>​
 +
 +Next, we'll **check out** our repository:
 +<cli>
 +lab46:~$ svn co http://​www/​svn/<​username>/​src src
 +A    src/cprog
 +A    src/submit
 +A    src/​Makefile
 +Checked out revision 1.
 +lab46:​~$ ​
 +</​cli>​
 +
 +=====Step 1b: Setting up your repository (remotely)=====
 +
 +To accomplish this, do the following at the Lab46 prompt (**substitute your username in place of the literal string "<​username>"​ in the example below**):
 +
 +<cli>
 +lab46:~$ svn import src http://​lab46.corning-cc.edu/​svn/<​username>/​src -m "​Initial import"​
 +Adding ​     src/cprog
 +Adding ​     src/submit
 +Adding ​     src/​Makefile
 +
 +Committed revision 1.
 +lab46:​~$ ​
 +</​cli>​
 +
 +To avoid some problems, you can move your existing **src** directory out of the way:
 +<cli>
 +lab46:~$ mv src src.bak
 +lab46:​~$ ​
 +</​cli>​
 +
 +Next, we'll **check out** our repository:
 +<cli>
 +lab46:~$ svn co http://​lab46.corning-cc.edu/​svn/<​username>/​src src
 +A    src/cprog
 +A    src/submit
 +A    src/​Makefile
 +Checked out revision 1.
 +lab46:​~$ ​
 +</​cli>​
documentation/lab46svn.txt · Last modified: 2013/02/01 09:16 by wedge