|
Subversion (aka SVN) How-To:
You must have a Subversion
client installed on your computer to run the commands below.
Many modern operating systems will come with Subversion already
installed.
If you are just looking for the latest stable release, you
ought to head on over to the
download page
Getting a list of available subprojects:
svn ls https://svn.sourceforge.net/svnroot/annevolve/trunk/
...which should show you something like:
4play/
evnim/
evsail/
mult2/
sailchallenge/
ttt/
vizann/
xor/
Checking out the bleeding-edge development version:
svn checkout https://svn.sourceforge.net/svnroot/annevolve/trunk/SUBPROJECT (Substitute the name of an actual project for SUBPROJECT)
Getting the latest checked-in changes:
(From inside the checked-out directory) svn update
Seeing what changes you have made to your local copy:
(From inside your checked-out copy) svn status
...which should give you something like:
? readme.txt
M somefile.c ...which in turn would indicate that "readme.txt" exists locally, but
subversion has not been told to add it to the repository, so it will ignore it.
The "M" next to somefile.c means that it has been modified in some way and the
changes have not yet been committed to the repository.
Committing (saving) changes to the Subversion repository:
svn commit --username SOURCEFORGEUSER -m "SOME DESCRIPTIVE MESSAGE"
Here is a concrete example of an actual commit:
svn commit --username peaceful -m "Added a 'README' file for pedantic purposes."
Adding trunk/README
Transmitting file data .
Committed revision 8. Note that it will ask you for your SourceForge password the first
time you commit. You must be a developer on the ANNEvolve project to commit
changes. Please join the SourceForge ANNEvolve mailing list if you wish to
become a developer and contribute changes.
Copying/Moving:
svn cp somefileordir.c some/subdirectory/newname.c
Tagging a Release (i.e. Making a new version of a subproject):
Tagging a release is really just a special case of copying a directory.
REMEMBER TO UPDATE YOUR LOCAL COPY, COMMIT YOUR CHANGES, AND TEST YOUR
PROJECT before even thinking about tagging a release. For the actual
operation, you will want to use the full repository URL for both the source and
the target of the copy, as most developers will not want to have the whole
entire ANNEvolve project checked out to their local hard drive as it would include
every release ever made in subversion, which will be quite large...eventually.
In the example below, we will release version 1.45 of the imaginary
foobar project. Note that when using URLs for both the source and target,
the changes will be immediate, and no commit will be required. (I split
the command onto two lines for readability)
svn cp https://svn.sourceforge.net/svnroot/annevolve/trunk/foobar \
https://svn.sourceforge.net/svnroot/annevolve/tags/foobar/1.45
Other useful commands:
svn help Get help
svn help COMMAND Get help on COMMAND
svn add FILENAME Schedule FILENAME for addition to the repository.*
svn rm FILENAME Schedule FILENAME for deletion from the repository.*
svn revert FILENAME Discard local changes on FILENAME, reverting to the
last checked-out version.
svn log FILENAME See the revision history of a file.
* Requires a commit before any changes will be made to the repository.
There is an excellent free online reference book for subversion
here.
|