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

Re: Making import syntax consistant with mv, cp, export

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-10-22 22:39:40 CEST

Karl Fogel <kfogel@newton.ch.collab.net> writes:

> "B. W. Fitzpatrick" <fitz@red-bean.com> writes:
> > > What if we were to toss import/export and just make them special cases
> > > of copy (non-URL non-wc-path parameters).
> >
> > I'm -1 on this. I think having an import command is an important
> > distinction.
>
> Why? :-)
>
> I'll tell you why I ask so suddenly. I just started working on issue
> #933, and pretty soon found all roads leading to `import' simply being
> a `cp' that works on non-versioned items.
>
> Before I go any farther, we need to figure out what we want. I'm
> beginning to think what we want is for 'svn cp' to Do The Right Thing
> when copying non-versioned data to a URL dest.

I agree that this is a great approach, at least in terms of internal
implementation.

But I think that the concept of 'import' should *not* magically
absorbed into the idea of 'cp'. Here's why:

  1. We already have 4 'svn cp' use-cases. Let's not add a 5th.
      Talk about brain clutter.

  2. The concept of 'import' and 'copy' don't necessarily blend for
      everyone. When I do an import, for example, I don't think of it
      as a copy; I think of it as a shortcut to 'svn checkout; svn add
      -R; svn commit'.

  3. An 'import' is usually a one-time special event. The concept is
      friendly to CVS users, which is important. I don't want the
      concept to go away just because it *can* go away. It's the same
      reason we didn't blend 'checkout, update, switch' all into a
      single 'fetch' command. It's a matter of walking the fine-line
      between too many subcommands (like bitkeeper, so others tell
      me), and too *few* subcommands.

Anyway, I guess I'm just suggesting that you keep the same old 'svn
import' command, and give it the copy-like syntax:

    svn import from-dir to-URL

... and under the hood, if you want to call a variant of
wc_to_repos_copy, then great!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 22 22:41:39 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.