You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jonatan <jo...@wineasy.se> on 2004/03/27 02:52:16 UTC

Directory under version control or not?

I just ran into a situation where the working copy seems to get 
confused about whether a directory is scheduled for addition or not. 
'svn st' says it isn't (at least that's how I understand the "?" 
symbol), but when you try to 'svn add' it you get an error message 
about it already being under version control. The following example 
illustrates this:

svnadmin create repo
svn co file://`pwd`/repo wc
cd wc
svn mkdir dir1
cp -R dir1 dir2
svn add dir2
   >>> svn: warning: 'dir2' is already under version control
svn st
   >>> ?      dir2
   >>> A      dir1

(I'm using Subversion 1.0.1.)


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

Re: Directory under version control or not?

Posted by Tom Mornini <tm...@infomania.com>.
On Mar 26, 2004, at 6:52 PM, Jonatan wrote:

> I just ran into a situation where the working copy seems to get 
> confused about whether a directory is scheduled for addition or not. 
> 'svn st' says it isn't (at least that's how I understand the "?" 
> symbol), but when you try to 'svn add' it you get an error message 
> about it already being under version control. The following example 
> illustrates this:
>
> svnadmin create repo
> svn co file://`pwd`/repo wc
> cd wc
> svn mkdir dir1
> cp -R dir1 dir2
> svn add dir2
>   >>> svn: warning: 'dir2' is already under version control
> svn st
>   >>> ?      dir2
>   >>> A      dir1
>
> (I'm using Subversion 1.0.1.)

I think the issue here is that you're copying the enclosed .svn 
directories when making dir2.

I don't think you'll have an issue if you mkdir dir2 and then svn add 
it.

-- 
-- Tom Mornini


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

Re: Directory under version control or not?

Posted by Ben Collins-Sussman <su...@collab.net>.
Jonatan wrote:

> I just ran into a situation where the working copy seems to get confused 
> about whether a directory is scheduled for addition or not. 'svn st' 
> says it isn't (at least that's how I understand the "?" symbol), but 
> when you try to 'svn add' it you get an error message about it already 
> being under version control. The following example illustrates this:
> 
> svnadmin create repo
> svn co file://`pwd`/repo wc
> cd wc
> svn mkdir dir1
> cp -R dir1 dir2

You should be running 'svn cp', not 'cp'.   By running normal 'cp', 
you've duplicated the dir1 working copy.  You now have a completely 
independent working copy named 'dir2' that is unconnected to 'wc', even 
though it's nested.  So when you try to 'svn add dir2', the error is, 
"no way, that's already a separate working copy."


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