Check in/out src/dat/doc using Subversion (svn)
by
Kuiyu Chang
—
last modified
Aug 25, 2008 04:42 PM
Install SVN
- Download & install SVN client.
- Configure SVN. Important if your web-access is censored by a http proxy.
- cd to local drive path:
cd ~/mylocalcopy - List what is available in the repository (also viewable through a browser at the same URL or via the trac interface):
svn list https://svn.mosuma.com/r4000/
Checking out a subdirectory
- Checkout a specify part of the repository to your local path using your research.mosuma.com userid:
- for normal projects (small development):
svn checkout --username youruserid https://svn.mosuma.com/r4000/proj/{projname} - for larger projects with 3 special directories trunk, tags, branches:
svn checkout --username youruserid https://svn.mosuma.com/r4000/proj/{projname}/trunk projname - Make sure you don't check out the project itself without specifying the trunk (if there is one). See svn book notes
- trunk stores the main line of development work
- tags stores frozen snapshots of your work
- branches is for different forks/variations of your development, usually when another person wants to branch/fork off from your work (not usually required here, except for mega projects). See faq entry on branching and merging
- for normal projects (small development):
- Make changes to your local copy by adding/deleting/modifying files. You can check the status of your local files viz-a-viz the repository by:
svn status - For each new file you added/deleted, tell the repository, anywhere within your checked out local copy, do e.g:
svn add newfile svn add * svn del oldfile
- Do an update:
svn update
- Update the repository by committing your changes to it:
svn -m "type some log information here" commit
Without Checking out you can ...
- directly import a local directory into svn, use:
svn -m "direct importing some stuff" import path_to_local_directory https://svn.mosuma.com/r9999/dat/newly_created_directory - do direct operations on the repository by specifying the full URL:
svn -m "making directory" mkdir http://svn.mosuma.com/r9999/newdirectory
- For more information, refer to

