[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: non-recursive-add isn't that useful? why is there no ".svn" folder in there? why can't I add more files?

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 16 Oct 2008 14:31:49 -0400

Are you in a working directory? Do a "svn status" and see if you are
in a working directory. You can't do a "svn add" without being in a
working directory. What version of Subversion are you using?

I just ran a small test myself, and everything seems to work as expected:

$ svn co svn://localhost/test/trunk test_proj
Checked out revision 2.

$ cd test_proj/ #Clean project

$ ls #Nothing in project

$ mkdir foo #Add directory "foo", but not in Subversion

$ cd foo

$ ls

$ touch bar foobar barfoo #Create some files inside of directory "foo"

$ ls
bar barfoo foobar

$ cd .. #Back to root of working directory

$ ls
foo

$ svn status #Is Directory "foo" in the source repository?
? foo

$ svn add -N foo #Add Foo, but not files in foo
A foo

$ cd foo #Let's see what the files in "foo" look like

$ ls
bar barfoo foobar

$ svn status #Files are not in repository. Current directory is newly added
? bar
? barfoo
? foobar
A .

$ ls -a #There is a .svn directory in "foo"
. .. bar barfoo foobar .svn

$ svn add * #Add works
A bar
A barfoo
A foobar

$ cd ..

$ svn commit -m "ss" #Commit works fine.
Adding foo
Adding foo/bar
Adding foo/barfoo
Adding foo/foobar
Transmitting file data ...

--
David Weintraub
qazwart_at_gmail.com
On Thu, Oct 16, 2008 at 1:40 PM, Geoffrey Plitt <geoff_at_gweb.org> wrote:
> but that doesn't work, because the new folder has no ".svn" in it, and is
> not a working copy:
>
> $ svn add newfolder/
> svn: '.' is not a working copy
> svn: Can't open file '.svn/entries': No such file or directory
>
> -g
>
>
> On Thu, Oct 16, 2008 at 9:52 AM, David Weintraub <qazwart_at_gmail.com> wrote:
>>
>> You'll have to CD to that folder you just added, and do a:
>>
>> $ svn add *
>>
>> Instead of using the -N option, try the --depth=immediates option.
>> It's new to Subversion 1.5 and I find it works much better than -N.
>>
>> --
>> David Weintraub
>> qazwart_at_gmail.com
>>
>>
>>
>> On Wed, Oct 15, 2008 at 9:50 PM, Geoffrey Plitt <geoff_at_gweb.org> wrote:
>> > when i do "svn add -N" on a folder, i expected it to make a ".svn"
>> > folder
>> > underneath, and then any files under there would have a "?" status.
>> >
>> > instead, the folder is added, but there is NO WAY to add the files
>> > underneath, becase it's not a working copy.  so what's the point of this
>> > mode?
>> >
>> > -g
>> >
>> > --
>> > https://twitter.com/GeoffreyPlitt
>> >
>
>
>
> --
> https://twitter.com/GeoffreyPlitt
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-16 20:32:20 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.