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

Re: Confused about non-recursive behaviors

From: Tim Hill <drtimhill_at_comcast.net>
Date: 2006-12-15 01:25:12 CET

Actually, I tend to agree with you -- the behavior of "svn add" is
non-intuitive. Consider:

        svn add .

According to the documentation, the default behavior of svn add is
recursive (in fact, you cannot add the -R switch, which I consider a
minor bug). However, the actual behavior (without the --force
switch), as you noted, is for "svn add" to stop if the current
directory is already under version control. I don't understand this
logic: if its supposed to recurse, why should the correct behavior be
to stop under these conditions? It seems as if "svn add" is
extrapolating from the current directory to assume that _everything_
below this in the tree is also under control; clearly an incorrect
assumption.

IMHO the root cause of this is the rather discombobulated way in
which Unix systems treat wildcards and recursion; but that's probably
heresy so I'd better shut up <g>.

Anyway, at this point in time I strongly doubt the current behavior
will change; it would break too many scripts. You'll just have to
remember to use the --force switch.

--Tim

On Dec 14, 2006, at 12:46 PM, Guyren Howe wrote:

> My
>
> svn add *
>
> is not descending into folders and adding files modified therein. I
> have added said folders to my repository.
>
> I've found threads, such as this one:
>
> <http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=13832>
>
> (from 2004, but that's what searching for 'recursive' finds).
>
> The link above is to the immensely confusing reply, to whit:
>
>
> I suspect the issue at hand is that your "includes" dir is already
> controlled. Since you're just saying "svn add *" the "*" never
> expands into
> the subdirectories which are already controlled.
>
>
> Say wha? I'm dying to hear how this comment makes sense. It seems
> to suggest that if I want the contents of my project sub-
> directories included in my repository, I should *not* add the
> directories! Huh?
>
> I did find the --force option on the add command, and that did
> descend into my subdirectories and find the changed files. But
> then, when I do commit, I don't see the modifications.
>
> Someone, somewhere, please explain why this is the sensible way for
> things to work. There is clearly some bizarre assumption at work
> here about how I'm supposed to treat my repository that I just
> don't get.
>
> (Also, some options about how to fix this would be nice, too. Do I
> svn delete my directories?)
>
> Many thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 15 01:25:45 2006

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