You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mike Carifio <ca...@usys.com> on 2003/07/17 14:32:58 UTC

Re: newbie question: import and co to the same directory? (second try)

I didn't ask my question clearly enough. On my RH9 box with svn 0.17, I
don't seem to be able to import a tree into an svn repository
and then immediately checkout back into the same directory.
Is this a permissible pattern? I looked for guidance in
chapter 3 of "Subversion: The Definitive Guide" (rev 6204:6215)
and in the refereence page for checkout, page 138. I didn't
see an example in either place that precludes this
sequence of commands, but I didn't see a positive example
either.

I'm about to update to 0.25. I'm trying to understand
what I should expect to see.


Please advise at your convenience. Thanks.



----------------------------------------------------------
Here's a transcript of what happens on my RH9 box.



[carifio@dual svn]$ pwd
/home/carifio/svn



[carifio@dual svn]$ ls
svn-initial-contents  svn.pdf  svn.pdf+notes.text




[carifio@dual svn]$ ls -R svn-initial-contents
svn-initial-contents:
d0  d1  d2  d3  file0
                                                                               
svn-initial-contents/d0:
                                                                               
svn-initial-contents/d1:
d1d0  d1d1  d1d2  file1
                                                                               
svn-initial-contents/d1/d1d0:
                                                                               
svn-initial-contents/d1/d1d1:
                                                                               
svn-initial-contents/d1/d1d2:
                                                                               
svn-initial-contents/d2:
                                                                               
svn-initial-contents/d3:
d3d0  file2
                                                                               
svn-initial-contents/d3/d3d0:
file3




[carifio@dual svn]$ svn --version
svn, version 0.17.1 (r4503)
   compiled Jan 25 2003, 02:24:17
 
Copyright (C) 2000-2003 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
 
The following repository access (RA) modules are available:
 
* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' schema
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' schema
 
[carifio@dual svn]$ svnadmin create svn-repository
[carifio@dual svn]$ svn import -m init 
file:///home/carifio/svn/svn-repository svn-initial-contents
Adding         svn-initial-contents/d0
Adding         svn-initial-contents/d1
Adding         svn-initial-contents/d1/d1d0
Adding         svn-initial-contents/d1/d1d1
Adding         svn-initial-contents/d1/d1d2
Adding         svn-initial-contents/d1/file1
Adding         svn-initial-contents/d2
Adding         svn-initial-contents/d3
Adding         svn-initial-contents/d3/file2
Adding         svn-initial-contents/d3/d3d0
Adding         svn-initial-contents/d3/d3d0/file3
Adding         svn-initial-contents/file0
Transmitting file data ....
Committed revision 1.



[carifio@dual svn]$ ls -R
.:
svn-initial-contents  svn.pdf  svn.pdf+notes.text  svn-repository
 
./svn-initial-contents:
d0  d1  d2  d3  file0
 
./svn-initial-contents/d0:
 
./svn-initial-contents/d1:
d1d0  d1d1  d1d2  file1
 
./svn-initial-contents/d1/d1d0:
 
./svn-initial-contents/d1/d1d1:
 
./svn-initial-contents/d1/d1d2:
 
./svn-initial-contents/d2:
 
./svn-initial-contents/d3:
d3d0  file2
 
./svn-initial-contents/d3/d3d0:
file3
 
./svn-repository:
conf  dav  db  format  hooks  locks  README
 
./svn-repository/conf:
 
./svn-repository/dav:
 
./svn-repository/db:
changes   __db.002  __db.005        nodes            strings
copies    __db.003  DB_CONFIG       representations  transactions
__db.001  __db.004  log.0000000001  revisions
 
./svn-repository/hooks:
post-commit.tmpl          pre-commit.tmpl          start-commit.tmpl
post-revprop-change.tmpl  pre-revprop-change.tmpl
 
./svn-repository/locks:
db.lock
[carifio@dual svn]$ ls -R svn-initial-contents/
svn-initial-contents/:
d0  d1  d2  d3  file0
 
svn-initial-contents/d0:
 
svn-initial-contents/d1:
d1d0  d1d1  d1d2  file1
 
svn-initial-contents/d1/d1d0:
 
svn-initial-contents/d1/d1d1:
 
svn-initial-contents/d1/d1d2:
 
svn-initial-contents/d2:
 
svn-initial-contents/d3:
d3d0  file2
 
svn-initial-contents/d3/d3d0:
file3




[carifio@dual svn]$ svn co file:///home/carifio/svn/svn-repository 
svn-initial-contents
svn: Obstructed update
svn: revision 1 doesn't match existing revision 0 in 'svn-initial-contents'
[carifio@dual svn]$



Paul L Lussier wrote:

>In a message dated: Wed, 16 Jul 2003 17:55:31 EDT
>Mike Carifio said:
>
>  
>
>>Suppose I have some content tree like ~/tree:
>>
>>$ cd ~
>>$ mkdir tree-svn
>>$ svnadmin create tree-svn  # ~/tree-svn holds ~/tree content
>>$ svn import -m "tree init" file://$PWD/tree-svn tree
>>    
>>
>
>
>Why are you doing both 'mkdir tree-svn' and 'svnadmin create tree-svn' ?
>
>  
>
>>Now, what I do today is:
>>
>>$ mv tree tree.dist
>>$ svn co file://$PWD/tree-svn tree
>>
>>This *doesn't* work with /etc because svn faults:
>>    
>>
>
>Why doesn't it work?  What's the error?  I do this all the time.
>
>  
>
>># mv etc etc.dist  # nope, won't work
>># svn co file:///etc-svn etc  # svn can't find /etc/ld.so.conf?
>>    
>>
>
>Well, that's obvious.  ld.so.conf is in /etc.  ld is compiled to look 
>in /etc for ld.so.conf, and you just moved it out of the way.
>
>  
>
>>$ svn co file://$PWD/tree-svn tree # co dies midway
>>    
>>
>
>What errors are you getting?
>
>  
>
>>So I'm missing something somewhere. Let's educate the silly newbie. Thanks.
>>    
>>
>
>Have you read the Subversion book and the FAQ?  They're both online 
>at http://subversion.tigris.org/.
>
>I recommend you dig into the book, it's very well written, and should 
>clear up a lot of your confusion.
>  
>



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

Re: newbie question: import and co to the same directory? (second try)

Posted by Ben Collins-Sussman <su...@collab.net>.
Mike Carifio <ca...@usys.com> writes:

> I didn't ask my question clearly enough. On my RH9 box with svn 0.17, I
> don't seem to be able to import a tree into an svn repository
> and then immediately checkout back into the same directory.
> Is this a permissible pattern?

No, you cannot do this pattern.  'svn checkout' will not overwrite
unversioned files with versioned ones.    Just allow 'svn checkout' to
create a new directory.  The only time it's really permissible to
run 'svn checkout' into an existing directory is if the directory is
*already* a working copy (say, an interrupted checkout that you're
trying to resume.)


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