documentation:lab46svn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
documentation:lab46svn [2011/10/20 11:33] – [Step 1: Setting up your repository] mcooper6 | documentation:lab46svn [2013/02/01 09:16] (current) – [Step 1: Setting up your repository] wedge | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP round box> | ||
+ | \\ | ||
+ | <WRAP centeralign bigger>< | ||
+ | <WRAP muchbigger> | ||
+ | </ | ||
+ | </ | ||
+ | ~~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:// | ||
+ | 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, | ||
+ | |||
+ | 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. | ||
+ | |||
+ | =====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: | ||
+ | </ | ||
+ | |||
+ | =====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 "< | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ svn import src http:// | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | |||
+ | Committed revision 1. | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | To avoid some problems, you can move your existing **src** directory out of the way: | ||
+ | <cli> | ||
+ | lab46:~$ mv src src.bak | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | Next, we'll **check out** our repository: | ||
+ | <cli> | ||
+ | lab46:~$ svn co http:// | ||
+ | A src/cprog | ||
+ | A src/submit | ||
+ | A src/ | ||
+ | Checked out revision 1. | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | =====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 "< | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ svn import src http:// | ||
+ | Adding | ||
+ | Adding | ||
+ | Adding | ||
+ | |||
+ | Committed revision 1. | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | To avoid some problems, you can move your existing **src** directory out of the way: | ||
+ | <cli> | ||
+ | lab46:~$ mv src src.bak | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | Next, we'll **check out** our repository: | ||
+ | <cli> | ||
+ | lab46:~$ svn co http:// | ||
+ | A src/cprog | ||
+ | A src/submit | ||
+ | A src/ | ||
+ | Checked out revision 1. | ||
+ | lab46: | ||
+ | </ |