wiki:HetProcedures/SvnProcedures

Subversion Procedures and Commands at the Hobby Eberly Telescope

Currently the following two hosts are used for subversion repositories. These machines will be merged in the future.

  • ute2.as.utexas.edu/repos (internal HET network only)
  • cetus.as.utexas.edu/svn (replacement for ute2, some items moved over already)
  • hetdex-pr.as.utexas.edu/repos/het

Tasks:

Create a new repository from existing files, e.g ~/myproject

  • have the svn administrator create a project directory in the repository
  • - see ~svn/setup.txt
  • cd ~/myproject
  • - clean out all files that you don't need or want in the repository
  • - clean out all files that can be rebuilt
  • svn import -m Initial import" svn+ssh://<user>@<host>/myproject/trunk

Check out an existing repository

  • svn checkout svn+ssh://<user>@<host>/<repo_name>/trunk my_dir_name

Using SVN in your working copy

  • svn help # -- get further help about commands and svn
  • svn commit <filenames> # -- commit one or more files to the repository
  • svn delete # -- To delete a file
  • svn add <filename> # -- To add a new file to the repository
  • svn mv <filename1> <filename2> # -- rename a file or directory
  • svn info # -- check information or version number of working copy
  • svn diff <filename> [-r<revnum>] # -- compare a new and old version
  • svn status # -- to see what is changed in the directory

Create a branch

  • svn copy -m 'Create branch' svn+ssh://<user>@<host>/<repo_name>/trunk/ svn+ssh://<user>@<host>/<repo_name>/branches/<name>
  • svn checkout svn+ssh://<user>@<host>/<repo_name>/branches/<name> my_dir_name
  • if making a branch from trunk, be sure to copy makefile.local to your branch directory

Create a tag

  • svn copy -m 'Tagging Release 1.0' svn+ssh://<user>@<host>/<repo_name>/trunk/ svn+ssh://<user>@<host>/<repo_name>/tags/release-1.0
  • svn checkout svn+ssh://<user>@<host>/<repo_name>/tags/<name> my_dir_name

Merge trunk changes into branch. Note, these commands must be done at the top level directory. More than just the files get updated when merging.

  • cd <project_dir>
  • svn merge -c<revnum>[,revnum,...] svn+ssh://<use>@<host>/<project>/trunk
  • svn commit # to commit working copy of the branch to the repository

SVN cheat sheet in PDF format

Last modified 4 years ago Last modified on Feb 6, 2020 3:29:22 PM