You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Geoffrey Plitt <ge...@gweb.org> on 2008/10/16 01:50:04 UTC

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

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

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

Posted by David Weintraub <qa...@gmail.com>.
On Fri, Oct 17, 2008 at 6:12 PM, Geoffrey Plitt <ge...@gweb.org> wrote:
> thanks for the reply! i think i know where i went wrong - i'm dealing with a
> symbolic link.
>>
> it doesn't work for symlinks?

Um, no. Think of it this way... You are telling the Subversion
repository that there is a special entry in your working directory
that is not really a directory, but a special type of file. (Which is
what a Symbolic link really is). Although you can transcend a symbolic
link via the "cd" command, that's the operating system doing that. To
Subversion, you are no longer under your working directory (which is
really the case).

Imagine the possibilities if you could do that!

$ root svn co svn://localhost/trunk/myproject
$ cd myproject
$ ln -s /net/some_other_computer/home/george george
$ svn add george
$ cd george
$ touch foo
$ svn add foo

In the above example, I did a symbolic link from some other computer
and to the home directory of some poor slob named george. I am now
adding a Subversion files to George's home directory. So, now what
happens when others check out this project? Do files mysteriously get
added to poor George's HOME directory?

Also think about what happens if I check out the file on a Windows
system that doesn't have symbolic links. How would Subversion be able
to handle that?

--
David Weintraub
qazwart@gmail.com

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

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

Posted by David Weintraub <qa...@gmail.com>.
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@gmail.com



On Thu, Oct 16, 2008 at 1:40 PM, Geoffrey Plitt <ge...@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 <qa...@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@gmail.com
>>
>>
>>
>> On Wed, Oct 15, 2008 at 9:50 PM, Geoffrey Plitt <ge...@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Geoffrey Plitt <ge...@gweb.org>.
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 <qa...@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@gmail.com
>
>
>
> On Wed, Oct 15, 2008 at 9:50 PM, Geoffrey Plitt <ge...@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

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

Posted by David Weintraub <qa...@gmail.com>.
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@gmail.com



On Wed, Oct 15, 2008 at 9:50 PM, Geoffrey Plitt <ge...@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
>

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