HowTo Quickly Get A Project Started With Subversion

From NST Wiki
Jump to: navigation, search

This HowTo will show by example how to quickly started with a new Subversion project once you have created a Subversion repository using the NST WUI.

  1. Use the NST WUI menu and navigate to the "Subversion Manager" page.
  2. Create a new Subversion repository (Ex: "silver") with description.
  3. Create a Subversion user using Action: "U" (Ex: "user1").
  4. Go to the client system that has both a "Subversion" client installed and network access to the NST system where you created the "Subversion" repository in "Step: 2" (***Note: Most Operating Systems (i.e., Windows (QSvn), Linux, UNIX, BSD, Solaris and Mac OS X) support either a command line or GUI based "Subversion" client.)
  5. Create a top level directory where you want to build out your project (Ex: "/opt/development") and change directory (cd) to the it.
[root@probe-eth0 ~]# mkdir -p /opt/development
[root@probe-eth0 ~]# cd /opt/development
[root@probe-eth0 development]#
  1. Check out your project (Ex: "silver") now for the first time (***Note: See this guide: "HowTo Configure Apache SSL For davfs, subversion, etc." if you experience SSL Handshake errors when connecting to the NST Apache Web Server using the HTTPS protocol.):
[root@probe-eth0 development]# svn --username user1 checkout
Error validating server certificate for '':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname:
 - Valid: from Wed, 31 Mar 2010 15:06:20 GMT until Sat, 28 Mar 2020 15:06:20 GMT
 - Issuer: My New Company, Albany, New York, US
 - Fingerprint: d5:8a:ff:7a:ca:a4:7d:f3:aa:3a:a1:db:9e:ff:c6:46:5f:53:b7:b4
(R)eject, accept (t)emporarily or accept (p)ermanently? p
Authentication realm: <> Subversion Repository (silver)
Password for 'user1':

ATTENTION!  Your password for authentication realm:

   <> Subversion Repository (silver)

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.
You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
Store password unencrypted (yes/no)? yes
Checked out revision 0.
[root@probe-eth0 development]#
  1. At this point your project (Ex: "silver") is now checked out and ready to be used under the control of Subversion.
[root@probe-eth0 development]# ls -al
total 12
drwxr-xr-x  3 root root 4096 2010-05-27 09:14 .
drwxr-xr-x. 4 root root 4096 2010-05-27 09:02 ..
drwxr-xr-x  3 root root 4096 2010-05-27 09:14 silver
  1. Change directory to your project (Ex: "silver") and use Subversion for adding and committing your source code.
[root@probe-eth0 development]# cd silver
[root@probe-eth0 silver]# ls -al
total 12
drwxr-xr-x 3 root root 4096 2010-05-27 09:14 .
drwxr-xr-x 3 root root 4096 2010-05-27 09:14 ..
drwxr-xr-x 6 root root 4096 2010-05-27 09:14 .svn
  1. Example "add", "commit", "update" and "list" of a project with source code.
[root@probe-eth0 silver]# mkdir -p src docs lib
[root@probe-eth0 silver]# touch src/silver.c
[root@probe-eth0 silver]# svn add src docs lib  
A         src
A         src/silver.c
A         lib
A         docs
[root@probe-eth0 silver]# svn commit -m "Initial release of code..."
Adding         docs
Adding         lib
Adding         src
Adding         src/silver.c
Transmitting file data .
Committed revision 1.
[root@probe-eth0 silver]# svn update
At revision 1.
[root@probe-eth0 silver]# svn -v ls -R
     1 user1                 May 27 13:38 docs/
     1 user1                 May 27 13:38 lib/
     1 user1                 May 27 13:38 src/
     1 user1               0 May 27 13:38 src/silver.c
[root@probe-eth0 silver]#