[p4] Emulate ClearCase

Weintraub, David david.weintraub at bofasecurities.com
Thu Sep 7 07:51:22 PDT 2006


Normally when I see something like "I want to use software package "A"
like we used software package "B", I get a bit squeamish. Each software
package has a specific "model" for its usage, and it is best to fit your
situation using that model.

Unlike ClearCase's dynamic views, Perforce clients are not normally
between systems (exceptions are for shared directories). Normally, each
user has their own workspace, and I really don't see why this cannot fit
your need. Why can't each user have a model of your webpage and any
database it uses on their development machines? That way, each user can
do their own experimenting. Use the "common" machine as a QA test bed
before deploying the software on your server. Users would make the
changes on their own system, and do initial testing. If everything is
okay, they could then do their testing on the QA machine, and if
everything is okay there, they could implement the changes on the
server.

A good way of doing this is to have a production Perforce user and a QA
user. These users would have read access on the Perforce depot, but not
write access. You then setup the QA client and Production Perforce
clients to use their web directory as their root directory. When a user
checks in their changes, they can go to the QA machine and simply sync
the new changes over to the QA machine. Once everything is tested on the
QA machine, users can then go over to the production system and sync the
changes over there. This makes deployment very simple, yet still tracks
the changes via Perforce. Also, if you discover that a deployment is
bad, it is fairly simple to sync back to the earlier version of the
files.

For example, you might have something like this:

Perforce branching is extremely different than branching in ClearCase,
and takes a lot of getting use to. Fortunately, once you get use to it,
you'll see quite a few advantages. Perforce uses directories to
represent branches, so it is extremely easy to see what branch a file
version is on. The branching structure makes it easy to implement both
shared and non-shared branches for each project. For example, you have
two projects "Foo" and "Bar". There is a common branch called ALPHA
between the two, and Foo has a branch called BETA while Bar has a branch
called GAMMA, you'd have the Perforce depot look like this:

	//Depot/Foo/MAIN/...
	//Depot/Foo/ALPHA/...
	//Depot/Foo/BETA/...
	//Depot/Bar/MAIN/...
	//Depot/Bar/ALPHA/...
	//Depot/Bar/GAMMA/...

To see the ALPHA branch, you could setup your Perforce client like this:

	//Depot/%1/ALPHA/...  //myclient/%1/...

This will download two directory trees under your Client's root
directory: One called "Foo" and one called "Bar". You could also setup
your view to select the particular branch too:

	//Depot/Foo/BETA/...  //myclient/Foo/...
	//Depot/Bar/GAMMA/...  //myclient/Bar/...

(Standard Perforce protocol says that projects are capitalized and
branch names are all caps. That way, it is easy to differentiate between
Projects, Branches, and regular directories. Sort of like ClearCase's
protocol stating that labels are all caps and branch names are all
lowercase).

I think this setup pretty much does what you're looking for.

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of
daaku6-66 at yahoo.com
Sent: Thursday, September 07, 2006 3:11 AM
To: perforce-user at perforce.com
Subject: [p4] Emulate ClearCase

Hi, 
 
Let me say first - I've used Perforce minimally and I like it compared
to most other SC systems. Its fast and simple - two important things for
a developer! 
 
But now I've been given a difficult task - move our code from ClearCase
(which has code from almost a decade) to Perforce. Moving the code
itself is not very difficult. We don't care much about preserving
history - as we're going to keep our ClearCase boxes around for a while
anyways. What is turning out to be difficult is our environment setups,
which are lightly speaking, horrible. 
 
Let me explain: 
    - We have a branch for each project 
    - We have multiple environment's which can be mapped to any given
branch 
    - We have a box where developers go an edit files 
 
As we are primarily developing web based content, we do not have a
build-deploy cycle. 
 
We have the `live` code from a branch, which includes checked-in &
checked-out files for a specific branch mounted on one of the
environments. This allows us to test out code without having to check-in
the files. Also, this allows us to share the environment between
multiple developers. 
 
I know I'm not doing a very good job of explaining things, so if more
clarification is needed - let me know. 
 
But basically, what I'm looking for is this: Be able to share a
workspace between multiple users, and yet let them check-out & check-in
files as themselves. 
 
 And RTFM replies with links to specific sections are okay!

Thanks! 
 
daaku


_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user


More information about the perforce-user mailing list