"Mikel Ward" <mikel_at_mikelward.com> writes:
> I have a subdirectory that an automated process writes to as another
> user (publishing of my Blogger blog).
> Both I and the other user belong to a common group.
> I was supposed to have group write permissions on all the
> subdirectories, but due to a missing setgid bit or wrong umask or
> something like that, a subdirectory ended up owned by the other user
> and I had no write permissions.
> I didn't realize this, and tried to do an svn add.
> It broke things.
> Here's how to reproduce it.
> $ pwd
> $ whoami
> $ svnadmin create testrepo
> $ mkdir testdata
> $ cd testdata
> $ svn co svn+ssh://localhost/home/mward/testrepo .
> Checked out revision 0.
> $ mkdir testdir
> $ cd testdir
> $ echo 'Testing' > testfile
> $ cd ..
> $ sudo useradd testuser
> $ sudo chown testuser testdir
> $ ls -al
> total 24
> drwxr-xr-x 4 mward mward 4096 2008-05-07 10:14 .
> drwxr-xr-x 111 mward mward 12288 2008-05-07 10:12 ..
> drwxr-xr-x 6 mward mward 4096 2008-05-07 10:12 .svn
> drwxr-xr-x 2 testuser mward 4096 2008-05-07 10:13 testdir
> $ svn add testdir
> svn: Can't create directory 'testdir/.svn': Permission denied
> $ sudo chmod g+w testdir
> $ svn add testdir
> svn: warning: 'testdir' is already under version control
> $ svn stat testdir
> svn: Directory 'testdir/.svn' containing working copy admin area is missing
> $ svn ci testdir
> svn: '/home/mward/testdata/testdir' is not a working copy
> svn: Can't open file '/home/mward/testdata/testdir/.svn/entries': No
> such file or directory
Yes, I think it's saying 'testdir' is already under version control
because the *parent's* .svn/entries file has an entry for testdir now,
even though testdir itself never got a .svn/ area.
We could fix this by noticing the error in 'testdir' and undoing the
addition of the entry in the parent's .svn/entries file; I'm not sure
how hard that would be to do. (By the way, if you want to fix it by
hand, just edit the parent's .svn/entries file in the obvious way -- not
that we ever recommend manual editing of entries files, of course :-) ).
Can I persuade you to file a issue in the bug tracker for this, pointing
back to your original mail?
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-14 22:41:27 CEST