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

Recursive client operations not intuitive

From: Norbert Unterberg <nepo_at_gmx.net>
Date: 2004-07-31 10:35:04 CEST

I (as a user) have problem with the sematics of the recursive client
operations. In my opinion they do not work as a "normal" user might expect.
However, I can only speak for the DOS/Windows world, I don't know about the
typical recursive semantic under the *x operating systems.

I am used to the behaviour that I can use both a wildcard mask and the
recursive operations. They do not exclude each other. When I do a

        dir /s /b *.txt

in a windows command line the command lists all text files in all
subdirectories:

        D:\test>dir /s /b *.txt
        D:\test\test1.txt
        D:\test\test2.txt
        D:\test\dir\test1.txt
        D:\test\dir\test2.txt

(/s is the CMD equivalent to -R, and /b is to display as simple file list)

When I do the same with svn, the -R does not seem to work:

        D:\test>svn ls -R *.txt
        test1.txt
        test2.txt

Where is the recursive operation? Replace the ls with proset, info or
whatever svn subcommand you like, they seem to behave the same in this
respect.

Ok, I have now learned that recursive operations only work on the exact
target you specify, not on the target wildcard mask in the current direcotry
and it's descendents. Since *.txt does not specify a directory, the svn
operation only works _on_ *.txt, and the -R does not have any meaning. It
gets worse if you actually have a directory named dir.txt. If I run
        svn propset -R svn:eol-style native *.txt
This command sets the property on all *.txt files in the current directory,
and on all *.txt files in *.txt directories.

Is that really what a typical user would expect from -R? What is the typical
use of -R as you have designed it?

There will be some users who might reply "Hey, you could always write a
script to do that" or "Why don't you use 'find -blah *.txt | xargs
-someoption svn dosomething *.txt'". But what does svn have the -R for, when
it does not work on files recursively? I have the feeling that many usages
of -R would make sense on files, like

   svn propset -R svn:eof-style native *.c *.h

to set a property in the complete project directory

What do you think?

Sorry for stealing your time

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 31 15:38:22 2004

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.