|
|
|
|
Section 01, 3/31/11
Lecture Material
Section slides: PDF
Notable questions from section
- Is it possible to suck a whole existing project into a repository with one command?
Yes. See information on
svn import here.
- I just tried making and checking out a repository, and it complains about $SVNROOT
Older versions of subversion, like the version that seems to ship with Mac OS X, require the
environment variable SVNROOT to be set to the path of the repository, the same specifier used to
check out the initial working copy. To set it in a shell, you'd type the following
(appropriately adjusted):
export SVNROOT=svn+ssh://csgordon@ravenna/home/csgordon/.../repository
- How can I use a custom diff command with
svn diff ?
svn diff takes an optional argument --diff-cmd to specify a custom diff
tool, like kdiff3. For example, svn diff --dif-cmd kdiff3 .
- How can I make a repository other people can access?
The main thing to worry about is that their user account has read and write access to the files
created by
svnadmin . This requires making sure they have execute permission
on all folders in the path to the repository, so they can follow paths through those
directories, and read/write permission for the repository itself.
For example, on attu , this is how I would make sure that others could follow a path
into my home directory, and make sure others in the group grad_cs could access my
repository:
[csgordon@attu3:~]$ ls -ld
drwx--x--x 8 csgordon grad_cs 4096 Apr 14 11:16
[csgordon@attu2:~]$ mkdir repositories
[csgordon@attu2:~]$ ls -ld repositories/
drwxr-xr-x 2 csgordon grad_cs 4096 Apr 14 11:31 repositories/
[csgordon@attu2:~]$ cd repositories/
[csgordon@attu2:~/repositories]$ svnadmin create svnrepo
[csgordon@attu2:~/repositories]$ ls -ld svnrepo/
drwxr-xr-x 6 csgordon grad_cs 4096 Apr 14 11:33 svnrepo/
[csgordon@attu2:~/repositories]$ chmod -R g+w svnrepo/
[csgordon@attu2:~/repositories]$ ls -ld svnrepo/
drwxrwxr-x 6 csgordon grad_cs 4096 Apr 14 11:33 svnrepo/
[csgordon@attu2:~/repositories]$ chmod o-rwx svnrepo/
[csgordon@attu2:~/repositories]$ ls -ld svnrepo/
drwxrwx--- 6 csgordon grad_cs 4096 Apr 14 11:33 svnrepo/
[csgordon@attu2:~/repositories]$
To share with accounts in a particular group, like if I wanted to share only with Steve and
Aryan (who are both in group cse333 , I would have also had to do something like
chgrp -R cse333
svnrepo . Note that for class projects, it's probably best to make sure, either by
getting a project group made, or by putting your repository in a non-obvious place, that people
who shouldn't have access can't check out your code! If you give read permissions to the whole
undergrad UNIX group and someone finds your repository, they can read all of your code.
|