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

"svn add" acts non-recursively without -N given

From: Molle Bestefich <molle.bestefich_at_gmail.com>
Date: 2006-02-15 16:14:08 CET

Hi

svn add --help has this option:
  -N [--non-recursive] : operate on single directory only

I'm trying to run svn add * in recursive mode in a folder where some
versioned items exist.
In a subfolder under those versioned folders are items which are
unversioned and which I'd like to have added.

This doesn't work, because svn add stops recursive processing when it
hits a folder that is already versioned.

Example:
# svn co svn://<etc> test ; cd test
# mkdir abc ; svn add abc
# svn ci -m ""
# touch abc/123
# svn add *
^^^-- svn skips abc/123
# svn ci -m ""
^^^-- I don't get what I expect. I have to walk my dir structure myself.

This might be a design decision made to speed up the common case of
adding a folder by accident, where you don't want svn add to recurse
just to find lots of already-versioned files?
I think it's a design flaw =).

So I thought, what common UNIX behaviour can we compare with?
Perhaps 'cp -r', let's try what that does:
# mkdir "a" "b" "a/1" "b/1"
# touch a/1/file1
# touch b/1/file2
# cp -r a/* b/
# ls b/1/
file1 file2

Seems it does exactly the correct thing (in my opinion).

How about 'svn status'?
Also correctly shows status for files even though they're in a versioned folder.

Can we please change svn add to stop acting non-recursively in
recursive mode when versioned items are hit?

BR!

PS. Using svn v1.3.0

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 15 16:18:24 2006

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

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