Importing into repository

Many MAC, Unix, and Linux machines now have subversion pre-installed.
Users of Windows may need to download and install a subversion client (such as TortoiseSVN ). The good news is that some of these clients have context sensitive menus, allowing you to manage your files with a simple right-click.

Adding source code from your computer to the repository

  1. if you have not set up a repository in SeisCode, do so.
  2. take note of the url, from Settings -> repository
  3. back up your project before going any further... just in case
  4. Check out your project.
    This tells subversion that one or more of your directories will be associated with your project.
    svn co[project]/trunk [project]/ # svn checkout fromwhere towhere
  5. add the files to your SeisCode repository using svn add (directories are recursively added)
    svn add list_of_files_and_directories
    At this point, these files have been marked for addition, but haven't actually been uploaded to SeisCode yet
  6. Commit files... make sure to include your SeisCode username and password
    svn commit -m "comments for this commit" --username mySeisCodeUsername --password mySeisCodePassword files_and_directories_to_commit
    svn commit -F fileContainingCommitComments --username mySeisCodeUsername --password mySeisCodePassword files_and_directories_to_commit

Day-to-day work in your local [project] directory:

  • Only make changes to this directory using subversion commands. Otherwise, local and SeisCode versions may become out of sync. e.g. :
    svn mkdir instead of mkdir;
    svn rm instead of rm;
    svn mv instead of mv
  • use svn add to add additional files to your project. Otherwise, they may exist in the directory but will not exist in the repository
  • use svn update to replace outdated local files with any newer versions that may exist in the repository.
  • use svn status to compare the local project to the SeisCode Project. Check svn help status for a complete list of codes.
    Some common codes include:
    • A - Added
    • C - Conflicted
    • D - Deleted
    • I - ignored
    • M - modified
    • R - Replaced
    • ? - item is not under version control.
  • use svn commit to send any changes to SeisCode's repository.

For help:

svn help #provides a list of commands
svn whichcommand -? #provides command-specific help


# example for project named "the-simplest-project" 
# which was set up using SeisCode for source code management
# repository url:
# This project consists of 3 files, located at $HOME/simplest/ 
# files are named,, and
# for safety sake, our local repository will live in a new directory, $HOME/simpleproject 
# and the project files will be copied into it before adding them to the repository.

# Back up your data.

# Note to advanced users: you may wish to create /trunk /branches and /tags within your project first, 
#     and then check out the projectname/trunk instead of just checking out the project root directory.
# Establish the link between SVN and a new directory on your computer
svn checkout ~/simpleproject

cd  #go to the $HOME directory

# Copy files into the newly created simpleproject directory
cp simplest/*.py  simpleproject/

cd simpleproject/

# Add these files to your project
svn add  #or, to add everything simply "svn add" 

# Show that these are marked for addition
svn status

# Commit these files to the repository
svn commit -m "initial submission"   #commits everything that's changed

# Take a look at SeisCode to see what's there