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!
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.
|Subversion client (svn)||1.3||http://subversion.tigris.org/|
|eSvn graphical Subversion client||(latest)||http://esvn.umputun.com/|
Fetch the Emergent Source
If you would simply like read-only access to the svn repository, you can just check it out with no user credentials.
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.
IMPORTANT: it is strongly recommended that you sign up for the emergentdev-svn email list if you will be actively updating and compiling from source, as this will contain important announcements about the status of the svn repository -- sometimes the current release will not be suitable for regular use (though typically it is).
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:
Get the emergent source code using Subversion:
svn checkout https://grey.colorado.edu/svn/emergent/emergent/trunk ~/emergent
See Build for full details on what to do with the source!
Basic file operations
Assuming you have created and checked out a copy of your repository named
Update your local copy with changes in the repository (always do this before committing!)
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 log above).
Merge all changes in trunk into branch -- first cd into top of branch directory in local checkout:
svn merge http://grey.colorado.edu/svn/emergent/emergent/trunk .
See Subversion admin for administrative notes (for core developers only).