Child pages
  • Command line tools
Skip to end of metadata
Go to start of metadata

Getting started

To get started with Subversion, you have to make a checkout.

Checkout:
 svn checkout --username=USERNAME https://svn.oss.deltares.nl/repos/openearthtools/trunk/ openearthtools

This is the default "fully recursive" checkout command which is certainly not recommended for large repositories such as openearthrawdata since the trunk will grow beyond the storage of your computer. For large databases, use SVN and large repositories: Sparse checkout.

Frequently used commands

The two most important commands are SVN Update and SVN Commit. It is very important to use SVN update regularly, especially when you start working on a certain file. If this command is not used, it might be that someone else has been updating the file; which means that you are working in an older version of this file.

On the other hand, it is very important to use SVN Commit at the end of the day. This command uploads the les you have been working on, so all others will be able to work in the most recent versions. When you use SVN Commit, you should always write a log message in English. This message gives everyone the possibility to see what is changed. You can either commit one file or folder, or the entire tree.

SVN Update:

Assuming that you are in the path of your checkout, use:

 svn up 

or

 svn update 
Commit:
  • To get an overview of the files that you are about to commit, use:

     svn st 

or

 svn status 
  • The actual commit action is performed by the following command:

     svn ci -m"write your custom concise summary of your contribution here" 

Make sure that you provide a useful but concise message between the quotes (in English).

Add

A newly created file in your local file system is by default not under version control. A file that you want to bring under version control has to be added, meaning that you nominate the file to be uploaded on the next commit by:

 svn add FILENAME 
Delete

Locally deleting a file does not automatically mean that it is also deleted on the server. If the server does not know that the file should be deleted, it will see the file as locally missing, and will restore the file on the next update. By using the delete option of you SVN client, the file will be deleted locally and remember that it has to be deleted on the server during the next commit action. You can delete a file using:

 svn rm FILENAME 
Log

To get an overview of the activity on the server, the SVN log function can be used. The following command provides you all log messages, which could be a long list:

 svn log 

To limit the number of records (to e.g. 10), use:

 svn log -l 10 
Roll back revisions

this is primarily relevant for advanced users

To roll back the changes of one or more revisions into a new revision, the svn merge command can be used.
Here, we assume that the current (head) revision is 10812 and that we want to go back to the state of revision 10810. In addition, this example assumes that you are in the directory of your checkout where you want to apply the roll back.
First perform a dry run as a check to make sure that the roll back is in line with what you expect.

 svn merge --dry-run -r 10812:10810 . 

If you feel comfortable with the listed changes, apply the svn merge to your local working copy.

 svn merge -r 10812:10810 . 

Finally, commit the changes.

 svn ci -m"reverted to revision 10810" 

The committed revision will be 10813 now, practically being identical to 10810.

Restore a deleted directory remotely

 this is primarily relevant for advanced users

 

If an earlier deleted directory should be restored, there is an easy way to do that remotely (so without making a checkout first) as follows:

svn cp https://<repos-URL>/<parent-path>/<directory-to-restore>@<revision>  https://<repos-URL>/<parent-path>