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

svn fetch

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-11-15 05:09:27 CET

One of the ideas that I had in the meeting last Friday was to rationalize
some of our subcommands into a single concept. There may have been a name or
two beforehand, but it ended up as "svn fetch".

The basic concept is simple: fetch me some data.

The form of the command is also simple:

    svn fetch [-r rev] [URL] [wc-path]

The combinations are:

1) svn fetch [-r rev] URL

  a) "." is a working copy: fetch any necessary data and switch the working
     copy to correspond to URL (of a specific revision)

  b) "." is not a working copy: fetch the contents of URL (of a specific
     revision) into "."

2) svn fetch [-r rev] URL wc-path

   fetch data (of a specific revision) into the specified wc-path

3) svn fetch wc-path

   fetches updated data for wc-path from its corresponding URL

4) svn fetch

   same as (2) with "." as default wc-path

svn checkout == cases 1b and 2
svn update == cases 3 and 4
svn switch == case 1a

The only question is how to handle the case when a URL is provided: where to
put the resulting (new) data. For example:

  $ svn fetch http://svn.collab.net/repos/svn

Does that create ./svn/ and put everything there? Or does it put the
contents into my current dir?

"svn switch" would prefer the former interpretation. "svn co" prefers the
latter. If the fetch command is going to fetch new data, then either
approach is valid since the "-d" switch can adjust the behavior.

Fetch could obsolete the checkout, update, and switch commands in one fell
swoop. We would probably choose the "new data behavior" to create a subdir
rather than fetch into "." -- this would mirror "svn checkout" behavior.
"Switching" "." is as easy as fetching the target branch using "-d ." to put
the results into the cwd.

checkout and update (and their aliases) would be aliases of "svn fetch".

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
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:48 2006

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.