Class Note for CMPSCI 220 at UMass(32)
Class Note for CMPSCI 220 at UMass(32)
Popular in Course
Popular in Department
This 6 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at University of Massachusetts taught by a professor in Fall. Since its upload, it has received 16 views.
Reviews for Class Note for CMPSCI 220 at UMass(32)
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 02/06/15
An Historical Timeline CMPSCI 220 291A sccs 7 Source Code Control System I Marc Rochkmd 1972 Bell Labs Unix I RCS 7 Remslon Control System Walter Tichy 1985 Purdue CVS 7 Concurrent Verslons System I Dick Gmnq19805 12 Versioning and Subversion I SVN 7 Subvemon I CollabNeL 2000 SVK 7 no acronym suggested I Chiaeliang K20 2000 Programming Methodology Spring 2009 Unlvnslnnr lulnssunmins Mm Dwamuilnlnnvulu qul 39 mum umsusmmu Mm Dwamuilnlnnwlu meme SCCS Source Code Control System SCCS Under the hood I Tracks and stores verslons of tax les I All verslons snaredm one large le Includes documentation etc as well as source Construct any deslred Verslon from It Lmear sequence of Verslons Dem a senes of msemons and oe1euous 11 12 21 22 Ofwhole lines only Thus has 21mm and wmmthhm releases Special lines indicate where insertionsdeletions startend I Verslons described by detm The mm between 11 and 12 between 12 and13 etc I Essemauy obsolete mday 7 lacks mam features How Verslons also have releaseVerslon number and can consldered essermal m a good Verslon manager control thch previous deltas to apply to make m Verslon e g can effectively back out a bad change Unlvnslnnr lulnssunmins Mm Dwamuilnlnnvulu qul mum umsusmmu Mm Dwamuilnlnnwlu meme RCS Revision Control System Branching versions Starts where sccs leaves off ll Adds 39fd39uLJ 39quot Bumbag ofversions Mzrgzsupport if 539 Tags locking attributes keyValuepairs Unlvnslnnr lulnssunmins Mm Dwamuilnlnnvulu qul r V mum umsusmmu Mm Dwamuilnlnnwlu meme Branching versions ll 1 1 m L H v a a A I u hm rm Unlvnslnnr Massanmsins Amman Dwa nuilnlnnvulu x Branching versions LI HI 1 1 39f Mum 4 172 quotLintg Mg o I rm Q M 60 can t awhu dm39 3mbsmimmw Unlvnslnnr Massanmsins Amman Dwa nuilnlnnvulu x Branching versions L1 11 1 IN 1 v v 39 KT 5 6am I v M I Lu dk ba n 39A M mum nrl nssnmuins Amm Dwa nuilnlnnv u x Branching versions Il M 7 L 11 n I If a pan 7 34 An 14 154 m Am 3964 Ihp WA 0 will Unlvnslnnr Massanmsins Amman Dwa nuilnlnnvulu x Branching versions ll 1 1 k 39r a H w llu I M I AM 15 Amtu ma in Mm mks sq mnMvmnkm M n 394 quotx 9f7 quot quotF Um mum nrl nssnmuins Amm Dwa nuilnlnnv u x Branching versions u l4 7 I39 L 11 I b Ii y r 1 A 0 134 An I 134 m 3964 hp Fwdin I will G d A rz m zam39m me n quotAs 41 hunk 504 rfd 350w mum nrl nssnmuins Amm Dwa nuilnlnnv u x Principles of Merging 3way merge I Given common ancestor v1 and v2 I Merging v1 ande producing remt I Line by line I lfall are then that goes into result I If anc v1 then Q goes into result I If anc v2 then goes into result I lfvl v2 then that goes into result Unlvnslnnr lulnssaomsins Amman Dwamuilnlnnvulu mule Con cts when Merging But If anc vl and v2 lines are all dz mnr v1 and v2 edited anc in dg zrmt ay This is a conflict which the use must resolve Eclipse can present these sideebyeside You can choose v1 v2 or anc on you can choose one and edit it etc Sideebyeside also available forZVway merges Merging works well because of the way we organize code into lines etc Unlvnslnnr lulnssaomsins Amman Dwamuilnlnnvulu mule More about merging I Subtleties I Identifying insertions deletions etc I Merge algonthrns differ in their intelligence I Can also do a Zeway merge I Without ancestor don t know which is original and which is changed so I Generally have to tell the tool about each difference Ullvivsln nmanammu Mm Dwamuilnlnnwlu Xusz CVS Concurrent Versions System I Beginnings of working with sets of files I Keeps track of CVS les of a given directory I Originally invoked RCS for each le I Supports servers using several protocols I Does not I Handle le systern changes renarne etc I Cornrnit groups of changes altar1154711 I Still widely used fairly robust Unlvnslnnr lulnssaomsins Amman Dwamuilnlnnvulu mule Some Limitations of SCCS and RCS I They consider each file separately I What about coordinated changes to rnany lesgt I What about le create delete rnove renai39negt I They don t support shared remote servers I They don t support highly distributed highly available replicated servers Ullvivsln nmanammu Mm Dwamuilnlnnwlu Xusz Svn Subversion Keeps aii data in a datubme Not sepatate files Necessary because ittracks le system changes A primary adwntage over cvs File We ate cheap in the database Cari delta may les I Associates arbitrary pmpeme keyvalue pans will each file Some have special meanings to Subversion Ullvivsln nmanammu Mm Dwamuilnlnnwlu Xusz Svn Subversion Repository Access Svn Advantages Limitations l Named by URL I File system changes I Local tile1oes1hostpsthetoerepothing I Atomic commit l Remote svnhostpathetoerepothing Orsvnssh I Can also access Via WebDAV http https I Cheap copies I Binary deltas I Browser perusing I Does not handle I Drageandedrop submission limiting I Synchronized remote replicas Can apply access control HZ the repository I Truly distributed development uiiiirisiiiiir IIInSSuNIDSHIS Aiiiiriiii Dwain iiiiiciiiiviiiei xii L uiiirisiii unanimiiiiriii Alvin Dwain iiiiiciiiiwiei XKIHRE Svn Keeps the whole history Svk Perl scripts on top OfSubVersiOn Supports synchronized rep1icas I Generally this is a good thing I Repository size only grows I Can apply a whole etofdeltas from one repository to another as m de1ta I Only way I know to shrink Callednsm merge Emerge Working copies take less space No Svn subdirectory I Loses the history before that point No extra copies there I Day the database from past time forward git is another distributed yersion system I Can also snapshot any revision you want There are mail systems out there nowl but again lose the history of changes uiiiirisiiiiir IIInSSuNIDSHIS Aiiiiriiii Dwain iiiiiciiiiiiiiiei iii 1 i uiiirisiii unanimiiiiriii Alvin Dwain iiiiiciiiiwiei XKIHRE Integration with other tools Nuts and bolts How to m svn I CVS Subversion seem most supported I Check out creating a local warkmg mp svn co svnsshhostrepopathsthere a Rzriii rlvg Len Disk I Eclipse supports both well uiiiirisiiiiir IIInSSuNIDSHIS Aiiiiriiii Dwain iiiiiciiiiiiiiiei xii i p r uiiirisiii unanimiiiiriii Aim mam iiiiiciiiiuiiei XKIHRE Nuts and bolts How to E svn I Check out creating a local warkmg mp svn co 5vnsshhostrepopaththere Rarusl l l39h mun Lml 39Disk Unwinslnnr minnowquot Amman Dwammlnlnnvulu x Nuts and bolts How to m svn I Commit changes back to repository 6W Randbra my 51 Unwinslnnr minnowquot Amman Dwammlnlnnvulu x Nuts and bolts How to m svn I Make modifications locally if 8 Mn Lml 39Disk umquot nrl nssnmuins Amm Dwammannnwlu x What about other people updating I What if update indicates mn m I Edit con icting parts before trying to commit a My 3quot Rafam5 Lml D sk F Hu I Commit after updating and xing con icts Unwinslnnr minnowquot Amman Dwammlnlnnvulu x What about other people updating I If les have changed you must merge changes to working copy first update svn update 2439 m M Rr 393 Lug Disk umquot nrl nssnmuins Amm Dwammannnwlu x Nuts and bolts Summary 1 Check out 2 Edit modify 3 Update unless you re the only user 4 Fix any con icts 5 Commit a Go to Step 2 umquot nrl nssnmuins Amm Dwammannnwlu x What does EditJModify include What does EditJModify include I Editing changing existing les I Adding properties I Creating new files svn add I Removing properties I Deleting files svn rm I Modifying properties I Creating new directories svn mkdir I Deleting directories svn rmdir I Cari also retrieve all kinds of info I Copying files svn cp 7 cheap copy I Cari request diffs I Renaming files svn my copy delete Unwinslnnr lulnssanmsins Amman Davannuilnlnnvulu mule L mum nrmnssnmuins AM Davannmlnl mwlu Xusz U g branches in svn The trunkbranchesltags convention I Branches and merging are very expmun RCSCVS I The trunk holds the primary lines of development I In svn you 51mp1y my in make a bomb Mymt l The branches area 15 for branches lfs branchness ismostlyinjommind Mighthave navfeature branches I But svn knows the ancestry f you use svn GP I Might have yendorcustome branches Th t t t t Might have your private specialbranch e ances ry is impor an o merging u The tags area 15 for releases and Versions you You can merge from any branch any Ieyioou to Wm spatially marked for easy reference Create a new 15mm along 3 3 bmd Generally you don t modify a tagged yeeion You can terminate a branch with a mmgmtmn merge It s a copy of some speci c Version of the trunk or a branch mum lulnssaomsins Amman Dwa nuilnlnnvulu mule u mum unimammu mm mom nuccunwio Xusz Repository organization Now let39s try some things I No set standard I Detaching from one repository and I Recommend trunkbranches tags mm each I Imporhngmto another proer I Namely your personal repository in your course directory I A project might have a toprlevel directory Or second level ifgrouping proects helps I Creating and resolvmg a con ict I In this sense a priyertis an ongoing effort I Not necessarily a java proect as in Eclipse mum lulnssaomsins Amman Dwa nuilnlnnvulu mm A r mum unimammu mm mom nuccunwio Xusz
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'