You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Hakan Koseoglu <ha...@pcmsgroup.com> on 2004/07/06 08:57:18 UTC

Import related questions

Hi all,

I have a couple of repositories but I always get confused with import.
For example, I have a directory (/home/hakank/dir1) to import, I use the
following command from /home/hakank

svn import dir1 file:///repodir/dir1

That works because I have r/w access to /home/hakank.

If I want to import a directory which is on a directory I don't have r/w
access, it doesn't work. Especially if I want to import something like
/doc. I have to become root to do that and that messes up with the DB4's
file structure (especially if I am using the file:// method).

The last thing is, import doesn't create the svn client configuration
directories. If I import a documentation directory which contains over
1GB of data, to be able to have a working copy I have to check out all
of them into a different location. It won't allow me to check out on top
of my existing structure and it won't recognise that I already have
these files here. In the book chapter 5 section 6.2 mentiones import in
a very short manner and never explains that there are some practical
problems with importing directories.

What's the best practice solutions to get rid of these problems? In some
cases I cannot move the directory off / and I can't give myself r/w
access to that directory, even temporarily.

-- 
Hakan Koseoglu
PCMS Ltd.
3 Avro Court
Ermine Business Park
Huntingdon
Cambs PE29 6XS

Tel: +44-1480-435436
Fax: +44-1480-434012

Disclaimer: Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental.  Any resemblance between the above and my own views is
non-deterministic.  The question of the existence of views in the
absence of anyone to hold them is left as an exercise for the reader.
The question of the existence of the reader is left as an exercise for
the second god coefficient.  (A discussion of non-orthogonal,
non-integral polytheism is beyond the scope of this article.)

________________________________________________________________________

The information contained in this e-mail is intended only for the person
or entity to which it is addressed and may contain confidential and/or
privileged material. If you are not the intended recipient of this
e-mail, the use of this information or any disclosure, copying or
distribution is prohibited and may be unlawful.

If you received this in error, please contact the sender and delete the
material from any computer.

The views expressed in this e-mail may not necessarily be the views of
The PCMS Group plc and should not be taken as authority to carry out any
instruction contained.




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

Re: Import related questions

Posted by kf...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:
> I'm unable to reproduce this problem.  I can easily import directories
> that I only have read (but not write) access to.  What version client
> are you using?

Hmm, does this mean that issue #767 is at least partially resolved?

> > The last thing is, import doesn't create the svn client configuration
> > directories. If I import a documentation directory which contains over
> > 1GB of data, to be able to have a working copy I have to check out all
> > of them into a different location. 
> 
> Correct.  Import is a commit operation:  it does not create working
> copies.   To do what you want, see this FAQ:
> 
> http://subversion.tigris.org/project_faq.html#in-place-import

Oooh, that's a good one, I'd forgotten about that, thanks.

Still, though, we'd like to make import able to DTRT automatically, if
people want it to.  The FAQ should point to issue #1328, I'll make it
do so.

-Karl


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

Re: Import related questions

Posted by kf...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:
> The problem is that svn is trying to create a tmpfile in '.' and you
> have no write permission in the current working directory.
> 
> This is fixed in the forthcoming svn 1.1 release.

Correction to the above:

Ben and I just confirmed that this is *not* fixed yet -- it is indeed
issue #767, and it is still present in HEAD of Subversion.

-Karl


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

Re: Import related questions

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-07-06 at 08:15, Hakan Koseoglu wrote:
> On Tue, 2004-07-06 at 13:41, Ben Collins-Sussman wrote:
> > On Tue, 2004-07-06 at 03:57, Hakan Koseoglu wrote:
> > 
> > > If I want to import a directory which is on a directory I don't have r/w
> > > access, it doesn't work. Especially if I want to import something like
> > > /doc. I have to become root to do that and that messes up with the DB4's
> > > file structure (especially if I am using the file:// method).
> > 
> > I'm unable to reproduce this problem.  I can easily import directories
> > that I only have read (but not write) access to.  What version client
> > are you using?
> 
> I believe it is a simple file permission problem:
> 
> hakank@p038:/> svnadmin create /filestore/hakank/subrepo/wip
> hakank@p038:/> svn import wip file:///filestore/hakank/subrepo/wip
> svn: Can't open 'svn-commit.tmp': Permission denied
> 
> /wip is rw for my user but / isn't.
> 
> I presume if I used -m for message probably it would go away. On the
> other hand, I would have expected to create the temporary file in $TEMP
> (or %TEMP%). I haven't tried with -m yet. 
> 
> SVN version is 1.0.5.

The problem is that svn is trying to create a tmpfile in '.' and you
have no write permission in the current working directory.

This is fixed in the forthcoming svn 1.1 release.




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

Re: Import related questions

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-07-06 at 03:57, Hakan Koseoglu wrote:

> If I want to import a directory which is on a directory I don't have r/w
> access, it doesn't work. Especially if I want to import something like
> /doc. I have to become root to do that and that messes up with the DB4's
> file structure (especially if I am using the file:// method).

I'm unable to reproduce this problem.  I can easily import directories
that I only have read (but not write) access to.  What version client
are you using?


> 
> The last thing is, import doesn't create the svn client configuration
> directories. If I import a documentation directory which contains over
> 1GB of data, to be able to have a working copy I have to check out all
> of them into a different location. 

Correct.  Import is a commit operation:  it does not create working
copies.   To do what you want, see this FAQ:

http://subversion.tigris.org/project_faq.html#in-place-import


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

Re: Import related questions

Posted by Hakan Koseoglu <ha...@pcmsgroup.com>.
> > This is http://subversion.tigris.org/issues/show_bug.cgi?id=767.
> Actually, that issue is about your *current* directory not being
> writeable.
> So if you were cd'd into the directory you were trying the import,
> then the issue would be relevant.  Were you inside that dir when you
> imported?
I was inside / instead of the directory. For some reason I found the
following were represented in different ways:

svn import dir file:///repos
didn't do the same thing as
cd dir
svn import * file:///repos/dir

On the other hand probably the reason was I was just learning about the
processes. I bet it is actually an user error. :)

-- 
Hakan Koseoglu
PCMS Ltd.
3 Avro Court
Ermine Business Park
Huntingdon
Cambs PE29 6XS

Tel: +44-1480-435436
Fax: +44-1480-434012

Disclaimer: Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental.  Any resemblance between the above and my own views is
non-deterministic.  The question of the existence of views in the
absence of anyone to hold them is left as an exercise for the reader.
The question of the existence of the reader is left as an exercise for
the second god coefficient.  (A discussion of non-orthogonal,
non-integral polytheism is beyond the scope of this article.)

________________________________________________________________________

The information contained in this e-mail is intended only for the person
or entity to which it is addressed and may contain confidential and/or
privileged material. If you are not the intended recipient of this
e-mail, the use of this information or any disclosure, copying or
distribution is prohibited and may be unlawful.

If you received this in error, please contact the sender and delete the
material from any computer.

The views expressed in this e-mail may not necessarily be the views of
The PCMS Group plc and should not be taken as authority to carry out any
instruction contained.




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

Re: Import related questions

Posted by kf...@collab.net.
kfogel@collab.net writes:
> > If I want to import a directory which is on a directory I don't have r/w
> > access, it doesn't work. Especially if I want to import something like
> > /doc. I have to become root to do that and that messes up with the DB4's
> > file structure (especially if I am using the file:// method).
> 
> This is http://subversion.tigris.org/issues/show_bug.cgi?id=767.

Actually, that issue is about your *current* directory not being
writeable.

So if you were cd'd into the directory you were trying the import,
then the issue would be relevant.  Were you inside that dir when you
imported?


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

Re: Import related questions

Posted by kf...@collab.net.
Hakan Koseoglu <ha...@pcmsgroup.com> writes:
> I have a couple of repositories but I always get confused with import.
> For example, I have a directory (/home/hakank/dir1) to import, I use the
> following command from /home/hakank
> 
> svn import dir1 file:///repodir/dir1
> 
> That works because I have r/w access to /home/hakank.
> 
> If I want to import a directory which is on a directory I don't have r/w
> access, it doesn't work. Especially if I want to import something like
> /doc. I have to become root to do that and that messes up with the DB4's
> file structure (especially if I am using the file:// method).

This is http://subversion.tigris.org/issues/show_bug.cgi?id=767.
 
> The last thing is, import doesn't create the svn client configuration
> directories. If I import a documentation directory which contains over
> 1GB of data, to be able to have a working copy I have to check out all
> of them into a different location. It won't allow me to check out on top
> of my existing structure and it won't recognise that I already have
> these files here. In the book chapter 5 section 6.2 mentiones import in
> a very short manner and never explains that there are some practical
> problems with importing directories.

This is http://subversion.tigris.org/issues/show_bug.cgi?id=1328,
though the issue's summary didn't make that clear until I fixed it
just now.

> What's the best practice solutions to get rid of these problems? In some
> cases I cannot move the directory off / and I can't give myself r/w
> access to that directory, even temporarily.

Well, you must have at least read access to import, so you could copy
(not move) the tree to somewhere and import it from there.

Other than that, just wait for #767 to get fixed; it's currently
scheduled for version 1.2.0, but it could happen sooner if we got a
patch... :-)

-Karl


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