HowTo:SVN

From Gravity
Jump to: navigation, search

This is a collection of random information that you (might) need to access the subversion system in VizClass. As usual this info is not final and there might be better ways to do things. If you know of one, please update the wiki and/or let me know at dgroenev@uci.edu.

  • The subversion homepage is http://subversion.tigris.org/. They have the source for the unix client, but most linux distribution come with a packaged one. As windows client I recommend TortioseSVN at http://tortoisesvn.tigris.org/. At the same page you can also find awesome documentation for subversion at http://svnbook.red-bean.com/. I know it calls itself a "book" but it's not that bad. You don't have to read the whole thing, and it's not as long as you would expect from a book. Chances are though that you might find the answers to your questions there. Most importantly, if you don't know what it means to check out a working copy, to commit changes, or what a repository is, read the introduction and/or the relevant sections.
  • All repositories follow the convention of having three top-level directories, trunk/, tags/ and branches/. Mainline code development happens in trunk/.
  • All the VizClass repositories are stored at svn+ssh://servername.eng.uci.edu/var/lib/svn/<Projectname>. Different projects go into different repositories. Most importantly, that means that when you check out a working copy of a project that depends on VizION, it won't come with VizION included. The preferred method to get it anyways is to install VizION globally into your site-packages/ directory that is part of your python distribution. However, while VizION is being actively developed, that might not be practical, so the other method is to also check out a copy of VizION and make a symlink to <path_to_vizion_working_copy>/trunk/VizION/ in the trunk/ directory of the working copy of the project you are working on. You can check out how I did that in servername.eng.uci.edu in the directory /home/marvin/viz/. If you can't create symlinks because you are using an inferior operating system, you will have to copy the VizION/ directory to your project. However, do not add the symlink or the copy of the VizION/ directory to the repository. This seems important, let me repeat it: Do not add the symlink or the copy of the VizION/ directory to the repository. The same goes for the logging/ directory in the VizION repository. It contains minor fixes to the logging system that comes with Python. These changes will be shipped with Python 2.4.2 when it is released. Until then we have to live with this.
  • To access subversion you have to be a member of the svn group on vizserver. If you find you are not (log into vizserver.eng.uci.edu and run the id command to find out for sure), talk to Mike (melkin@uci.edu) or Dirk (dgroenev@uci.edu), they will add you.
  • To create a new project,
    • Log onto vizserver.eng.uci.edu, and go to /var/lib/svn/.
    • Make sure the project you want to create is not already there and doesn't clash with the name of some other project.
    • Create the new repository with svnadmin create --fs-type fsfs <name_of_your_project>.
    • Change file ownership of the new repository to the svn group with chgrp -R svn <name_of_your_project>.
    • Change file permissions of all files in the new repository to rw-rw--- (or 660 in octal) by running find <name_of_your_project> -type f -exec chmod 660 "{}" \;
    • Change file permissions of all directories in the new repository to rwxrwx-- (or 770 in octal) by running find <name_of_your_project> -type d -exec chmod 770 "{}" \;
    • Set the sticky bit for the group on the db/ subdirectory of your repository by running chmod g+s <name_of_your_project>/db/.
    • Check out revision 0 of the new project somewhere.
    • Create the directories trunk/, tags/ and branches/ in the working copy, add them to the repository and commit.
    • Start development in <your_working_copy>/trunk/.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox