|−|CS systems have the Subversion versioning system ( similar to CVS) installed on them in <tt>/usr/bin/svn</tt>. Private SVN repositories are creatable by means described in [http://svnbook.red-bean.com/ the SVN book], but a method is also provided to create repositories that are publicly accessible over HTTP. |+|
Subversion () means , a .
| || |
|−|To share a repository in this way, first create it in a directory of your choosing. |+|
svn a svn...). , , and the .web interface. my.cs and "Subversion" .
|−| willm1@linuxserver1:~$ mkdir svn | |
|−| willm1@linuxserver1:~$ cd svn | |
|−| willm1@linuxserver1:~/svn$ svnadmin create myrepo | |
|−|This will create a directory <tt>myrepo/</tt>, and contents in that directory. This is a fully functional SVN repository: | |
|−| willm1@linuxserver1:~/svn $ svn checkout file:///home/csee1/willm1/svn/myrepo ~/myrepo | |
|−| Checked out revision 0. | |
|−| willm1@linuxserver1:~/svn$ cd ~/myrepo | |
|−| willm1@linuxserver1:~/myrepo$ echo 'Hello, World!' > greeting | |
|−| willm1@linuxserver1:~/myrepo$ svn add greeting | |
|−| A greeting | |
|−| willm1@linuxserver1:~/myrepo$ svn commit --message "Add a friendly greeting" | |
|−| Adding greeting | |
|−| Transmitting file data . | |
|−| Committed revision 1. | |
|−|However, this is not yet accessible over the web; even if you put the repository in your web directory, browsing to this directory over HTTP will show the file contents of the SVN repository (<tt>README.txt</tt>, <tt>conf/</tt>, etc.) , rather than the SVN contents. To make this happen, the web server needs to be informed that the <tt>myrepo</tt> directory contains SVN information, and SVN should be used to determine what is actually shown over the web. There is a web interface at [http://my. cs.umbc.edu my.cs .umbc.edu] that can be used to accomplish this. Go there, and log in using your UMBC username and password as normal. Under "CSEE Account", click on "Subversion". You should see a menu like this: | |
|−|[[Image:svn-repo.png]] | |
| || |
|−|In the box on the left, fill in the name that will be visible over HTTP. For example, <tt>myrepo</tt> would be a good choice for this repository, but if something more descriptive applies to your code you may choose whatever you like. In the box on the right, fill in the path to your repository, excluding the part which is your home directory. For example, the full path to the repository I created is <tt>/home/csee1/willm1/svn /myrepo</tt>, and my home directory is <tt>/home/csee1/willm1</tt>, so I would enter <tt>svn/myrepo</tt> in the box. Finally, click "Add" to make the changes take effect. Your repository will be exposed immediately, and the interface will look like this: |+|
the the the . a repository, . path is the /svn home directory, would in , to .
|−|[[Image:svn-repo-created. png]] | |
| || |
|−|You can click on the link under "URL" to take you directly to the repository. Congratulations, your repository is completely set up! |+|
the to you to the . ,
| || |
|−|If you are using the directory-listing feature of Apache to generate an <tt>index. html</tt> file for your CS account webpage, do not create a directory with the same name as the name you gave your repository, so that the repository shows up in that list. This will prevent others from checking out your repository properly using an svn client. It will still be accessible over the web, but error messages like the following will be generated: |+|
you the of to . create a nameyour repository , the repositoryin will your . the , :
willm1@chasca:/tmp$ svn checkout http:// www. csee.umbc.edu/ ~willm1/myrepo/ |+|
|−| svn: PROPFIND request failed on '/~willm1/myrepo' | |
|−| svn: PROPFIND of '/~willm1/myrepo': 301 Moved Permanently (http://www.csee.umbc.edu) | |
|−|It is recommended, instead, to create an HTML page that lists the things available on your web site. | |
| || |
directory the . ,
|−|You may need to make sure that this directory is readable by the webserver. The web server currently runs with group id 48 (apache), so if you don't wish to give "o+rx" permissions on this directory you may use |+|
|−| chgrp - R apache ~/ svn |+|
|−| chmod -R g+rx ~/svn |+|
, a of can
|−|Otherwise, a simpler set of permissions can be given: |+|
|−| chmod -R o+rx ~/svn |+|
|−|Depending on your configuration, this step may not be necessary. If you run into a problem with this and are unable to make your repository visible, please submit a ticket detailing the problem via the [http://my.cs.umbc.edu my.cs. umbc.edu interface]. |+|
, may be . If you , please submit a ticket the my.cs.
Subversion (SVN) provides a convenient means of collaboration for groups of developers, as well as version control, branching and merging, and a number of other excellent features.
We now support automatically creating public svn repositories on a CSEE system (svn.cs.umbc.edu). Users may create, share, and manage permissions on their own repositories from within the my.cs web interface. To begin, log into my.cs and select "Subversion" from the left.
You will be presented with two lists: The top one is the list of repositories that you own, and the bottom the list of user groups. To create a repository, click "Create Repository". Give it a unique name. All other fields are optional. The path is the location above ~/svn in your home directory, generally this should be left blank. If you are part of a research group and would like the repository in your lab's storage, please file a ticket with us for information of how to do that.
Read Only Names are the users that are allowed to fetch the repository, but not add or commit to it. Read Write are people you would like to share full access with. The groups are the names of groups you have created on the previous page, so that you may more easily control access for larger numbers of people, i.e. a class of students or a group of TAs. You may leave any of these blank, and you will automatically be given read/write access to all repositories that you own. Submit to finish.
When you return to the first page, you should see that the status of your new repository is "Initializing". This should only take a second, select "Subversion" on the left to refresh the page. (Refreshing may attempt to create a new repository, which will be blocked due to an identical name) Once your repository is "Online" the url will be populated, and you are now able to use the repository. To view it in your browser, simply copy the url given into the address bar, and you will be given a navigable page of your current source. To check out on the command line, use:
svn co https://svn.cs.umbc.edu/<rest of url>
This will create a directory of the same name as your repository. For more information on using svn, please see:
If you have a large number of users, I suggest using groups to help manage them. To do so, on the main subversion site, select "Create Group". Supply a group name and the usernames of the people in the group, separated by spaces. When creating and editing repositories, you can add these groups as read only or read write, and all of the users in them will receive the same rights.
Our system will also support modifying permissions of subdirectories within your repository. In order to do so, click the name of the repository on the main page, then create an entry for each subdirectory you want to control. Note that this page will not be automatically populated as you edit your repository. You may also add directories below directories by clicking "Add Subdirectory".
This system has only just been rolled out, so a few issues may be present. If you encounter any difficulty, please submit a ticket with the CSEE systems group at my.cs. Thanks!