svn


checkout: -bash-3.2$ svn --username eric.thrane co https://versions.ligo.org/svn/matappsproto/packages/stochastic/trunk/lib/

editor: export SVN_EDITOR="emacs -nw"
commit: svn ci file
update: svn update
status: svn status
restore an old version: svn update -r 9827 load_injection.m

browse stamp svn, DAC svn
How do I check out a file I found using the browser?
If, for example, you want to svn check out this directory,
https://trac.ligo.caltech.edu/dac/browser/hwinj/hwinjections.bib
Then, enter the command,
svn --username albert.einstein co https://svn.ligo.caltech.edu/svn/dac/hwinj/hwinjections.bib

How do I get the url of the current svn repo?
svn info

When was this svn repository last edited?
svn log | head

How to "tag" something in svn:
svn mkdir https://ligo-vcs.phys.uwm.edu/svn/matapps/packages/stochastic/tags/stamp_v1
svn copy https://ligo-vcs.phys.uwm.edu/svn/matapps/packages/stochastic/trunk/stamp/src https://ligo-vcs.phys.uwm.edu/svn/matapps/packages/stochastic/tags/stamp_v1/
or more simply:
svn copy cluster_search/ https://ligo-vcs.phys.uwm.edu/svn/matapps/packages/stochastic/tags/stamp_v1/

resolve conflicts: (force commit)
error: svn: Aborting commit: '/mnt/zfs2/ethrane/matapps/stamp/radon_search' remains in conflict
solution:
svn resolve --accept=working radon_search
svn commit

setting up your own svn repository
These instructions will help you create a repository that can be accessed by users who already have access to a common server.
1. make sure svn is installed by typing: which svn
2. svnadmin create ~/myrepository
3. uncomment out the following lines in ~/myrepository/conf/svnserve.conf:
anon-access = none
auth-access = write
password-db = passwd
4. create usernames and passwords by editing ~/myrepository/conf/passwd to include the following line:
exampleuser = examplepassword
5. create a directory for your new project:
svn mkdir file:///write_out_the_full_path/myrepository/project_dir
6. put a test file in your repository:
svn import hello_world.txt ~/myrepository/project_dir/
7. run the svn server daemon: svnserve -d
8. to check out a copy of the repository (from the server where you have created the repository):
svn co svn://username@hostname/write_out_the_full_path/myrepository/projec_dir

An alernative to setting up an svn repository for small projects is just to use Dropbox. This can be a fast and easy solution if you want to grant access to people that do not all use a common server. However, there is no version control, so everyone has to be careful to back up their work.

FAQ

I checked out a directory within svn a long time ago, and I now I can't remember the full path. Where can I find this information?
Look in your directory at .svn/entries.  Near the top of the file there will be a line like this
  https://ligo-vcs.phys.uwm.edu/svn/matapps/packages/stochastic/trunk/PreProcessing
that shows the full path, (in this case: /matapps/packages/stochastic/trunk/PreProcessing).

I began to svn check out a big repository, but then svn died. How do I resume the check out?
Just reuse the original svn co command and it should pick up where it left off.

Back to Resources