Subversion
From Emergent
Subversion (svn) is flexible revision control software that allows you to track changes between different versions of your valuable data. If you are writing a paper, editing files, creating a model, writing software or a slew of other things, you won't regret having it in your repository. The two ways to get at the docs are svn help and the official subversion book (warning: link to entire book on a page)
Everything you do in subversion is versioned. It's practically impossible to mess something up in a way that it can't be undone, including svn remove ./*;svn commit -m "" -- so Don't Panic!
Contents |
Installation
First, see if the subversion client is installed:
> svn --version
If it is not installed, then you can try:
> yum install subversion > # OR # > apt-get install subversion
If it's not, Subversion keeps an extensive list of the operating systems they support and packages for them. You may also want to use a graphical environment, such as eSvn, although the basic commands for checking out and updating source code from the command line are very simple (and probably much easier than using a gui-based system.) Here are a few options we have used.
| Package | Min Version | Link |
|---|---|---|
| Subversion client (svn) | 1.3 | http://subversion.tigris.org/ |
| eSvn graphical Subversion client | (latest) | http://esvn.umputun.com/ |
| kdesvn | (latest) | http://www.google.com/search?q=kdesvn |
Fetch the Emergent source
If you would simply like read-only access to the svn repository, use the following credentials: username: anonymous password: emergent
If you want to do active development (check in changes) please email us and ask for your own username/password.
This will download the software from our server to ~/emergent. It should take 5-10 minutes.
Linux and Mac
Download the emergent source code
This will download the latest source code to ~/emergent. Do the following logged in as the regular user, not the root user:
svn checkout --username anonymous --password emergent http://grey.colorado.edu/svn/emergent/emergent/trunk ~/emergent
Windows
Open a cmd window -- you should be at your user folder, then type (all on one line):
svn checkout --username anonymous --password emergent http://grey.colorado.edu/svn/emergent/emergent/trunk emergent/trunk
Install autotools (required for compiling Emergent)
Do the following as root or using sudo:
apt-get install autoconf automake libtool # ubuntu/debian # OR # yum install autoconf automake libtool # fedora # OR # port install autoconf automake libtool # mac
Basic file operations
Assuming you have created and checked out a copy of your repository named ~/myRepo,
Update your local copy with changes in the repository (always do this before committing!)
svn update
Commit all changes to all files in the repository, with -m "A commit message that describes the change.":
svn commit -m "removed abstracts"
Commit a change to one file in the repository
svn commit ccnlab.bib -m "added Block96"
Commit all files in the repository:
svn commit -m "added Block96"
View the history of a folder/file, where r126 is the revision:
> svn log ccnlab.bib | less r126 | oreilly | 2005-10-07 14:17:19 -0600 (Fri, 07 Oct 2005) | 1 line Randy: Amy's abs.*.bib merged, up to 13,147 refs!
Delete a file
svn delete file.name -m "no longer needed"
Undo that change, including deleted files/folders! (whoops!)
svn merge -r 127:126 -m "undoing accidentally deleted file"- Where 127 is the revision where you deleted the file, and 126 is the revision before (revisions are found through
svn logabove).
- Where 127 is the revision where you deleted the file, and 126 is the revision before (revisions are found through
See Subversion admin for administrative notes (for core developers only).
