You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Peter Gervai <gr...@tolna.net> on 2002/12/05 13:12:16 UTC

phantom directories in less than 8 revisions, db errors

svn, version 0.14.3 (dev build)
   compiled Oct 28 2002, 16:35:59

(Debian 'subversion-snapshot' package)

Hello,

I just subscribed [after tried to browse the archieves and issues but found
nothing relevant, but it's true that I cannot really tell the keywords of my
problem] in hope maybe i can provide anything useful info on this, or
getting informed that it's well known bug.

I create a repos like
/
 private/
 public/
 file
using http://. checked it out, and created ./private/grin/something/{many
files}, then committed. 

After that I 
svn cp http://host/svn/private/grin/something http://host/svn/public/
to publish it.

Something obviously went wrong. I tried to browse on web the repos and
realised that the layout became something like
/
 grin/
  something/
   files...
 private/
  private/
  public/
 public/
  something/
   files...
 file

this "kind" of tree is accessible thru' http but not locally (file://).
The revisions seem to be the same (eg. the /public and /private/public seem
to be the same dir). Trying to fiddle with them caused db error (first in
the web browsing). I copied the repos to a backup if anyone want to check
anything on it. I am clueless - scratch and recreate, which is not a problem
at rev 8 but would be nice to avoid after rev > 10.

Maybe you have some clue on this...

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Umask with rc_local

Posted by Nicholas Riley <nj...@uiuc.edu>.
On Thu, Dec 05, 2002 at 04:48:04PM +0100, Boris Boutillier wrote:
> I'm using subversion for a university project, and for the moment i can 
> only use local file:// access, as I'm not the Web administrator.

I can suggest a couple of solutions:

1. If you can run servers, then simply run Apache on a high-numbered port
as one of yourselves, using your own user database for authentication,
and use ra_dav exclusively.  This is definitely the easiest.

2. Assuming you're both in the same group, wrap svn in a script that
resets your umask to 007 or 002 before running it.  What I've done is
create a 'svn' group, and set the mode of the db directory to g+s so
files I create there are g+rw and group 'svn'.

> Is this a known bug and is there a workaround, I'm using subversion v 0.15 
> ( and didn't see this cubg correction in the changelog for 0.16).

Yes, it's a known bug, in that I mentioned it several months ago on
the list and nothing really became of it.  

-- 
=Nicholas Riley <nj...@uiuc.edu> | <http://www.uiuc.edu/ph/www/njriley>
        Pablo Research Group, Department of Computer Science and
  Medical Scholars Program, University of Illinois at Urbana-Champaign

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

cp and mv behaviour with directories (Re: phantom directories in less than 8 revisions, db errors)

Posted by Peter Gervai <gr...@grin.hu>.
Hello,

I know it's old but....

On Thu, Dec 05, 2002 at 11:48:10AM -0600, Ben Collins-Sussman wrote:

> Hold on, something's wrong here.  'svn cp' was designed to work
> exactly like Unix cp.  'svn cp dir1 dir2' should create 'dir2/dir1'.
> Did it not do that?

Now I did:

svn mv file:///home/grin/subversion/intermezzo/trunk/intersync-0.9.5.orig \
    file:///home/grin/subversion/intermezzo/vendor/

(both intersync-0.9.5.orig and vendor is a directory)

the result: the _contents_ of intersync-0.9.5.orig ended up in vendor, and
not the directory itself. mv works differently. probably same problem with
cp.

svn, version 0.16.0 (r3987)
   compiled Dec 13 2002, 07:16:10

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: phantom directories in less than 8 revisions, db errors

Posted by Ben Collins-Sussman <su...@collab.net>.
Peter Gervai <gr...@tolna.net> writes:

> > What you probably wanted to do was :
> >   svn mkdir http://host/svn/public/grin   (if it doesn't exist yet)
> >   svn cp http://host/svn/private/grin/something \
> >          http://host/svn/public/grin/something
> > 
> > The command you tried apparently overwrites in some way the /public
> > directory with the /private/grin/something directory. 
> 
> Actually you're right, and I realised this several times (and forgot it
> again). svn cp and mv works quite different from unix counterparts, which
> moves under a directory if it does exist and not overwrite it. I checked the
> svnbook but no big red flashy warning about this, so maybe it's just me
> who got too used to unix syntax?

Hold on, something's wrong here.  'svn cp' was designed to work
exactly like Unix cp.  'svn cp dir1 dir2' should create 'dir2/dir1'.
Did it not do that?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Umask with rc_local

Posted by Boris Boutillier <Bo...@lip6.fr>.
Hi all,

I'm using subversion for a university project, and for the moment i can 
only use local file:// access, as I'm not the Web administrator.

We are two people working on this project, with two different logins, and 
we both have a umask set to 022 ( which is the standard value : rw-r-r ).
The problem is that when we commit svn does'nt change this umask when 
dealing with files in the repository, particulary database access, and if 
it leads to the creation of a new log file or db file, the privileges on 
the file will be rw-r-r, and the second user won't be able to access the 
repository.

When looking at cvs, it changes in some way the umask as after a commit 
newly created file have ownership rw-rw-r which is the correct one for 
everyone in the group to acces the repository.

Is this a known bug and is there a workaround, I'm using subversion v 0.15 
( and didn't see this cubg correction in the changelog for 0.16).

Thanks all,

I'll take a look at the source code to see if it is something I can 
handle.

Boris


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: phantom directories in less than 8 revisions, db errors

Posted by Peter Gervai <gr...@tolna.net>.
Hello People,

I fiddled more with the problem below, and I think I found the problem. It
was a user error but it's very hard to spot, and probably easy to make even
after reading through all docs, so maybe it deserves a warning in the SVN
Handbook. (Which is, btw, a really nice think from the end-user's point.
Where to submit book patches? :))

I wanted to create a part of the repos which is pw protected, so I created
two <Location> in apache, one for /svn/ and other for /svn/private/, but
their SVNPath was the same (since I was thinking about permissions and not
separate repositories), while they were obvously overlapping.

This resulted chaos, as apache saw the same repository under /svn/private/,
while it did exist in /svn/ as well.

So this caused the actual problem.


(I go and check whether location without svnpath works or only hooks help
here.)

On Thu, Dec 05, 2002 at 02:31:20PM +0100, Rafael Garcia-Suarez wrote:
> Peter Gervai wrote:
> > After that I 
> > svn cp http://host/svn/private/grin/something http://host/svn/public/
> > to publish it.
> 
> What you probably wanted to do was :
>   svn mkdir http://host/svn/public/grin   (if it doesn't exist yet)
>   svn cp http://host/svn/private/grin/something \
>          http://host/svn/public/grin/something
> 
> The command you tried apparently overwrites in some way the /public
> directory with the /private/grin/something directory. 

Actually you're right, and I realised this several times (and forgot it
again). svn cp and mv works quite different from unix counterparts, which
moves under a directory if it does exist and not overwrite it. I checked the
svnbook but no big red flashy warning about this, so maybe it's just me
who got too used to unix syntax?

> Except that
> apparently it corrupts also the repository (if I understand correctly
> what you're saying below.) That's a bug IMO.

This probably was the result of the overlapping, but hard to tell WHY since
I'm a single person, so probably didn't make synchronous transactions (not
that it should matter due to db's locking and xactions). It could be some
kind of bug, but more subtle that I could even try to reproduce. Or simply
my kind of fool (setup) is smarter than the foolproofness of svn and db. :-)

peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: phantom directories in less than 8 revisions, db errors

Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
Peter Gervai wrote:
> After that I 
> svn cp http://host/svn/private/grin/something http://host/svn/public/
> to publish it.

What you probably wanted to do was :
  svn mkdir http://host/svn/public/grin   (if it doesn't exist yet)
  svn cp http://host/svn/private/grin/something \
         http://host/svn/public/grin/something

The command you tried apparently overwrites in some way the /public
directory with the /private/grin/something directory. Except that
apparently it corrupts also the repository (if I understand correctly
what you're saying below.) That's a bug IMO.

> Something obviously went wrong. I tried to browse on web the repos and
> realised that the layout became something like
> /
>  grin/
>   something/
>    files...
>  private/
>   private/
>   public/
>  public/
>   something/
>    files...
>  file
> 
> this "kind" of tree is accessible thru' http but not locally (file://).
> The revisions seem to be the same (eg. the /public and /private/public seem
> to be the same dir). Trying to fiddle with them caused db error (first in
> the web browsing). I copied the repos to a backup if anyone want to check
> anything on it. I am clueless - scratch and recreate, which is not a problem
> at rev 8 but would be nice to avoid after rev > 10.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: phantom directories in less than 8 revisions, db errors

Posted by cm...@collab.net.
Peter Gervai <gr...@tolna.net> writes:

> svn, version 0.14.3 (dev build)
>    compiled Oct 28 2002, 16:35:59
> 
> (Debian 'subversion-snapshot' package)
> 
> Hello,
> 
> I just subscribed [after tried to browse the archieves and issues but found
> nothing relevant, but it's true that I cannot really tell the keywords of my
> problem] in hope maybe i can provide anything useful info on this, or
> getting informed that it's well known bug.
> 
> I create a repos like
> /
>  private/
>  public/
>  file
> using http://. checked it out, and created ./private/grin/something/{many
> files}, then committed. 
> 
> After that I 
> svn cp http://host/svn/private/grin/something http://host/svn/public/
> to publish it.
> 
> Something obviously went wrong. I tried to browse on web the repos and
> realised that the layout became something like
> /
>  grin/
>   something/
>    files...
>  private/
>   private/
>   public/
>  public/
>   something/
>    files...
>  file
> 
> this "kind" of tree is accessible thru' http but not locally
> (file://).

If you mean you tried to view file://... in your web browser, yah,
that's a known "issue".  Subversion's use of file://... isn't
*exactly* what you'd expect here.  A browser using file://... is
expecting all the versioned files and directories to exist as literal
items in your regular filesystem.  But they don't--they live in a
database system.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: phantom directories in less than 8 revisions, db errors

Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
Peter Gervai asked:
> 
> So, as far as I see it's not possible to do something like this?
> 
> <location /svn/>
>   [authorize group public]
> </location>
> 
> <location /svn/private/>
>  [authorize group private]
> </location>

This will not do what you want, because svn doesn't always use URLs that
begin with /private to access/modify files under /private in the
repository. (However this will obviously work for pure GET requests, so
you can still prevent a part of your repos from being publicly
web-browseable by configuring the authorization for GET requests only,
via the <Limit> apache directive.)

> and if I create a public and a private repos then it's not possible to move
> items between with history intact? so hooks only?

No history between repos, yes, unless you do a dump and a load, which
begins to be hackish, does it.

If you want to control write access to a subdirectory, a hook is the
way to go.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: phantom directories in less than 8 revisions, db errors

Posted by Peter Gervai <gr...@tolna.net>.
Terve,

On Fri, Dec 06, 2002 at 02:31:30PM +0200, Nuutti Kotivuori wrote:
> Peter Gervai wrote:
> > svn, version 0.14.3 (dev build)
> >    compiled Oct 28 2002, 16:35:59
> > 
> > (Debian 'subversion-snapshot' package)
> > 
> I suggest you use the 'subversion' package instead (and everything
> belonging to it). The 'subversion-snapshot' package is ancient - and I
> don't see a reason for it even being there.

Oh darn. Thank you. 
I never checked the version numbers because I believed that the package was
a (fresh) snapshot indeed. I change to the other one and filed a bugreport
about it. 

*mumbling woodoo curses*

thank you,
peter


> That is not to say ofcourse that your problems were related to this.

Nope.

So, as far as I see it's not possible to do something like this?

<location /svn/>
  [authorize group public]
</location>

<location /svn/private/>
 [authorize group private]
</location>

and if I create a public and a private repos then it's not possible to move
items between with history intact? so hooks only?

p

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: phantom directories in less than 8 revisions, db errors

Posted by Nuutti Kotivuori <na...@iki.fi>.
Peter Gervai wrote:
> svn, version 0.14.3 (dev build)
>    compiled Oct 28 2002, 16:35:59
> 
> (Debian 'subversion-snapshot' package)
> 
> Hello,

I suggest you use the 'subversion' package instead (and everything
belonging to it). The 'subversion-snapshot' package is ancient - and I
don't see a reason for it even being there.

That is not to say ofcourse that your problems were related to this.

-- Naked


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org