Difference between revisions of "Subversion Notes"

From NST Wiki
Jump to navigationJump to search
(Status)
(Update ~/.subversion/config)
Line 22: Line 22:
 
  [pkb@sprint ~]$  
 
  [pkb@sprint ~]$  
  
== Update ~/.subversion/config ==
+
== gnome-keyring ==
  
Subversion might complain about needing to store passwords in a ''unencrypted'' form. I've found that I can prevent this complaint by enabling the ''gnome-keyring'' as a Subversion key store. To do this, edit the file '''~/.subversion/config''' and search on the string ''password-stores''. Most likely this will be commented out in your current configuration file. I updated mine to the following:
+
Subversion might complain about needing to store passwords in a ''unencrypted'' form. To prevent this, we need to figure out how to enable the ''gnome-keyring'' add-on. To do this, edit the file '''~/.subversion/config''' and search on the string ''password-stores''. Most likely this will be commented out in your current configuration file. I updated mine to the following:
  
 
  password-stores = gnome-keyring
 
  password-stores = gnome-keyring
 +
 +
However, this was not enough to prevent me from being prompted each time. I then added the following package:
 +
 +
yum install subversion-gnome
 +
 +
We will see if this permits us to store the password or not.
  
 
= Directory Structure =
 
= Directory Structure =

Revision as of 09:32, 14 October 2009

We switched from using CVS to Subversion as our source control mechanism in mid October 2009.

  • We did not try to import all of the CVS history.
  • The initial import includes all of the 2.11.0 release source plus the updated source code since the release (the state of CVS on 2009-10-14).
  • We left the CVS repository alone (in case we ever wanted to refer back for older history).

Preparing Development Machine

As a developer, the following things must be done to your development machine before you will be able to check out, build and commit changes to the NST source code.

Set SVNROOT

You need to set the SVNROOT variable. Add the following to your ~/.bashrc or ~/.bash_profile configuration file:

export SVNROOT=https://nst.svn.sourceforge.net/svnroot/nst

After the SVNROOT variable is set, you should be able to run Subversion commands. For example the following shows the directories under SVNROOT.

[pkb@sprint ~]$ export SVNROOT=https://nst.svn.sourceforge.net/svnroot/nst
[pkb@sprint ~]$ svn ls ${SVNROOT}
trunk/
[pkb@sprint ~]$ 

gnome-keyring

Subversion might complain about needing to store passwords in a unencrypted form. To prevent this, we need to figure out how to enable the gnome-keyring add-on. To do this, edit the file ~/.subversion/config and search on the string password-stores. Most likely this will be commented out in your current configuration file. I updated mine to the following:

password-stores = gnome-keyring

However, this was not enough to prevent me from being prompted each time. I then added the following package:

yum install subversion-gnome

We will see if this permits us to store the password or not.

Directory Structure

Currently the directory structure under Subversion is fairly straight forward. We use trunk as the current working area (this is what most developers will be checking out from and committing to). When we have a release, we will copy trunk to the release number. For example, to create the 2.12.0 release, we would run the following Subversion command:

svn copy ${SVNROOT}/trunk ${SVNROOT}/2.12.0

Subversion Commands

Use the following to get the list of available subversion commands:

svn help

To get more information about a specific Subversion command (like ls), run:

svn help ls

Checking Out Code

To make the initial checkout of the current source code into a sub-directory named nst, you can use the following Subversion command:

svn co ${SVNROOT}/trunk nst

Status

The Subversion status command is very handy at showing not only what files you've modified, but also (when including the -u option) handy at showing what files have changed in the repository:

svn status -u

For help about the output of svn status, run:

svn help status | less

Revert

If you've made modifications to a file which you want to discard, use the revert command to restore the original version:

svn revert FILENAME