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

Re: Export behaving badly

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-10-18 00:12:15 CEST

On Mon, 2005-10-17 at 08:13 -0400, Daniel Berlin wrote:
> > You seem to be going from "checking out a
> > directory would put the directory contents into the specified directory"
> > to "exporting a file should put the file into the specified directory".

> Well, yes.
> And what exactly is wrong with that?
> Why do you think the case for a single file should be different than the
> case for a directory when it comes to where we place them?

Do you understand that "cp -r dir1 dir2" and "cp file dir2" are not
parallel use cases? The second is shorthand for "cp file dir2/file".

In one case, the second argument *is* the target path; in the other
case, the second argument is the *container* for the target path.

> Do you honestly believe a user expects the cases to behave differently?
> As a user, it certainly surprised the heck out of me.

Neither one of us can claim to be a user in the sense which is relevant
to your argument here; we are both developers with lots of systems
programming knowledge. Your expectations appear to be biased from
having used cvs in a particular way.

>From what I can tell, in your mental model, exporting a file is
shorthand for exporting its containing directory but leaving out all the
other files. In my model, exporting a single file is like copying the
file to a designated target path, just like exporting a directory is
like copying that directory to a designated target path.

> IMHO, we are.
> I can't actually tell if you are arguing because you want to argue, or
> because you actually like the current behavior.

I think it's important to do things for the right reasons. Doing the
right thing for the wrong reasons can lead to making ancillary changes
which aren't right at all. If we buy your argument for changing the
behavior of "svn export file foo" when foo is an existing directory, we
might also change the behavior of "svn export file foo" when foo does
not exist, so that it creates a directory named foo and puts the file
into foo/file. I think that might be a mistake, because it would
violate the expectations of users who think of export as being like
copy. (Although I grant there is an argument from consistency with
hypothetical future "svn co file" functionality.)

You can take that as "I like to argue" if you're locked into those two
particular options.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 18 00:13:32 2005

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.