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

Re: Is there a repo/workspace mapping in SVN just like Perforce's client spec?

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 25 Sep 2008 14:58:33 -0400

For those who never used Perforce. Let me explain what "BAZ" is talking about.

In Subversion (like CVS) when you do a checkout, you checkout that
module directly into a working directory, plus (by default) all
sub-modules just as they are stored in the repository. There is no
need to describe what you want before you get it.

Perforce is like Clearcase where you have to create a "client' before
you can do your checkout. In Subversion, you specify what you want to
checkout via the Subversion URL. In Perforce, you explain what you
want to checkout via the client specification.

So, checking out in Perforce is a two step process:

Step #1: Create a client explaining what you want to checkout.
Step #2: Do the checkout command with that client specification.

This makes the standard checkout in Perforce a bit less spontaneous,
but it does allow me to do something that you can't do in Subversion:
Specify what I want my working directory to look like once everything
is checked out. In Subversion, my working directory is mapped exactly
the way it is in my source repository. In Perforce, I can remap my
working client not to reflect my source repository.

For example, I might checkout a project that has hundreds of files of
help documents that I simply am not interested in. In Subversion, not
checking out those help documents without the rest of the project is
extremely difficult. In Perforce, I can map my workspace to check out
the entire project, but not checkout those help documents.

Another reason why I might want to remap my working directory is if
the project I checkout is dependent upon an external project. In
Perforce, I specify in my "client" that I want to checkout project
"A", and then checkout external project "B" as a sub-directory of
project "A".

So, BAZ, if this is the type of mapping you need to do, you do this by
using the Subversion property "svn:externals" on the main project to
map it to the external project. For example, in Perforce, my client
will look like this:

//deploy/projectA/MAIN/... //workspace/projectA/...
//deploy/projectB/MAIN/... //workspace/projectA/B-lib/...

In Subversion, I would do this by attaching the attribute
"svn:externals" to directory "projectA" with the following mapping:

B-lib http://svn/dev/projectB/trunk

Now, when I checkout project A, I automatically get a sub directory
B-lib with projectB underneath it, and there is no need for a client
spec.

All other client mappings that Perforce can do cannot be done in Subversion.

--
David Weintraub
qazwart_at_gmail.com
On Thu, Sep 25, 2008 at 1:46 PM, baz themail <bazthemail_at_gmail.com> wrote:
> Hi,
>
> Is there a repo/workspace mapping in SVN just like Perforce's client spec?
> Is it common in SVN? What is the best practice or common thing to do in SVN?
>
> Thanks.
>
> A.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-25 20:58:54 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.