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

Re: svn switch arg ordering

From: mark benedetto king <bking_at_inquira.com>
Date: 2002-07-17 18:22:55 CEST

On Wed, Jul 17, 2002 at 12:47:26AM -0500, Karl Fogel wrote:
> Ben Collins-Sussman <sussman@collab.net> writes:
> > When I run 'switch', I speak the command out loud to myself in
> > English : "I want to switch TARGET to REPOS_URL". That's how I
> > always get the command right.
> If it helps at all, Ben, think of it like the Unix "ln" command. Your
> intuition, as described above, would make you want to type
> $ ln -s myshortcut /usr/local/BerkeleyDB.4.0/bin/db_recover
> or whatever, yet the syntax is actually:
> $ ln -s /usr/local/BerkeleyDB.4.0/bin/db_recover myshortcut
> So if you can't make this switch syntax seem intuitive, perhaps you
> can at least say to yourself "Oh, that's right, this is unintuitive in
> the same way as `ln'."


  Assumption: "ln" without the -s is fairly intuitive.

  Proposal: Thinking about the -s as a "establish a symlink from foo to bar"
  is the source of the counter-intuitiveness. Instead, "ln -s foo bar"
  should be read as "do what 'ln foo bar' would have done, but do it
  in a symbolic way".

Okay, back to the real thread:

Since "svn cp URL PATH" is very much like the proposed behaviour of
"svn co URL PATH", why not do away with "svn co" completely?

It is my understanding that the difference between "svn co" and "svn cp"
is that "svn cp URL PATH" also does an "svn add PATH". What if this
add operation was conditional on whether PATH was inside a WC or not?
This would make every use-case I can think of work, save one: when
the user wants to "svn co URL PATH" inside a WC without adding PATH to
that WC. I don't think I'd ever really want to do that, but we could
add an option to "cp" which is "--no-add".

This seems to elegantly model the interaction between the user, the WC,
and the repository. Also, it encourages people to think in terms of the
versioned filesystem, rather than "svn is just a nicer CVS".

One argument against this proposal is that the user may not be aware that
PATH is, in fact, part of a WC, and then might be surprised by the auto-add
(requiring --no-add implies that the user *knew* that PATH was part of
a WC).


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 17 18:28:40 2002

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.