On 2001-08-24 08:28:11 "Bill Tutt" wrote:
>The command line client has the following note for checking out files:
>
> /* TODO Fixme: This only works for one repo checkout at a shot. In
> CVS, when we checkout one project and give it a destination
> directory, it dumps it in the directory. If you check out more
> than one, it dumps each project into its own directory *inside*
> the one that you specified with the -d flag. So, for example, we
> have project A:
>
> A/one_mississippi.txt
> A/two_mississippi.txt
> A/three_mississippi.txt
>
> And project B:
>
> B/cat
> B/dog
> B/pig
>
> If I do 'cvs -d :pserver:fitz@subversion.tigris.org:/cvs co -d foo
>A', I get the following:
>
> foo/one_mississippi.txt
> foo/two_mississippi.txt
> foo/three_mississippi.txt
>
> But if I do this 'cvs -d :pserver:fitz@subversion.tigris.org:/cvs
> co -d foo A B', I get the following:
>
> foo/A/one_mississippi.txt
> foo/A/two_mississippi.txt
> foo/A/three_mississippi.txt
> foo/B/cat
> foo/B/dog
> foo/B/pig
>
> Makes sense, right? Right. Note that we have no provision for this
> right now and we need to support it.
I can see that this could be helpful for interactive use.
But if you do implement it, *please* provide a way to defeat it.
If I write a script that calls Subversion to check out a number
of projects into a directory, I do *not* want the behaviour to
alter just because that number happens to be 1. My script would
have to look at the number of projects, and strip off a directory
level if there was only the one. And if the script is working from
data, that doesn't work at all: for instance, "check out the projects
specified and copy the following list of files from them". The strings
in the list of files can't magically acquire or lose a path element!
So I want predictable behaviour, which means I need a way to get
foo/A/one_mississippi.txt
foo/A/two_mississippi.txt
foo/A/three_mississippi.txt
Then I can do things like
svn co -d foo $projects # but a different syntax to -d?
munge foo/*/Makefile
and it works even if $projects only has one entry.
People are more adaptable than programs, and heuristic behaviour
is often desirable for them, but predictability rules for programs.
For people, Do What I Mean.
For scripts, Do What I Say.
By all means make the behaviour you describe be the default.
That's another nice guideline: minimize typing for interactive
use. It's no trouble having long argument lists in a script,
because you only have to type them the once.
If you agree to this idea, let me know if there's anything I can
do to help implement it.
Peter.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:36 2006