source code control - telemark university...

35
Source Code Control Hans-Petter Halvorsen, M.Sc. Quiz with Explainations

Upload: phamthien

Post on 21-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

SourceCodeControl

Hans-PetterHalvorsen,M.Sc.

QuizwithExplainations

Questions1. WhatisSCC?2. Listatleast5differentSSCSystems3. WhydoweneedaSCC/VersionControlSystem?4. WhatisDistributedVersionControlSystem(DVCS)?5. WhatisTFS?6. WhatismaindifferencesbetweenTFVC(Built-inVersion

ControlSysteminTFS)andGit?7. WhatisaBugTrackingSystem?8. ListdifferentBugTrackingSystems(atleast3)9. Whatdifferentsoftwarereleasesdowehave?10. Listatleast3centralizedSCCsystemsand3DVCSsystems

WhatisSCC?

SourceCodeControl/VersionControlWhatisit?• Aversioncontrolsystemkeepstrackofallworkandallchangesinasetoffiles(typicallyyourcodefiles,butalsootherfiles)

• Allowsseveraldevelopers(potentiallywidelyseparatedinspaceandtime)tocollaborate

• AllSoftwareDevelopersneedit!!

4

TypicalSCCFeatures• Checkout,Checkin/Commit• Branching,Merging• FileLocking(avoidconcurrentaccess)• Label/Tag• Change/ChangeList• Conflict• Revision,Iteration

5

SCCFeatures• Checkout,Checkin/Commit• Branching,Merging• FileLocking(avoidconcurrentaccess)• Label/Tag• Change/ChangeList/History• Conflict

6

1.0

1.1 2.0Braching

Merging

WorkwithnewRelease

Label/Tagit

WorkwithBugFix

BugFixReleased

2.0Released etc.

BranchinginTFS:http://msdn.microsoft.com/en-us/library/ee782536.aspx

Listatleast5differentSSCSystems

SCCSystems

8

ConcurrentVersioningSystem

SVN

• VisualStudioOnline(formerlyTeamFoundationServices)(www.visualstudio.com)– TFVCorGit

• GitHub (www.github.com)• Bitbucket (www.bitbucket.org)–MercurialorGit

Web-basedSCCHostingServices

9

WhydoweneedaSCC/VersionControlSystem?

WhySCC?• Keepttrackofcodeandfilesfrommultipledevelopers,

becauseeachdevelopercreateasmallpartofthetotalsoftwaresolution,ormultipledevelopersworkonthesamepieceofcode

• Itisimportanttokeeptrackofdifferentversionsofthesamefiles,e.g.ifwehavemadesomemistakesandweneedanolderversionofthesamecode.

• Wecouldalsocreatedifferentbraches,e.gonebrancforCustomer1andanotherbranchforCustomer2,andmaybeatsomepointweneedtomerrgethosetwointoonproduct.

WhatisDistributedVersionControlSystem(DVCS)?

DVCS- DistibutedVersionControlSystem• Withadistributedversioncontrolsystem,thereisn’tonecentralizedcodebase

topullthecodefrom.Differentbranchesholddifferentpartsofthecode.GitisaDVCS.Otherversioncontrolsystems,suchasSVNandCVS,usecentralizedversioncontrol,meaningthatonlyonemastercopyofthesoftwareisused.

• Peer-to-peerapproach

• Aserverstoresthecurrentversion(s)ofaprojectanditshistory,andclientsconnecttotheserverinorderto"checkout"acompletecopyoftheproject,workonthiscopyandthenlater"checkin"theirchanges

Centralized/Client–Serverarchitecture

Centralized/Client–Serverarchitecture

Repository

Network

Server

Client

Client Client

Client

Repository:SourceCodeDatabase

DistibutedVersionControlSystem

Repository

Repository

Repository

Repository

peer-to-peer peer-to-peer

Repository:SourceCodeDatabase

WhatisTFS?

TeamFoundationServer• SDLCManagement(SDLC– SoftwareDevelopmentLifeCycle)• SoftwareTeam Collaboration• SourceCodeManagement• SupportsAgile,Scrum,CMMI• IntegratedTest Tools• BugTrackingSystem• AutomatedBuilds• BuiltinTeamFoundationVersionControl(TSVC)+SupportforGit

repositories• Built-insupportforTFSinVisualStudio(TeamExplorer)• Plug-inforEclipse(TeamExplorerEverywhere)• MSSCCIProviderforotherIDEslikeLabVIEW,etc.

17

WhatismaindifferencesbetweenTFVC(Built-inVersionControlSysteminTFS)

andGit?

TFSvs.Git• TeamFoundationVersionControl(TFVC)usesasingle,centralizedserverrepositorytotrackandversionfiles.Localchangesarealwayscheckedintothecentralserverwhereotherdeveloperscangetthelatestchanges.

• GitisaDistributedVersionControlSystem(DVCS)thatusesalocalrepositorytotrackandversionfiles.Changesaresharedwithotherdevelopersbypushingandpullingchangesthrougharemote,sharedrepository.

Git• Hasbecomeverypopulartoday• DistributedVersionControlSystem• InitiallydesignedanddevelopedbyLinusTorvalds(LinuxGuru)(2005)

• GitisFreeofuse• CVSandSVNiseasiertousethanGitforbeginners

20

WhatisaBugTrackingSystem?

Bugs• Asoftwarebugisanerror,flaw,

failure,orfaultinacomputerprogramorsystemthatproducesanincorrectorunexpectedresult,orcausesittobehaveinunintendedways

• Theyfoundabug(actuallyamoth)insideacomputerin1947thatmadetheprogramnotbehavingasexpected.Thiswasthe“first”realbug.

22

WhyFindBugsearly?

23

SoftwareDevelopmentLifeCycle(SDLC)

Costperdefects

BugTrackingSystem• Keeptrackofbugsinsoftware.• Testers(orothers)canreportbugs,Developersand/orManagerscanprioritizethelistofbugs,etc.

• Youcanrelateaspesificbugtoaspesificrelease,etc.AllthesefeaturesarepartofaBugTrackingSystem.

ListdifferentBugTrackingSystems(atleast3)

BugTrackingSystems• TeamFoundationServer• Jira• Bugzilla• Clearquest• …

26

Whatdifferentsoftwarereleasesdowehave?

SoftwareReleases

28

Alpha Release

Beta Releases

RC (ReleaseCandidate)

RTM (ReleaseToManufacturing)

Note!othertermsarealsoused

Start

Finished

29

Requirements/Design Alpha

Beta RCRTM

Furniture, Flowersandsmalladjustmentsmissing

Buildingstructurefinished,Insideworkon track

Foundation finished, building structurestartedPlansmadeandapproved

ReadyforSaleorMovein

A“proof”thatyoucando it,PoC(Proof ofConcept)

SoftwareReleasesBeforethesoftwareisreleased• Alpha Release(s)(Internalrelease,notpublic)• Beta Release(s)(“DeveloperPreview”,“ConsumerPreview”)• RC - ReleaseCandidate(s)(“ReleasePreview”)• RTM – ReleaseToManufactoringMaintenance(afterthesoftwareisreleased)• Patches (smallfixes)• SP - ServicePacks(lotsofsmallfixesandpathesbundletogether),

SP1,SP2,R1,R2,..…StartPlanningnextRelease

30

Listatleast3centralizedSCCsystemsand3DVCSsystems

Centralized/Client–Cerverarchitecture

• TFS• CVS• SVN(Subversion)• LibreSource

32

• Git• Mercurial• Bazaar• Monotone• BitKeeper

DVCS

References• SoftwareDevelopment- APracticalApproach

Halvorsen,Hans-Petter,2015• EssentialsofSoftwareEngineering

FrankTsui;OrlandoKaram;BarbaraBernal,3ed.,Jones&BartlettLearning

• SoftwareEngineeringI.Sommerville,10ed.:Pearson,2015

• SoftwareEngineering.ModernApproachesE.J.Braude andM.E.Bernstein,2ed.:Wiley,2011.

33

Hans-PetterHalvorsen,M.Sc.

UniversityCollegeofSoutheastNorwaywww.usn.no

E-mail:[email protected]:http://home.hit.no/~hansha/