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

RE: Recursive add

From: John Lange <john.lange_at_bighostbox.com>
Date: 2004-07-08 19:47:24 CEST

On Thu, 2004-07-08 at 11:23, Campbell, Matthew A wrote:
> Another issue is the "atomic unit"-ness of
> the directory, so every subdirectory can potentially be treated as a working
> unit of its own.

Now this explanation makes sense and I can buy into that (almost) ;)

Lets say we have this simple structure which encompasses that idea:

project1
  - subdir_project1
  - project2

I could understand that "svn add *" wouldn't recurse the project2
sub-directory since it is a different project. However "svn add *" will
still add the "project2" directory to the project1 tree so it doesn't
really work for keeping them separate.

Also, why can't "svn add" recurse BOTH projects adding new files to the
appropriate project as required? Correct me if I'm wrong but svn uses
the .svn directories to know that the project2 directory is part of
project2 and therefore would know to add new files to that project
instead of project1.

So in this case a truly recursive add becomes even more powerful.

Anyhow, it looks like it has been changed in the 1.1 version with a
"--force" option. Though I don't agree with the design decision that it
should require the force option (since there is already a -N don't
recurse option) it never the less will be a good solution. BTW, I don't
pretend to have considered all the implications of why it would need a
--force option, I'm sure the designers have their reasons.

> I still think the cleanest approach (at least at the moment) is a wrapper
> script like I described before. Of course, I'm going to think that way
> since I've already done it. :-/

Shouldn't we be able to do something like:

alias 'svn add *'='find ./ | grep -v svn | xargs svn add'

? It doesn't work though, I tried it. I'm not great with the alias
command so maybe someone can point out whats wrong with the above? I
suspect you can't have spaces in your aliases?

-- 
John Lange
BigHostBox.com
(204) 885 0872
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 8 19:47:43 2004

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