Difference between revisions of "Subversion"

From GeodesyLab
Jump to: navigation, search
(General set-up cycle)
Line 18: Line 18:
  
 
===General set-up cycle===
 
===General set-up cycle===
====Setting up a repository====
+
====Setting up a new project-root====
====Repository layout====
+
- login to fairweather <br/>
====Intial data import====
+
- cd to $SVNREPO <br/>
 +
- execute 'svnadmin create <PROJECT-NAME>' <br/>
 +
- exit
 +
 
 +
====Repository layout & initial data import====
 +
The repository layout is totally up to you. If you want to make versions available only based on version number, that's fine. However, for a more sophisticated use, the subversion team recommends the following layout:
 +
<pre>
 +
$SVNREPO
 +
  <PROJECT-NAME>/
 +
      trunk/
 +
      tags/
 +
      branches/
 +
  <my project>/
 +
      trunk/
 +
      tags/
 +
      branches/
 +
  ...
 +
</pre>
 +
 
 +
The <code>trunk</code> directory will hold the initial project data. <code>tags</code> and <code>branches</code> are explained below.
 +
 
 +
- 'mkdir tmpdir' <br/>
 +
- optional: 'mkdir tmpdir/trunk' etc.<br/>
 +
- copy ('''not''' move!) your project files / directories etc. into tmpdir/trunk <br/>
 +
- 'cd tmpdir' <br/>
 +
- 'svn import . svn+ssh://username@svn.gps.alaska.edu/<PROJECT-NAME> -m "initial import" ' <br/>
 +
 
 +
You will be asked for your password. The long list of characters that pops up on the screen should end with something like:
 +
 
 +
<pre>
 +
Committed revision 1.
 +
</pre>
 +
 
 +
- 'cd ..' <br/>
 +
- 'rm -rf tmpdir' <br/>
 +
 
 +
Your project is now accessible by the world! yeah.
  
 
===General work cycle===
 
===General work cycle===

Revision as of 20:32, 24 April 2008

What's that all about?

The idea is very old and popular in software development: have somebody keep track of changes you make to a product and hence remain able to go back in history...

The idea behind our set up is to allow for anonymous public access of specific products (parts) which are simultaneously changed/updated/further developed. So keep in mind that the initial set-up gives the whole world reading access to your project. If you want to share only parts of it, additional steps must be taken. Those are described at the very end of this page.

Existing Geodesy-Lab projects and anonymous access

Anonymous access is read-only. Currently any existing project can be retrieved using:

svn checkout svn://svn.gps.alaska.edu/<PROJECT-NAME>

Pre-requisites

- unix account at geodesy lab
- member of group 'svn'
- local installation of a subversion client (comes with most linux dists, check http://tortoisesvn.tigris.org/ for a (graphical) windows client)

General set-up cycle

Setting up a new project-root

- login to fairweather
- cd to $SVNREPO
- execute 'svnadmin create <PROJECT-NAME>'
- exit

Repository layout & initial data import

The repository layout is totally up to you. If you want to make versions available only based on version number, that's fine. However, for a more sophisticated use, the subversion team recommends the following layout:

$SVNREPO
   <PROJECT-NAME>/
      trunk/
      tags/
      branches/
   <my project>/
      trunk/
      tags/
      branches/
   ...

The trunk directory will hold the initial project data. tags and branches are explained below.

- 'mkdir tmpdir'
- optional: 'mkdir tmpdir/trunk' etc.
- copy (not move!) your project files / directories etc. into tmpdir/trunk
- 'cd tmpdir'
- 'svn import . svn+ssh://username@svn.gps.alaska.edu/<PROJECT-NAME> -m "initial import" '

You will be asked for your password. The long list of characters that pops up on the screen should end with something like:

Committed revision 1.

- 'cd ..'
- 'rm -rf tmpdir'

Your project is now accessible by the world! yeah.

General work cycle

Share only parts of your work

http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.serverconfig.svnserve