Short SVN Introduction
SVN Home Page
The repository is already in place at
No manual changes to this directory (via filesystem)!! By using the svn command you might do almost anything.
You always work on a working copy.
To get one working copy, go to your own home directory and type:
svn co file:///home/group/propipe/svnroot propipe
co is a shortcut for checkout. It exports all files of our project from the repository. This is done only the first time or when you have no files there, yet.
This only works in the departments, from where you direct access to the department's filesystem. From outside the department you have access via ssh. From a unix-console type:
svn co svn+ssh://email@example.com/home/group/propipe/svnroot propipe
This tells svn to login by ssh and do somehow the checkout. Replace "ehmke" by your own login. It will ask for your password, unless you have installed public-key authentication for your ssh login.
After you have done the first checkout, you do not need to include anymore the path to the repository for the following commands (it is stored somewhere in the .svn directory in your local copy).
Before you start working on something, you always run an update. This makes sure, that your local copy gets all changes done since your last update. This requires however an previously checked out working copy.
Go below the propipe directory of your local copy and type:
This affects only the files in the current path and below. If you for instance go to the propipe/doc directory and make an update, only the doc directory and its files will move to the newest revision.
You probably have already noticed, that svn always says something about a revision. This is like the commit-number. It allows you also to easily revert files to an earlier number. If you want to see for instance, how the first version of test.txt looked like, go to propipe/doc and type:
svn up test.txt -r 1
This reverts this file to the first revision.
No it's time to change something. Edit test.txt and type
svn ci -m "MESSAGE"
Replace MESSAGE by a short description about your changes.
If there was an error message, probably a conlict occured. This will happen to everyone of us earlier or later and just means, that someone modified the same file at the same time, but checked in earlier. So your local copy became old, while you were making your changes.
In this case you have first to do an UPDATE again. Then try to COMMIT again and svn will tell you, if and where there are conflicts.
For conflict resolving please read:
This is a short part of the SVN-book and explains conflict solving very nicely.
Basically you have somehow to put the stuff between the conflict markers "<<<<", "====" and ">>>>" together, but in a way, which does not break the whole thing. If you get confused, you always have the .mine, .r?, .r?+1 files... (just read the part of the book).
After that, you run
svn resolved CONFLICTINGFILE
and a COMMIT on that file
You might also want to create new files. When you have created a new file or directory, which you want to be included in the version controlling, the files first have to be in a proper place in your SVN working copy. Then run
svn add PATHORNEWFILES
This adds these files to version control, but does not commit them. Thus you have to run a COMMIT afterwards.
Above are the most import features. Others which can be interesting could be e.g. svn diff, svn delete
The SVN-Book has also some section, which describe the subcommands:
If anyone, wants to write/update this documentation, please feel free to do. Please note, that also the webpage should be handled over svn. That means, edit your local copy and check it in. /home/group/propipe/update-webpage.sh has to be runned afterwards, and the webpage is in place.
Maybe you have already noticed, that the webpage is available under the webpage directory in your local copy after checkout.