关闭

关闭

封号提示

内容

首页 程序员修炼三部曲.版本控制之道.Pragmatic Version Control Using…

程序员修炼三部曲.版本控制之道.Pragmatic Version Control Using Subversion.pdf

程序员修炼三部曲.版本控制之道.Pragmatic Versi…

上传者: Jason 2012-01-05 评分 5 0 198 27 900 暂无简介 简介 举报

简介:本文档为《程序员修炼三部曲.版本控制之道.Pragmatic Version Control Using Subversionpdf》,可适用于IT/计算机领域,主题内容包含WhatreadersaresayingaboutPragmaticVersionControlusingSubversionIexpectedal符等。

WhatreadersaresayingaboutPragmaticVersionControlusingSubversionIexpectedalot,butyousurprisedmewithevenmoreHavingusedCVSforyearsIhesitatedtotrySubversionuntilnow,althoughIknewitwouldsolvemanyoftheshortcomingsofCVSAfterreadingyourbook,myexcusestostaywithCVSdisappearedOh,andcomingfromthePragmaticBookshelfthisbookisfuntoreadtooThanksMikeSteffenGemkowManagingDirector,ObjectFabGmbHI’malongtimeuserofCVSandI’vebeenskepticalofSubversion,wonderingifitwouldeverbe“readyforprimetime”UntilnowThankstoMikeMasonforwritingaclear,concise,gentleintroductiontothisnewtoolAfterreadingthisbook,I’mactuallyexcitedaboutthepossibilitiesforversioncontrolthatSubversionbringstothetableDavidRuppSeniorSoftwareEngineer,GreatWestLifeAnnuityThiswasexactlytheSubversionbookIwaswaitingforAsalongtimePerforceandCVSuserandadministrator,andinmyroleasanagiletoolscoach,IwantedacompactbookthattoldmejustwhatIneededtoknowThisisitWithinacoupleofhoursIwasupandrunningagainstremoteSubversionservers,andsettingupmyownlocalserverstooMikeusesalotofcommandlineexamplestoguidethereader,andasaWindowsuserIwasworriedatfirstMyfearswereunfoundedthoughMike’sexamplesweresoclearthatIthinkI’llsticktousingthecommandlinefromnowon!IthoroughlyrecommendthisbooktoanyonegettingstartedusingoradministeringSubversionMikeRobertsProjectcoLead,CruiseControlNETPragmaticVersionControlusingSubversionMikeMasonThePragmaticBookshelfRaleigh,NorthCarolinaDallas,TexasManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andThePragmaticProgrammers,LLCwasawareofatrademarkclaim,thedesignationshavebeenprintedininitialcapitallettersorinallcapitalsThePragmaticStarterKit,ThePragmaticProgrammer,PragmaticProgramming,PragmaticBookshelfandthelinkinggdevicearetrademarksofThePragmaticProgrammers,LLCEveryprecautionwastakeninthepreparationofthisbookHowever,thepublisherassumesnoresponsibilityforerrorsoromissions,orfordamagesthatmayresultfromtheuseofinformation(includingprogramlistings)containedhereinOurPragmaticcourses,workshops,andotherproductscanhelpyouandyourteamcreatebettersoftwareandhavemorefunFormoreinformation,aswellasthelatestPragmatictitles,pleasevisitusathttp:wwwpragmaticprogrammercomCopyrightThePragmaticProgrammersLLCAllrightsreservedNopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmitted,inanyform,orbyanymeans,electronic,mechanical,photocopying,recording,orotherwise,withoutthepriorconsentofthepublisherPrintedintheUnitedStatesofAmericaISBNPrintedonacidfreepaperwithrecycled,postconsumercontentFirstprinting,FebruaryVersion:ContentsPrefaceviiiIntroductionVersionControlinActionRoadMapWhyChooseSubversionWhatIsVersionControlTheRepositoryWhatShouldWeStoreWorkingCopiesandManipulatingFilesProjects,Directories,andFilesWhereDoVersionsComeInTagsBranchesMergingLockingOptionsConfigurationManagement(CM)GettingStartedwithSubversionInstallingSubversionCreatingaRepositoryCreatingaSimpleProjectStartingtoWorkwithaProjectMakingChangesUpdatingtheRepositoryWhenWorldsCollideConflictResolutionCONTENTSviHowToOurBasicPhilosophyImportantStepsWhenUsingVersionControlAccessingaRepositoryNetworkProtocolsChoosingaNetworkingOptionCommonSubversionCommandsCheckingThingsOutKeepingUptoDateAddingFilesandDirectoriesPropertiesCopyingandMovingFilesandDirectoriesSeeingWhatHasChangedHandlingMergeConflictsCommittingChangesExaminingChangeHistoryRemovingaChangeOrganizingYourRepositoryASimpleProjectMultipleProjectsMultipleRepositoriesUsingTagsandBranchesTagsandBranchesCreatingaReleaseBranchWorkinginaReleaseBranchGeneratingaReleaseFixingBugsinaReleaseBranchDeveloperExperimentalBranchesWorkingwithExperimentalCodeMergingtheExperimentalBranchCreatingaProjectCreatingtheInitialProjectStructurewithintheProjectSharingCodebetweenProjectsPreparedexclusivelyforKimPartridgeCONTENTSviiThirdPartyCodeBinaryLibrariesLibrarieswithSourceCodeKeywordExpansionduringImportsAInstall,Network,Secure,andAdministerAInstallingSubversionANetworkingwithsvnserveANetworkingwithsvnsshANetworkingwithApacheASecuringSubversionABackingUpYourRepositoryBMigratingtoSubversionBGettingcvssvnBChoosingHowMuchtoConvertBConvertingYourRepositoryCThirdPartySubversionToolsCTortoiseSVNCIDEIntegrationCOtherToolsDCommandSummaryandRecipesDSubversionCommandSummaryDRecipesEOtherResourcesEOnlineResourcesEBibliographyPreparedexclusivelyforKimPartridgePrefaceIwasprettyexcitedwhenIheardaboutthePragmaticStarterKitfinallysomeguidanceonthebasicstuffallprojectsneedtogetrightTheopportunitytoproduceaSubversioneditionofPragmaticVersionControlwasoneIcouldn’tmissSubversionhadpreviouslysavedme(andmyteam)fromversioncontrolhell,andIwantedtodomyparttohelppromoteagreatnewversioncontrolsystemVersioncontroladdsanimmenseamounttoaprojectItgivesyouasafetynet,helpsyourteamcollaborateeffectively,letsyouorganizeyourbuildsandQA,andevenallowsyoutodosomedetectiveworkifthingsgowrongIhopethisneweditionofPragmaticVersionControlwillhelpyouandyourteamgetstartedandsucceedwithSubversionAcknowledgmentsI’dliketothankDaveandAndyfortakingachanceonmebeingabletowritethebookandtothankDavebeingsuchanexcellenteditorIwasn’treallysurewhatIwasgettingmyselfinto,andDave’sadviceandguidancewereinvaluableThebookreceivedplentyofscrutinybyreviewersI’dliketothankBradAppleton,BrankoCˇibej,MartinFowler,SteffenGemkow,RobertRasmussen,MikeRoberts,andDavidRuppfortheirwellthoughtoutcommentsandsuggestionsI’mfranklyamazedbythequalityoffeedbackIgotgreatsuggestions,highlytechnicalcommentsandplentyofpeoplethinkingaboutthe“biggerpicture”EveryoneatThoughtWorkshasbeenreallysupportiveofmybookwritingefforts,includingseveralpeoplewhotookthetimetolookthroughearlydraftsofthebook,andI’dliketoPREFACEixthankallthosewhogavemeadviceandguidanceI’dparticularlyliketothanktheCalgaryofficeforwelcomingmeintothefoldthisyearandforenablingmetogetstufffinishedwhenthecrunchpointcameFinallyI’dliketothankMartin,Mike,andMichelleformakingmebelieveIcouldreallywritethebookandfortheirencouragementalongthewayMikeMasonDecembermikemikemasoncaTypographicConventionsitalicfontItalicsindicateatermthatisbeingdefined,orborrowedfromanotherlanguagefilesFiles(anddirectories)areindicatedlikethiscommandsCommands(andoptionssuchash)areshownlikethisoutputOutput(aswellasthingsyoumightneedtotype)isindicatedlikethisIfcommandsaretoolongforasinglelinethey’resplitontomultiplelinesusinga(backwardslash)CVSHint:ThiskindoftextindicatesahintforusersfamiliarwithCVSThiswarningsignindicatesthismaterialismoreadvancedandcanbeskippedonyourfirstreading“Joethedeveloper,”ourcartoonfriend,asksarelatedquestionthatyoumayfindusefulPreparedexclusivelyforKimPartridgeChapterIntroductionThisbooktellsyouhowtoimprovetheeffectivenessofyoursoftwaredevelopmentprocessusingversioncontrolVersioncontrol,sometimescalledsourcecodecontrol,isthefirstlegofourprojectsupporttripodWeviewtheuseofversioncontrolasmandatoryonallprojectsVersioncontroloffersmanyadvantagestobothteamsandindividuals:•Itgivestheteamaprojectwideundobuttonnothingisfinal,andmistakesareeasilyrolledbackImagineyou’reusingtheworld’smostsophisticatedwordprocessorIthaseveryfunctionimaginable,exceptoneForsomereason,theyforgottoaddsupportforaDELETEkeyThinkhowcarefullyandslowlyyou’dhavetotype,particularlyasyougotneartheendofalargedocumentOnemistake,andyou’dhavetostartagainIt’sthesamewithversioncontrolhavingtheabilitytogobackanhour,aday,oraweekfreesyourteamtoworkquickly,confidentthattheyhaveawayoffixingmistakes•ItallowsmultipledeveloperstoworkonthesamecodebaseinacontrolledmannerTheteamnolongerloseschangeswhensomeoneoverwritestheeditsmadebyanotherteammember•TheversioncontrolsystemkeepsarecordofthechangesmadeovertimeIfyoucomeacrosssome“surprisingcode,”it’seasytofindoutwhomadethechange,when,and(withanyluck)whyVERSIONCONTROLINACTION•AversioncontrolsystemallowsyoutosupportmultiplereleasesofyoursoftwareatthesametimeasyoucontinuewiththemainlineofdevelopmentWithaversioncontrolsystem,there’snolongeraneedfortheteamtostopworkduringacodefreezejustbeforerelease•Versioncontrolisaprojectwidetimemachine,allowingyoutodialinadateandseeexactlywhattheprojectlookedlikeonthatdateThisisusefulforresearch,butitisessentialforregeneratingpriorreleasesforcustomerswithproblemsThisbookfocusesonversioncontrolfromaprojectperspectiveRatherthansimplylistingthecommandsavailableinaversioncontrolsystem,weexplainthetasksyouneedtoperformwellinasuccessfulprojectandthenshowhowaversioncontrolsystemcanhelpLet’sstartwithasmallstoryVersionControlinActionFredrollsintotheofficeeagertocontinueworkingonthenewOrinocobookorderingsystem(WhyOrinocoFred’scompanyusesthenamesofriversforallinternalprojects)Aftergettinghisfirstcupofcoffee,Fredupdateshislocalcopyoftheproject’ssourcecodewiththelatestversionsfromthecentralversioncontrolsystemInthelogthatliststheupdatedfiles,henoticesthatWilmahaschangedcodeinthebasicOrdersclassFredgetsworriedthatthischangemightaffecthiswork,buttodayWilmaisoffattheclient’ssite,installingthelatestrelease,sohecan’taskherdirectlyInstead,FredaskstheversioncontrolsystemtodisplaythenotesassociatedwiththechangetoOrdersWilma’scommentdoeslittletoreassurehim:AddednewdeliveryPreferencesfieldtotheOrdersclassTofindoutwhat’sgoingon,hegoesbacktotheversioncontrolsystemandaskstoseetheactualchangesmadetothesourcefileHeseesthatWilmahasaddedacoupleofinstancevariables,buttheyaresettodefaultvalues,andnothingseemstochangethemThismightbeaprobleminthefuture,butitisnothingthatwillstophimtoday,soFredcontinuesworkingPreparedexclusivelyforKimPartridgeVERSIONCONTROLINACTIONAsheworksonhiscode,FredaddsanewclassandacoupleoftestclassestothesystemFredaddsthenamesofthefileshecreatestotheversioncontrolsystemashecreatesthemthefilesthemselveswon’tbeaddeduntilhecommitshischanges,butaddingtheirnamesnowmeanshewon’tforgettoaddthemlaterAcoupleofhoursintotheday,FredhascompletedthefirstpartofsomenewfunctionalityItpassesitstests,anditwon’taffectanythingintherestofthesystem,sohedecidestocheckitallintotheversioncontrolsystem,makingitavailabletotherestoftheteamOvertheyears,Fredhasfoundthatcheckingcodeinandoutfrequentlyworksbestforhim:it’saloteasiertoreconciletheoccasionalconflictifyouhavetoworryaboutonlyacoupleoffilesratherthanaweek’sworthofchangesfromthewholeteamWhyYouShouldNeverAnswerthePhoneJustasFredisabouttostartthenextroundofcoding,hisphoneringsIt’sWilma,callingfromtheclient’ssiteItlookslikethere’sabuginthereleasesheisinstalling:printedinvoicesarenotcalculatingsalestaxonshippingamountsTheclientisgoingballistic,andtheyneedafixnowUnlessYouUseVersionControlFreddoublechecksthenameofthereleasewithWilmaandthentellstheversioncontrolsystemtocheckoutallthefilesinthatversionofthesoftwareHeputsitinatemporarydirectoryonhisPC,asheintendstodeleteitafterhefinishestheworkHenowhastwocopiesofthesystem’ssourcecodeonhiscomputer:thetrunk(themainlineofdevelopment)andtheversionreleasedtotheclientBecauseheisabouttofixabug,hetellstheversioncontrolsystemtotaghissourcecodewithalabel(He’lladdanothertagwhenhehasfixedthebugThesetagsactasflagsyouleavebehindtomarksignificantpointsinthedevelopmentByusingconsistentlynamedtagsbeforeandafterhemakesthechange,otherfolksinhisteamwillbeabletoseeexactlywhatchangedshouldtheylookatitlater)PreparedexclusivelyforKimPartridgeVERSIONCONTROLINACTIONInordertoisolatetheproblem,FredfirstwritesatestSureenough,itlookslikenooneevercheckedthesalestaxcalculationwhenshippingwasinvolved,becausehistestimmediatelyshowstheproblem(Fredmakesanotetoraisethisduringthisiteration’sreviewmeetingthisissomethingthatshouldneverhavegoneoutthedoor)Sighing,Fredaddsthelineofcodethataddsshippingtothetaxabletotal,compiles,andchecksthathistestpassesHererunsthewholetestsuiteasaquicksanitytestandchecksthefixedcodebackintothecentralversioncontrolsystemFinally,hetagsthereleasebranchindicatingthatthebugisfixedHesendsanoteofftoQA,whoisresponsibleforshippingemergencyreleasestotheclientUsinghistag,they’llbeabletoinstructthebuildsystemtoproduceadeliverydiskthatincludeshisfixFredthenphonesWilmaandtellsherthefixisinthehandsofQAandshouldbewithhersoonHavingfinishedwiththislittledistraction,Fredremovesthesourceforthereleasedcodefromhislocalmachine:there’snopointinclutteringthingsup,andthechangeshehasmadearesafelytuckedbackintothecentralserverHethengetstowondering:isthesalestaxbughefoundinthereleasedcodealsopresentinthecurrentdevelopmentversionThequickestwaytocheckistoaddthetesthewroteinthereleasedversiontothedevelopmenttestsuiteHetellstheversioncontrolsystemtomergethatparticularchangeinthereleasebranchintotheappropriatefileinthedevelopmentcopyThemergeprocesstakeswhateverchangesweremadetothereleasefilesandmakesthesamechangestothedevelopmentversionWhenherunsthetests,hisnewtestfails:thebugisindeedpresentHethenmoveshisfixfromthereleasebranchintothedevelopmentversion(Hedoesn’tneedthereleasebranch’scodeonhismachinetodoanyofthisallthechangesarebeingfetchedfromthecentralversioncontrolsystem)Oncehehasthetestsallrunningagain,hecommitsthischangeintotheversioncontrolsystemThat’sonelessbugthat’llbitetheteamnexttimeCrisisover,FredgetsbacktoworkingonhisowntasksforthedayHespendsahappyafternoonwritingtestsandcodeandtowardtheendofthedaydecidesheisdoneWhilehehasbeenworking,otherfolksinhisteamhavealsobeenmakingPreparedexclusivelyforKimPartridgeVERSIONCONTROLINACTIONchanges,soheusestheversioncontrolsystemtotaketheirworkandapplyithislocalcopyofthesourceHerunsthetestsonelasttimeandthencheckshischangesbackin,readytostartworkthenextdayTomorrowUnfortunately,thenextdaybringsitsownsurprisesOvernightFred’scentralheatingfinallygivesuptheghostAsFredlivesinMinnesota,andasit’sFebruary,thisisn’tsomethingtobetakenlightlyFredcallsintoworktosayhe’llbeoutmostofthedaywaitingfortherepairfolkstoarriveHowever,thatdoesn’tmeanhehastostopworkingAccessinghisofficenetworkusingasecureconnectionoverthepublicInternet,FredchecksoutthelatestdevelopmentcodeontohislaptopBecausehecheckedinbeforehewenthomethepreviousnight,everythingisthereanduptodateHecontinuestoworkathome,wrappedinablanketandsittingbythefireBeforehestopsfortheday,hecheckshischangesinfromthelaptopsothey’llbeavailabletohimatworkthenextdayLifeisgood(exceptfortheheatingrepairbill)

类似资料

该用户的其他资料

用HTML5CSS3实现媲美原生应用的交互体验_尤雨溪.pdf

51CTO电子杂志《Linux运维趋势》第19期_2012年5月号.pdf

Kanban在汤森路透的应用 - 陈斌.pdf

SAE安全实践 - 丛磊.pdf

SocalDatabases - Bobby Johnson.pdf

职业精品

精彩专题

上传我的资料

精选资料

热门资料排行换一换

  • 【第三辑】科学新领域的探索[第一…

  • 【第三辑】从反粒子到最终定律[第…

  • 姚孟起临九成宫.pdf

  • 语言学概论 [马学良等 1981…

  • 卢新华--伤痕.pdf

  • 教育:非常痛,非常爱 王开东着.…

  • 【第二辑】数学:确定性的丧失[第…

  • 【第二辑】时空本性[第一推动丛书…

  • 【第二辑】夸克与美洲豹——简单性…

  • 资料评价:

    / 211
    所需积分:0 立即下载

    意见
    反馈

    返回
    顶部