Migration Planning Guide: IBM Rational ClearCase to Perforce

15
Perforce ClearCase to Migration Planning Guide: IBM Rational ClearCase to Perforce SCM

description

Common reasons for replacing ClearCase with Perforce include: Reduce operational costs Simplify access for users and distributed teams Expand capabilities Desire for a faster SCM system Excellent technical support

Transcript of Migration Planning Guide: IBM Rational ClearCase to Perforce

Page 1: Migration Planning Guide: IBM Rational ClearCase to Perforce

PerforceClearCase to

Migration Planning Guide:IBM Rational ClearCase to Perforce SCM

Page 2: Migration Planning Guide: IBM Rational ClearCase to Perforce

2

Table of Contents

1. Introduction ___________________________________________________________________________ 3

2. Preliminary Migration Preparation ______________________________________________________ 3

Reviewing Existing Branching Strategy ____________________________________________________ 3

Planning the Directory Structure __________________________________________________________ 3

DefiningReleaseProcessesandDirectoryStructureStandards _______________________________ 3

AddressingIntellectualPropertyConcerns _________________________________________________ 4

Training ______________________________________________________________________________ 4

Transition Team ________________________________________________________________________ 4

3. Import Strategies ______________________________________________________________________ 4

StartingOver(Tips) ____________________________________________________________________ 5

Pros _____________________________________________________________________________ 5

Cons ____________________________________________________________________________ 5

DetailedHistoryImport(DHI) ____________________________________________________________ 5

PreparationforaClearCaseDetailedHistoryImport _____________________________________ 6

ExtractingandImporting ____________________________________________________________ 6

CustomScripting __________________________________________________________________ 7

HardwareCapacityPlanning ________________________________________________________ 7

Pros ________________________________________________________________________ 7

Cons _______________________________________________________________________ 7

BaselineandBranchImport(BBI) ________________________________________________________ 7

Pros _____________________________________________________________________________ 9

Cons ____________________________________________________________________________ 9

Limitations ________________________________________________________________________ 9

4. Terminology and Concepts ____________________________________________________________ 10

VOBsandDepots ____________________________________________________________________ 10

RegionsandProtections _______________________________________________________________ 10

VOBServersandthePerforceServer ____________________________________________________ 10

OperatingSystemSelection ________________________________________________________ 10

RegistryandLicenseServers ___________________________________________________________ 11

ReleaseServersandInstallation _________________________________________________________ 11

ViewServers,ProtectingUnversionedandChecked-OutFiles ________________________________ 11

ClearCaseMultiSiteversusPerforceProxies ______________________________________________ 11

ClearCaseViewswithPerforceWorkspaces ______________________________________________ 12

Label Strategies ______________________________________________________________________ 12

UnifiedChangeManagement(UCM) _____________________________________________________ 13

MigrationTechnicalDetails _____________________________________________________________ 13

Evil Twins ________________________________________________________________________ 13

SymlinksonWindows _____________________________________________________________ 13

FileTypeMappingsandLimitations __________________________________________________ 14

5. Additional Resources _________________________________________________________________ 14

6. Migration Planning Checklist __________________________________________________________ 15

Page 3: Migration Planning Guide: IBM Rational ClearCase to Perforce

3

1. IntroductionThisdocumenttellsyouhowtoplantomigratefromlegacyClearCasetoPerforceSCManddiscussesstrategiesforimportingfilehistory.BasicfamiliaritywithClearCasearchitecture,concepts,andterminologyishelpfulbutnotnecessarywhenreadingthisdocument.AnynecessaryPerforceconceptsandterminologywillbeexplained.Inparticular,threehistoryimportstrategiesarereviewed:startingover(Tips),detailedhistoryimport(DHI),andbaselineandbranchimport(BBI).

ClearCase-to-Perforce migration projects vary greatly in scale and complexity. Small, simpleenvironmentswithbasicmigrationrequirementsaretypicallymigratedinabouteightbusinessdays,includingsettingupPerforce,migrating, and trainingusersandadministrators.Large,complexClearCaseenvironmentsmightperformaseriesofmigrationsoverthecourseofseveralmonthsormore,becauseindividualteamsmigrateatconvenienttimes.

Thisdocumentisnotintendedtoreplaceanassessmentofyourenvironment.Anassessmenthelpsyoufocusonfactorsthatarerelevanttoyourenvironmenttoproduceacustommigrationstrategy.ForassistancewithyourPerforcemigration,pleasevisitperforce.com/consulting.

2. Preliminary Migration PreparationThefollowingfactorsinformamigrationstrategyfromClearCasetoPerforce.

Reviewing Existing Branching StrategyEarlyinmigrationplanning,determinewhetherthebranchingstrategythatyouusedinClearCaseisappropriatetousewithPerforce.Ifnot,decideonthestrategyyouintendtousewithPerforce.CreatinganinitialbranchingstrategyisabestpracticewhengettingstartedinPerforceinanycase,moresoinamigrationscenarioifyouaregoingtopreserveanyhistory.

Planning the Directory StructureWithPerforce’sInter-FileBranching™mechanism,thedirectorystructureandbranchmodelarerelated.Awell-defineddirectorystructurehelpsconveybranchstructureandsoftwarelifecycleinformation, makingitintuitivetouse.Afterabranchingstrategyisidentified,youcanmapittoahigh-leveldirectorystructure,orPerforceDirectoryStandard(PDS),inPerforce.SeeAdditionalResourcesattheendofthisdocumenttodownloadatemplatefordevelopingyourownPDS.

Defining Release Processes and Directory Structure StandardsThinkofthedirectorystructureinPerforceashavinglowandhighlevels.Lowlevelscontainyoursoftwareproducts.Highlevelsdefinebranchingstructure,projectmanagement,andsoftwarelifecycleinformation.Awell-designedhigh-leveldirectorystructureisintuitivefordevelopersandlendsitselfwelltoprojectmanagementmetrics,policyenforcementbybranchtype,andautomation.

MigratingtoPerforcetypically involvesdefiningaPerforceDirectoryStandard foreachproductimported intoPerforceand, insomecases, foryourentireorganization.Thehigh-levelstructureencouragesconsistencyinreleaseprocessesforvarioussoftwareproductsbutcanbeflexibletoallowdifferentsoftwareproductstohavedifferentreleaseprocesses.Forexample,onesoftwareproductmightbealicensedsoftwareproduct,thereleaseprocessforwhichdefineshowoldreleasesaremaintainedandpatched.Aweb-basedsoftwareproductoperatedinyourowndatacenterfollowsadifferentreleaseprocess,withlittleneedtomaintainoldreleasesbutarequirementforrapidupdates.

Page 4: Migration Planning Guide: IBM Rational ClearCase to Perforce

Migration Planning Guide: IBM Rational ClearCase to Perforce SCM 4

Stillanotherproductmightbeasetofgenericcomponentsthataredeliveredtocustomersandthenheavilycustomized,perhapsbyyourownprofessionalservicesorganization.

ReleaseprocessesfordifferentsoftwareproductsmightvarybecauseofthenumberofcontributorsandthedegreeofstructureofQAprocesses.Softwareproductscanfollowthesamereleaseprocess,eventhoughtheyhavedifferentreleaseschedules.

Tominimizethedifficultyandimpactofmigration,thelowlevelsofthedirectorystructure(forexample,buildscripts,releaseprocessesandtools,andsoon)areuntouched.

Addressing Intellectual Property ConcernsKnowingwhereyoursourcecodecamefromandknowingwhatlegalrightsyouhavetoitcanbeaprioritywhenmigratingtoanewSCMsystem.Ensurethatthemigrationdoesnotaffectintellectualpropertyprovenance.YourmigrationprocessesmustprovideaclearaudittrailsoallimportedfilescanbetracedbacktotheoriginalClearCaserepository.

SCMsystemsstorevaluableintellectualproperty.Ifsensitiveinformationisbeingmigrated,boththemigrationprocessandtheresultingPerforceenvironmentmustensurethataccessiscontrolledaswellasitwasinClearCase.

Migrationsprovideanopportunitytoreviewaccesscontrolpolicies.Insomecases,ensuringprotectionsofintellectualpropertyrequiresextraeffort.Inothercases,migrationsexposeparticularlyweakaccesscontrols,andPerforce’spowerfulandflexibleaccesscontrolcapabilitiesprovideastraightforwardmeansofguardingintellectualproperty.

TrainingToensureasmoothmigration,andtohelpusersgetthemostfromPerforceafteramigration,trainingforPerforceusersandadministratorsisessential.ItismosteffectivetotrainmostofyourusersafewdaysorweeksbeforethecutovertoPerforce.SeeTraininginAdditionalResourcesformoreinformation.

Transition TeamWerecommendestablishingatransitionteam—acoregroupthatincludesapplicationadministrators,systemadministrators, andother influential users—todefinehowPerforcewill beused in yourorganization,howitwilltieintoyourvariousprocessesandworkflows,andhowtointegrateitwithothersystems.YoumayevenwishtoengagePerforceConsultingtobeapartofyourtransitionteam.

For larger,morecomplex,migrationswerecommendthetransitionteammemberstakePerforcetrainingearlyintheplanningprocess.Thisallowsforbestpracticesestablishedbytheteamtoevolve,bedocumented,andproliferateduringthetrainingofthelargerusercommunitylaterinthemigrationprocess.

3. Import StrategiesTherearethreeapproachesforimportingfiles:•Startingover(Tips).

•Detailedhistoryimport(DHI),whichcanbeexhaustiveorselective.

•Baselineandbranchimport(BBI),whichisinherentlyselective.

Page 5: Migration Planning Guide: IBM Rational ClearCase to Perforce

5

Selectivemeansthat,withinagivenbranch,detailsofactivitiesperformedcanbepropagatedtoPerforce,includingfilecontentsateachrevisionandtheuserID/date/time/check-incommentassociatedwitheachcheck-in.

Thefollowingsectionspresentanoverviewofthestrengthsandlimitationsofeachimportstrategy.

Starting Over (Tips)This strategy involves getting the latest fileversions,or“tips,”fromClearCaseandaddingthemtoPerforce.Nohistoryispreserved.

Defineahigh-leveldirectorywherethefileswillbestored,forexample://Eng/Gizmo/MAIN/src Intheprecedingexample,EngstandsforEngineering,Gizmoisaproductname,MAINindicatesfilesinthemainstreamofdevelopment,andsrcistherootofthelow-leveldirectorytree.Thelow-leveldirectorytreeiscopiedintoPerforce.

Thisapproach issometimesappropriate fordocumentationVOBsorVOBsforshelved(butnotterminated)projects.Itisrarelyidealforsourcecode,exceptforprototypeanddemocode.

Pros of Starting Over•Easy:YouonlyneedtodefinetargetdirectoriesinPerforceandthenaddthefiles.

•Fast.

•Noundesirablemetadata inPerforce.

Cons of Starting OverNohistoricalinformationisavailableinPerforce.

Detailed History ImportThisstrategyisthemostcompletecaseofconversion,andcapturesasmuchdetailedbranch/mergeinformationaspossiblesothatcomprehensivehistoricalresearchcanbedoneinthenewsystem withoutrequiringtheoldone.

Published,supportedtoolsexistthatimporthistoryfromCVS,RCS,VSS,andSubversiontoPerforce.PerforceSoftwarehasasophisticatedtoolandprocess,currentlyonlyavailableasaservice,thatenablesconversionofverydetailedhistoricaldatafromClearCasetoPerforce.ThetoolhasbeensuccessfullyusedforperformingdetailedhistoryconversionsfromfairlylargeClearCasedatasets(about100GB)toPerforce.

DetailedhistorymigrationsfromClearCasecanbeselective;asubsetofVOBscanbeimported,andwithineachimportedVOB,asubsetofallavailablebranchesandlabelstargetedforimport.Conversionincludesfilecontentsateachrevision,theuserid/date/time/checkincommentassociatedwitheachcheckin,filerenames,anddetailedbranchingandmerginghistory.ClearCase’srepresentationofbranchingactivityistranslatedintoPerforce“integrationrecords.”

TheimportprocessusesheuristicstogroupClearCase“checkins”intoPerforce“changelists.”Forexample,ifagivenuserchecked-inasetoffilesatthesametime(+/-afewseconds)withthesamecheckincomment,thosewillbegroupedtogetherasasinglePerforcechangelist.UCMmetadata,ifavailable,alsofactorsintothechangelistgrouping.

Page 6: Migration Planning Guide: IBM Rational ClearCase to Perforce

Migration Planning Guide: IBM Rational ClearCase to Perforce SCM 6

OurmigrationprocessstartsbyscanningrepositoriesforvariousissuesthatneedtoberesolvedinClearCaseorotherwisehandledmanuallypriortomigration.Examplesofthingsthatmustberesolvedpriortomigrationinclude:•“Eviltwin”filesanddirectories.

•Unusualhistoricalpatterns,suchaschangingthetypeofanobjectfromasymlinktoadirectory,andthentoafile.

•ArchitecturalandconceptualdifferencesbetweenClearCaseandPerforce.Forexample,mappingClearCaselabelstoPerforceprovesratherdifficultbecausetypicalusageoflabelsvariesbetweenthesystems,aswellastheunderlyingimplementations.

•Certainrare“circularmerge”activities.

•MilddatacorruptioninClearCaserepositoriesthatnormallymightnotbevisible,butisexposedwhenrunningcertaincommandsusedbyadetailedhistoryconversiontool.

Migratingdetailedhistory fromClearCase isharder thandoingso fromanyotherSCMsystem.ConceptsfromUCMandRUPthatdependonClearCaseattributes,triggers,etc.,arenotfullyhandledmechanically.DependingontheamountofdatabeingmigratedandthespeedofClearCase,itmightrequirerunningsystemsinparallel.Themechanicalextraction/importofalltheinformationfromatypicalClearCasesetupwithyearsofhistorymighttakedaystoperform,andtheperformanceislimitedmainlybythespeedofClearCase.

Preparation for a ClearCase Detailed History ImportIfyouengagePerforceConsultingtohelpyouplanadetailedhistorymigrationfromClearCase,hereareafewthingstobeawareofearlyinyourplanningprocess:•AreplicaofyourClearCaseenvironment,includingallVOBstargetedforimport,shouldbeprovisionedonhardwareseparatefromyourproductionenvironment.Thisallowsdryrunsandotherdataanalysisthatcanbeundulytaxingonaproductionserver.

•Apowerful,dedicatedmigrationservermachinemustbeavailable.ThiscouldbethenewPerforceservermachine,andmustbeaLinuxserver,eveniftheproductionandreplicaserversareWindows.AfastnetworkconnectionbetweentheClearCasereplicamachineandthemigrationserver(whichcanbethePerforceserver)isessential.

•Migrationisaveryresource-intensiveprocess,andcanbeverydemandingintermsofdiskspaceandRAMresources.ItismoredemandingthanactualPerforceserveroperationbecauseyearsofworkinClearCasearebeingcompressedintohoursordays.

•100GofVOBdataconvertsinabout18hours,whichisthemaximumamountoftimeyouwouldwantamigrationtotake.Dealingwithlargerrepositoriesispossible,butrequiresmoresophisticatedmigrationstrategiesandmorehardwaretoenableparalleloperationofmultipleVOBs.

Extracting and Importing Detailedhistorymigrationscanbefront-orback-doorimplementationswithrespecttobothextractionfromClearCaseandimportingintoPerforce.Dependingonyourenvironmentandmigrationplans,awarenessofthecapabilitiesandlimitationsofeachstyleisimportantwhenplanningmigrations,especiallyformulti-phasedmigrationsinvolvingmultipleteamsmigratingovertime.

Front-doorimplementationsoperateasaregularuserwould,using“cleartool”or“p4”commandstointeractwithalive,runningClearCaseorPerforceserver.

Back-doorimplementationsextractdatadirectlyfromVOBdatabases,orgeneratePerforcemetadataintheformofaPerforcecheckpointonimport,andrequiretherespectiveserverstobeoffline.

Page 7: Migration Planning Guide: IBM Rational ClearCase to Perforce

7

PerforceSoftware’smigrationtoolforClearCasemigrationsis“frontdoor”withrespecttoextractionfromClearCase,and“backdoor”withrespecttoimportingintoPerforce.BeingfrontdoorontheClearCasesideenablesthetooltoworkacrossmanyClearCaseversions,whilebeingbackdooronthePerforcesideallowsittogeneratethemostaccuraterepresentationsofClearCasehistoryintermsofPerforcejournalrecords.

Custom ScriptingAdetailedmigrationsometimesinvolvescustomscriptingduetodifferencesinClearCaseusageandanyodditiesinaparticulardataset.

Hardware Capacity PlanningHardwarecapacityplanningmaybeimpactedsignificantlywithDHImigrations.AnSCMsystemwith,forexample,12yearsofhistorywouldrequiremorehardware(morediskspace,moreRAM,fasterCPUsandI/Osubsystems,etc.)thanonewithnohistory.Ifyouimport12yearsofdetailedhistory,yournewPerforcesystemwillinitiallyrequireasmuchhardwareasifithadbeeninoperationfor12years.

Pros of a Detailed History Import•Mostcompleteapproach.Detailedhistoryimportscantransferthemosthistoricaldetail,includingbranchinghistory,fromClearCasetoPerforce.

•Afterthemigration,comprehensivehistoricalresearchand“mergeforensics”canbedoneinPerforcewithouttheneedforgoingbacktoClearCase(werecommmendkeepingoneuserlicenseinClearCaseasabackup).

•TheabilitytoviewfilehistorywithPerforce’spowerfulvisualizationtoolslikeTime-LapseViewcanshednewlightontheevolutionofsourcecodeandhelpincreaseunderstandingofthechangesovertime.

•Thereisanincreasedbenefitforsystemsintegratedwithversioncontrol.Forexample,themeaningofthelinkagebetweenasetoffilesoriginallymodifiedinClearCaseandanissuefromyourissuetrackingsystemcanbemaintained.CodereviewtoolssuchasSmartBearCodeCollaboratorwillhavegreatercontext.

•UnlikePerforce,ClearCasedoesnotvalidatetheintegrityofversionedfilecontentsusingchecksums.Filecorruption,forexample,becauseofdiskfailures,goesundetected.1 Once historicaldataisinPerforce,itwillgainthebenefitofchecksumverificationofcontentsofallrevisions,whichimprovesIPprovenance.

Cons of a Detailed History Import•DetailedhistoryimporttoolshaveavarietyoflimitationsandtechnicalcaveatsbecauseofthepotentialcomplexityofClearCaseenvironments,includingunusualpatterns(orevencorruption)inthedata.So-calledevil-twinelementsorbranchingscenarioscreatedbymisconfiguredconfigspecscanbedifficulttofollow.

•Complexmigrationscanmeanpotentialscheduleandbudgetrisksforthemigrationproject.

Baseline and Branch Import (BBI)TheBBIstrategyprovidesalightweightmigrationalternativethatismoresophisticatedthantheTipsapproachandavoidsthetechnicalcomplexityandscheduleandbudgetrisksofdetailedhistoryimports.

BBIisagenericfrom-anything-to-Perforceprocess,andhasbeenusedtomigratetoPerforcefromavarietyofSCMsystems,includingIBMRationalClearCase,BorlandStarTeam,MerantPVCS,

1.ClearCasedoeshavea“checkvob”utilitythatcandetectandfixsomeformsofmetadatacorruption.However,thisutilitydoesnotdetectdatacontainercorruption,and thusthecontentsofversionedfilescannotbeaudited.

Page 8: Migration Planning Guide: IBM Rational ClearCase to Perforce

Migration Planning Guide: IBM Rational ClearCase to Perforce SCM 8

Subversion,Mercurial,CVS,MicrosoftVisualSourceSafe,AccuRev,andevenunsophisticatedSCM“systems”likeasetofnetworkdriveswithdirectoriesnamedforreleases.

WiththeBBIapproach,the“interestinghistory”tobeimportedisspecifiedusingabranchdiagramthatshowsthebaselines(snapshotsofadirectorystructureataspecifiedpointintime)andmajorbranchingoperations.Forexample,Figure1representsasoftwareproduct.Thebaselines(bluedots)indicatethe“interestingversions”thataretobeimported.Thearrowsindicatebranchingoperationsthataffectanentirebranch.Inthisexample,a2.0-Relbranchhasbeencreated,andfourpatcheswerecreatedfromthatbranch.TwoofthosefourpatcheshavebeenmergedbacktoMAIN.TheBBIprocessimportsallthebaselines,recordsthatthetwopatchesweremergedwithresultingupdatestoMAIN,andtracksthetwounmergedpatches.Aftermigrating,youcanusePerforcetocompletethosemerges.

Figure 1: Sample baseline and branch diagram

ImportingthebranchingoperationsenablesPerforcetoselectcommonancestorswhenmerging,soyoucanresumebranchingactivitiesaftermigration.TheBBIprocessimportsbranchingoperationsatahighlevel,capturingthesumofmergeoperations.Forexample,inFigure1,themergeofp2backtoMAINmostlikelyconsistedofaseriesofmergesbyseveraldevelopers.Theindividualfilemergesarenottracked,butthesumoftheresultsofthemerges(fileadds,edits,anddeletes)aretracked.Theimportedbaselinerepresentsthepointintimewhenthemergeofp2iscomplete.

TheintentofthisapproachistobringoverjustenoughbranchinghistorytoanswerkeyquestionssuchaswhatdidRelease2.0looklike,wherewasthisfilebranchedfrom,andwhatfilesdoIneedinmyworkspacetostartmaintenanceworkonRelease2.3?TheBBIapproachpreservesfilecontentsatkeypointsandpreservesenoughbranchinghistorysothattheswitchtoPerforcecanhappenatanypointinthereleasecycle,ratherthanjustat“convenientpoints”intheschedule(whichtendtobehardtofind).

Afterconversion,PerforcecontainsthehistoryofyoursoftwareproductviewableusingtheRevisionGraphtool,andthehistoryissimilartowhatwouldhavebeenrecordedifdevelopmentwasdoneusingPerforcetobeginwith.Detaileddataisdiscarded:youknowwhatyourproductlookedlikeatRelease1.0andRelease2.0,forexample,buthundredsofcheck-insbetweenthosebaselinesarediscarded,asaretheuserID,date,time,andcheck-incomments.

AccuratediagramsareessentialforplanningaBBImigration.Ideally,releaseengineerscanquicklydrawanaccuratebranchhistoryforeachsoftwareproducttobeimported.Ifthatisnotthecase,suchinformationcanbeextractedbyexploringClearCasemanually.Afterthediagramisdrawnandverified,itistranslated intothePerforcecommandsthatre-createthebaselinesinPerforce.Thefirst

Delivered(Released)

MAINBranch

1.0 2.0 2.1 3.0 4.0

2.0 RelBranch

2.1 (new features)+ patch p1 merged

2.1 (new features)+ patch p2 merged

3.0 RelBranch

p1 p2 p3 p4 p1

Page 9: Migration Planning Guide: IBM Rational ClearCase to Perforce

9

baselineiscreatedbyaddingtheentireproductdirectorytree.SubsequentbaselinesarecreatedusingPerforcechangeliststhatperformthechanges(filesadded,deleted,ormodified).BranchingoperationsaretranslatedintotheirPerforceequivalents.ClearCasemergesarerecordedastheresultsofthemergesdoneinClearCase.

Ifdetailedhistoricalresearchisneededoften,keepClearCaseonline(perhapswithasinglelicense)forayearortwoafteraBBImigration.

Pros of a BBI Strategy•Givesyoutheflexibilitytodoamultisystemmigrationofdifferentteamsontheirownscheduleswithoutimpactingothers.BecausetheBBIapproachworksagainstalive,runningPerforceServer(ratherthangeneratingseparatePerforceServerinstanceslikesomedetailedhistoryimporttoolsdo),theprojectplanningforthevariousteamsdoesnotrequirecoordination.EachteamcanmigratetoPerforcewithoutimpactingthosealreadyonPerforce.

•“Interestinghistory”isavailableinPerforce.Aftermigrating,youcanusePerforce’spowerfultools,suchasDiff,RevisionGraph,andTime-lapseView,toseeyouroldfilesinanewlight.Detailedhistoryhasbeenomitted,butyoucantellhowthesoftwareproductevolved.

•TheBBIprocessisfairlystraightforwardandhaslittleriskoftechnicalproblems.

•YoucanloadallofthehistoricalinformationintoPerforcepriortomigrating.Then,onthedayofthemigration,onlythebaselinesrepresentingthelatestactivedevelopmentbranchesneedtobebroughtintoPerforcebecauseallhistoricalinformationhasalreadybeenimported.

•BBIrunsveryquickly,sodryrunscanbedonetotestanysourcecodechangesrequiredaspartofthemigration,suchasupdatestobuildscriptsormakefiles.

•TheamountofmetadataresultingfromBBIisnegligibleanddoesnotaffectserverperformanceorrequireincreasedhardware.

•Youcannormalizehistorybycreatingbranchesinaconsistentmanner.WherebranchingstrategieshaveevolvedovertimeinClearCase,youcansimplifyhistoricalresearchoftheimportedbaselines.WiththeBBIapproach,youcanrestructurethedepottoshowhow“softwareproductXwenttoproduction”inthesamewayforeachoftheimportedsoftwareproducts.

Cons of a BBI Strategy•Iffileswererenamedordirectorystructureswerereorganizedbetweenreleases,thehistoricalconnectionbetweenoldandnewfilenamesislost.Forexample,ifafilefoo.cinversion1.0ofyoursoftwareproductwasrenamedtobar.cinversion1.1,therenameislost.ClearCaseandPerforcetrackrenamesdifferently,sothatinformationislostbyBBImigrations.BBImigrationscanhandlerefactoring,thoughadditionaleffortisrequiredtoidentifyrefactoringeventsandlayoutbaselinesinsuchawaythatfrom/toinformationisidentified.

•ClearCasesupportsversioningofsomeuncommon,low-levelfiletypesthatarenotsupportedinPerforce,suchasblockspecialdevicesandcharacterspecialdevices.Suchfilescannotbeimported,regardlessofmigrationstrategy.Symboliclinkscanbeimported,however.

Limitations IfSCMbestpracticeswerenotfollowed,reproducingthebaselinesmaybedifficultinClearCase.2

Forexample,ifbranchesweremadefrom/main/LATESTratherthanfromalabelonMAIN,gettingaconfigspectorepresentthebaselinefromwhichabranchwascreatedmayinvolvesomeguesswork,suchasusing /main/LATESTwitha–timeclause.

2.Unfortunately,thisisacommonscenariowithClearCase.

Page 10: Migration Planning Guide: IBM Rational ClearCase to Perforce

Migration Planning Guide: IBM Rational ClearCase to Perforce SCM 10

4. Terminology and ConceptsThefollowingsectionsmapClearCaseconceptstotheirPerforceequivalents.

VOBs and DepotsAPerforcedepot isroughlyanalogoustoaClearCaseVOB(whichstandsfor“versionedobjectbase”).VOBsanddepotsbothappearastop-leveldirectoriestousers,andbothstoreasetoffiles.OneVOBordepotmustexistbeforeanyfilecanbeversioned.

AVOBisacontainerforversionedfilecontentsandmetadatarelatingtothoseversionedfiles.APerforcedepotcontainsonlythecontentsofversionedfiles.AllmetadataisstoredinadatabaseonthePerforceserver.

WhenmappingVOBstodepots,considerthefollowing:•UnlikefilesinVOBs,filesinPerforcecanbebranchedtootherdepots.VOBsinClearCaseareeffectivelyislandsofcode.

•Perforcemanagesbinaryfilesefficiently,enablingyoutomanageallyourdigitalassets.ClearCasesitesavoidstoringlargenumberofbinariesbecauseofperformanceconsiderations.Forexample,asoftwareproductmightconsistofsourcecode,softwareproductsbuiltfromthatsourcecode,andvariousreleasedconfigurationsofsoftwareproducts.Aseparatedepotmightbeassignedforeach,forexample,//gizmo, //gizmo-build, and //gizmo-release.

•Perforcedepotnamesshouldbekeptshort. //Engineering is OK, but //Eng is better.

//Eng-AdvancedTechnologyGroup is a bit long, so //Eng-ATGisbetter.

Regions and ProtectionsInClearCase,networkregistryregionsareusedtosegregateVOBs.AregionseesonlyasubsetofallVOBsinaClearCaseinstallation.

ToachievesimilarsegregationinPerforce,youusetheprotections table.UsersareassignedtodifferentPerforcegroups.Accessisthenmanagedatthegrouplevelbyassigningpermissionstogroups.

VOB Servers and the Perforce ServerInClearCaseenvironments,youmighthavemultipleVOBserverprocesses,possiblydistributedamongmultipleVOBservermachines.WithPerforce,asinglePerforceServercansupportanentireinstallation.3ThePerforceServerprocess,P4D,runsonasinglemachine, is frugalwithsystemresources,andismuchlessdemandingthanClearCase.OneP4Dprocesscanscaletosupportextremelylargeenvironments(forexample,10,000+users)onasingleserverusingenterprise-gradeservermachines.

OneofthefirststepsinanymigrationistosetupPerforcehardware.ItiscommontoallocatetwoorthreeidenticalservermachinestoPerforcetoachievehighavailabilityanddisasterrecoverygoals.Atypicalconfigurationistwoservers(aprimaryandahotspare)inaprimarydatacenterandathirdserver(warmspare)inanotherdatacenterlocatedfarfromtheprimarydatacenter.

Operating System SelectionTheprimaryfactorinselectinganoperatingplatformforPerforceistheplatformthatthelocalITgroupismostcomfortablesupporting.InmixedWindows/*nixenvironments,UnixplatformsarealmostinvariablyselectedforClearCase,becauseofcasesensitivityreasonsandbecauseofitsrelianceon

3.DeployingmultiplePerforceServerinstanceswithinanenterpriseispossibleandcommon.Forthepurposesofthisdocument,weconsideronlythesingle-server-per-enterpriseapproachbecausethatbestsuitsmostClearCasemigrationscenarios.

Page 11: Migration Planning Guide: IBM Rational ClearCase to Perforce

11

effectivelymonodirectional(UnixÊWindows)filesystemmountstomakeVOBdataaccessibletoclientsonbothUnixandWindows.

YoucanconfigurethePerforceserveronWindowsor*nixinmultiplatformenvironments.OnlyaTCPconnectionisneededbetweenclientsandservers.Youcanconfigurethecase-sensitivitybehaviorofthePerforceServerindependentlyoftheplatform.

Registry and License ServersPerforcedoesnotrequirelicenseorregistryserverprocessesorhardwaretosupportit.Asimple0.5KBlicensefileonthePerforceServermachinecomposestheentirePerforcelicensemechanism.Forlargeenvironmentswithlotsofturnover,Perforceprovidesalternativelicensingschemesthatsupplyextralicensesforgrowth.

Release Servers and InstallationWithClearCase,toensureusersrunclientsoftwarethatiscompatiblewiththecurrentversionoftheserver,youmustmanageserverandclientversionscarefully.Toaidinensuringconsistency,someClearCaseinstallationsdeployareleaseserver,whichisadefinednetworkresourcefromwhichallusersareexpectedtodownloadcorrectversionsofclientsoftware.ThisapproachprovidesamorescalablealternativetomakingsureeveryonehastheinstallationCDavailable.

WithPerforce,allclientcomponents(andtheserver)installinminutesovertheWeb.Moreimportantly,Perforceclientsandtheserverhaveaveryflexibleforward-andbackward-compatiblerelationship,becauseofaversion-awareclient/serverprotocol.Userscangenerallyrunclientversionsthatareolderornewerthantheserver.Clientprogramssimplyhideordisablefeaturesthatrequirenewerversionsoftheserver,andnewserverversionsrarelyrequireclientupgrades.

ForWindowssiteswithalargenumberofusers,Perforcesupportsacentrallyconfigured,automateddeploymentofPerforce.Youcanusesuchsites toensurethatusersdownloadconsistent,trustedversionsofsoftwarethataresupportedbyITand/orreleaseengineeringstaff.However,becauseofextremecompatibilityandextremeeaseofinstallation,maintainingsuchareasismuchlessofarequirementthaninClearCaseenvironments.

View Servers, Protecting Unversioned and Checked-Out FilesPerforcestoresallmetadatainadatabaseonthecentralserver,managedbytheP4Dprocess.4 AClearCaseViewServerprocesshasnoequivalentinPerforce,andadministratorsdon’tneedtoallocateandconfigureViewServermachines.

Whendynamicviewsareused,ViewServermachinescontainthecontentsofchecked-outandunversioned-viewprivatefiles.Someorganizationsbackupviewstorageareasregularlytoprotectagainstthelossofsuchfiles.Ifprotectingchecked-outandunversionedfilesisapriority,youwillneedtobackupclientmachines.Someorganizationsdeviseaprocesstoprotectunversionedandchecked-outworkspacefilesinPerforce,suchaslocatingworkspacesonnetworkdrivesthatarebackedup.DuringPerforcetraining,usersareadvisedtoavoidkeepingfilescheckedoutfortoolong,usingsandboxbranchesifneeded.

ClearCase MultiSite versus Perforce ProxiesIfyourClearCaseenvironmentreliesonMultiSite,youwillfindthePerforceProxymechanismsimpleandeffective.Perforceproxiescachethecontentsofversionedfilesatremotesites,greatlyreducingdependencyontheWAN.

4.SomeGUIprogramstemporarilycachemetadatainrunningprocesses,butsuchinformationisnotpersisted.

Page 12: Migration Planning Guide: IBM Rational ClearCase to Perforce

Migration Planning Guide: IBM Rational ClearCase to Perforce SCM 12

Proxiesdonotcacheanymetadata,therebyensuringthatthereisasinglesourceofstateinformationandeliminatingtheneedforbranchmastership,schedulingbatchreplication,andsoon.

ReplicatedVOBserversgenerallyrunonservermachinesthataresimilartotheprimaryserver,thusrequiringsimilar-tiereddatacenters.Becauseofthesignificantinvestmentinlicenses,hardware,andadministrativeoverhead,MultiSiteinstallationsareusedonlywheremajordevelopmentcentersexist,andtheyareoflittleusetosmall,geographicallydiverseteams.

Bycontrast,PerforceProxyserversarelightweightprogramsthatcanrunondesktop-gradehardware,eveninenterpriseenvironments.Proxyserversdonotrequirehigh-performancehardwareorlargeamountsofdiskspace,sotheycanbedeployedanywherethatafewdevelopersgather.Insomecases,individualusersdeployPerforceProxyinstancesinsmallofficeswithoutITsupport.TherearenoadditionalcostsorlicensesrequiredtodeployaPerforceProxyserver.

ClearCase Views with Perforce WorkspacesTheterm“workspace” isfamiliartobothClearCaseandPerforceusers: it iswheredevelopersmanagefilesunderversioncontrolontheirlocalmachines.

WithClearCase,itistypicalforadevelopertomaintainseveralworkspaces,called“views.”Developerswhoareworkingonmultiplebranchestypicallyuseadifferentviewforeachactivity,workinginoneviewatatime.Forexample,adevelopermightmaintaina joe_user_main_devviewwithaconfigspecselecting/main/LATESTversionsandaseparate joe_user_rel_2.3 view selecting /main/REL2.3/LATEST versions.5

APerforce“clientspecification”definesaworkspaceanddeterminesthefilesfromtheserverthatarevisibleintheworkspace.BranchesinPerforceappeartotheuserasfully-populateddirectorytrees.Forexample,theservermightcontainadirectorynamedMAINandanotherdirectorynamed

REL2.3.Adevelopermighthavea joe_user_devworkspace,thatincludesbothMAINandREL2.3directories.Thedevelopercanworkinbothactivitiesatthesametime.

InPerforce,onlyuserfilesarestoredonthelocaldisk.Allmetadata,includinginformationaboutthenameandcontentsofauser’sworkspace,residesontheserver.

Label StrategiesBothClearCaseandPerforceprovidelabels,whichidentifytheversionsoffilesthatconstituteabaseline.FormanyClearCaseusers,labelsaremandatory.Applyinglabelsistime-consuming,oftenaccountingfor30percentormoreofthetimeassociatedwithcreatingstablebuilds.

InPerforce,labelsarejustonewayofreproducingbaselines.Changelistsaccomplishthesamegoalinwaysthatarelesstaxingonthebuildprocessandfasterandeasiertoreferencethanalabel.EachPerforcecheck-ingeneratesauniquechangelistnumberthatreflectsthestateoftherepositoryatapointintime.Anychangelistcanbeusedtodescribethestateofeveryfileintherepository,eventhoughitaffectsonlyasmallsubsetoftherepository.

Branches inPerforceare representedasdirectories,making iteasy tocombinebranchesandchangelistnumberstorepresentabaseline.Alternately,labelscanrefertochangelistnumberslimitedtoanidentifiedscopeintheserver,wherethescopeistypicallyaparticularbranch.

5.Thisisanoversimplicationsinceatypicalconfigspecisseverallinesormore.

Page 13: Migration Planning Guide: IBM Rational ClearCase to Perforce

13

Unified Change Management (UCM)UCMaddsalayerofprocesstoClearCase.Outofthebox,Perforceprovidesatomicchangelistsandjobs,whichcorrelatetoUCMfunctionalitythatenablesClearCasedeveloperstogroupfilesandconnectthemtoanactivitydescription.UCMalsoprovidesguidanceoncommonsoftwarepromotionmodelsandbranchingstrategies.Perforce’sopenarchitectureaccommodatesvariousenterprise-widedevelopmentmethodologiesandSCMcustomizations.

Migration Technical DetailsPerforceandClearCasehaveverydifferentinternalrepresentationsandmodelsofparalleldevelopment,branching,andmerging.Bothsupportparalleldevelopment,butyoushouldbeawareofthedifferences.

Evil TwinsDescribestheprobleminwhichtwoelementswiththesamenameappearindifferentbranches.Forexample,sayyouhaveaMAIN,DEV_A,andDEV_Bbranches,witheachoftheDEVbranchesparenteddirectlyfromMAIN.InDEV_Abranch,adeveloperdoesa‘ctmkelem’tocreateanewfileelement,foo.c.IndependentlyinDEV_Bbranch,adeveloperdoesthesamething—doesa‘ctmkelem’tocreateanewfileelement,foo.c.Someonethendoesa‘ctfindmerge’tomakefilethatoriginatedonDEV_AappearonMAIN.Later,someonedoesanother‘ctfindmerge’intendingtomergechangesfromMAINtoDEV_B,includingthenewfoo.cmergedtoMAINearlierfromDEV_A.

Whichisthereal“foo.c”inDEV_B,theonethatoriginatedinDEV_A,ortheonethatoriginatedinDEV_B?It’snotclear.Oneisidentifiedasthecorrectfile,andtheotheristheeviltwin.Onemightexpectthemtobebranch-relationsofthesameelement,butthey’renotrelatedintheClearCasedatabase.AsfarasClearCaseisconcerned,they’recompletelyindependentelements,referencedinitsdatabasebydifferentOIDs(objectidentifiers).

Thefindmergecompletessuccessfully,andyouwouldhavetwofoo.c’sinthebranch,buttheoperatingsystempermitsonlyonefoo.ctoappearinthedirectory.Theonethatshowsinyourviewisdeterministic,butnotobvioustomostusers.ClearCaseprovidesnowarningaboutthisproblem.Situationsareevenworsewhenthereareeviltwindirectories.

ThisisoneofthemoreinsidiouscomplexitiesofClearCase.ClearCaseadminsawareofthispotentiallyconfusingscenariosometimesputin“EvilTwinDetection”and“EvilTwinPrevention”triggers.WhenmigratingdatafromClearCase,eviltwinsaremurkyhistorythatshouldnot(andcannot)bemigratedintoPerforce.Wedetectinstancesofeviltwins,manuallyselectthecorrectelementfromthepair,anduse‘ctrmelem’toeliminatetheeviltwin.

InPerforce,thesamefilenamecanbecreatedindependentlyintwobranches.However,Perforceenablesyoutoresolvethesituationthefirsttimeyoumergethebranchestogether.Thefilehistoriescanbecombined,insteadofhavingtokilloffaneviltwinandloseitshistory.

Symlinks on WindowsThroughuseofMulti-VersionFileSystem(MVFS),ClearCasesupportssymlinksonWindowsindynamicviews.Perforcedoesnothaveacustomfilesystemanddoesnotsupportsymlinksonplatformsthatdonotnativelysupportit.IfyouusesymlinksonWindows,youmustdecidehowtohandlethemwhenplanningamigration.

Perforceallowssymlinkstobeversioned.Whenafileoftype‘symlink’isbroughtintoaPerforceworkspaceonaWindowsmachine,itappearsasatextfilecontainingthepathofthetargetfile.Forexample,usingaLinuxworkspace,youissuethe‘ln –s hello.hpp hello.h’andthefilehello.h is asymlinkpointingtohellol.hpp.InPerforce,ifyousyncthehello.hsymlinktoaWindowsworkspace,

Page 14: Migration Planning Guide: IBM Rational ClearCase to Perforce

Migration Planning Guide: IBM Rational ClearCase to Perforce SCM 14

yougetafilewiththecontentsbeing“hello.hpp”,thepathtothetargetofthesymlink.Youdo not getthecontentofthetargetfile,asyoudoinaClearCasesnapshotview.

File Type Mappings and LimitationsWhenmigratingfromClearCasetoPerforce,thePerforcetypemapfeature,whichassignsfiletypesbasedonPerforcepathnameheuristics,enablesyoutoensurethatfilesareaddedcorrectly.ThiscapabilityisespeciallyimportantforUnicodefiles.

ClearCasepermitsversioningofsomespecialfilesystemobjects,suchasblockspecialdevices,characterspecialdevices,andhardlinks.TheseobjectshavenoequivalentinPerforce.IfsuchobjectsareversionedinClearCase,youwillneedtoaccountforthatinyourmigrationplanning.

5. Additional ResourcesUsetheseresourcestohelpplanyourClearCasetoPerforcemigration.

Perforce Knowledge Base Articles •ReadKBarticle,General Perforce Recommendations, forinformationusefulincapacityplanningforyourprimaryserver.

•ReadKBarticle,Automated Deployment of Perforce,formoredetailsaboutsupportingWindowsinstallationsforenterprise-sizedsites.

Perforce Directory Standard TemplateDownload the PDS templatefordevelopingyourownPerforceDirectoryStandard.

Branching Strategies and Best Practices Implementation •ReadPerforceVPofTechnologyLauraWingerd’sbook,“PracticalPerforce”(2006,O’Reilly).

•Watch“The Flow of Change,”(56mins.)aGoogleTechTalkinwhichLauraWingerddiscussesmodelingtheflowofchangeinPerforce.

SCM ComparisonsSCMcomparisonsincluding“PerforceandIBMRationalClearCase”areavailableatperforce.com/comparisons.

TrainingWeofferinstructor-ledonlineandclassroomtraining,aswellason-siteandcustomtraining.See perforce.com/trainingformoreinformation.

Page 15: Migration Planning Guide: IBM Rational ClearCase to Perforce

All trademarks or registered trademarks used herein are property of their respective owners. Copyright©2011PerforceSoftwareInc.Allrightsreserved.

6. Migration Planning ChecklistClearCaseenvironmentsvarywidelyintermsofsize,complexity,geographicdistribution,andintegrationwithothersystems.CommonreasonsforreplacingClearCasewithPerforceinclude:•Reducingoperationalcosts.

•Simplifiyingaccessforusersanddistributedteams.

•Expandingcapabilities.

•DesireforafasterSCMsystem.

UsethischecklisttohelpyouplanyourmigrationfromClearCasetoPerforce.

5 Define your migration requirements: ConsidertheamountofhistorythatmustbeavailableinPerforceafterthemigration.

5 Select a data conversion strategy: ForeachVOB,decidewhethertoimportallhistory,selectedhistory,oronlythemostrecentrevisions.

5 Evaluate ClearCase usage: Determinewhatfeaturesareinuse(labels,etc.)anddecidehowtoimplementtheminPerforce.Checkforstructuralcorruption(suchas“eviltwin”files).

5 Consider user interactions: Define the various users andgroups that interactwithClearCaseandassesstheimpactamigrationwillhaveoneachone.

5 Evaluate tools, processes, and infrastructure:InPerforce,youmightdecidetoreplacecertainClearCasefunctionality,changeimplementations,orabandonunneededcomponents.Examples of tools, processes, and infrastructure that might have been built around orintegratedwithClearCaseinclude:buildsystems,branchingstrategies,continuousintegrationframeworks,proceduresfordefiningarelease(labeling,branching,etc.);ClearCaseUCM,MultiSiteorclearmake,SCMpoliciesandpolicyenforcementmechanisms(triggers,scripts,reviewdaemons).

5 Develop a Perforce Directory Standard (PDS):Topromotebestpracticesforconfigurationmanagementthroughouttheproductlifecycleandintuitivelyconveykeyaspectsofthereleaseprocessandthelifecyclestageofanygivenfileorsoftwarechange.

About Perforce Consulting

PerforceConsultingcanhelpyouidentifytherisksandchallengesinvolvedforyourparticularenvironment,andassistyouateverystepofthemigrationprocess.Ifyouneedhelpcapturinganddocumentingmigrationrequirements,establishingahigh-levelprojectplanandmigrationschedule,orneedcostofeffortestimatesforimplementation,pleasevisit: perforce.com/consulting.