Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Distributed Version Control Systems


Published on

An intro lecture on DVCS given on BGOUG and then on BGJUG. Git and Mercurial (Hg) are shown in the demos

Published in: Technology
  • Be the first to comment

Distributed Version Control Systems

  1. 1. DistributedVersion Control Mihail Stoynov
  2. 2. How many of you have used any DVCS?
  3. 3. How many of you have used any DVCS?
  4. 4. How many of you have used any DVCS?
  5. 5. How many of you have used any DVCS? The Deep Virtual Compton Scattering (DVCS) is studied at Jefferson Lab using the CEBAF 6 GeV polarized electron beam and the CLAS detector.
  6. 6. History of VCSs
  7. 7. History of VCSsFirst there was an ad hoc approach (copy dirs)Then local version control systems (VCSs)Then centralized (means there is a server) CVS, SVN ClearCase, Perforce (proprietary)
  8. 8. Problems of VCSs (1)The VCS server is asingle point of failureClients only have asnapshotCannot commit whenthe server is offlineNo checksums
  9. 9. Problems of VCSs (2)no distinction betweensaving a change andmaking it availableGetting history, doingdiffs requires theserver So there is some latency
  10. 10. Linus on CVS/SVN Because my hatred of CVS has meant that I see Subversion as being the most pointless project ever started.
  11. 11. VCSs vs. DVCSsClients have the wholerepositoryThere may be manyserversMicro commitspossible (two stepcommit)No latency (all is local)
  12. 12. List of DVCSesGit (inspired by BitKeeper)Mercurial (Hg) (inspired by BitKeeper)BitKeeper (proprietary)BazaarDarcs
  13. 13. GitDeveloped by Torvalds for the Linux kernel When the BitKeeper license was revoked The controversy with Andrew TridgellWritten in a collection of Perl, C, shell scriptsFree public repository at (300mb)
  14. 14. git clone linux-2.6git clone git:// into linux-2.6...remote: Counting objects: 1986551, done.remote: Compressing objects: 100%remote: Total 1986551 (delta 1653124), reused 1984179(delta 1651063)Receiving objects: 100% (1986551/1986551), 412.33 MiB |309 KiB/s, done.Resolving deltas: 100% (1653124/1653124), done.
  15. 15. SVN mechanicsSVN stores information as a list of file-basedchanges
  16. 16. Git mechanicsGit thinks of its data more like a set ofsnapshots of a mini filesystem
  17. 17. IntegrityGit uses SHA1checksums to protectcontent against errorsThe checksum alsoincludes the parent’schecksumThis is also true forMercurial
  18. 18. Show Show the certificate to loginDemo show eclipse properties -> ssh2 show .ssh/id_rsa show commit and push
  19. 19. Mercurial (Hg)Started by Matt Mackall a month after Git because of the same incident with BitKeeper unfortunately the linux guys chose Git :( it got popular - tutorial by Joel Spolsky
  20. 20. Command-linehg init hg clonehg add hg pushhg commit hg diffhg log hg updatehg status hg pullhg serve
  21. 21. Create a repository on bitbucketCreate a project and push to the repositoryhg clone the project on a temp diradd to .hg/hgrc[web]allow_push
falsePull from a second eclipse.Add a class on eclpise1 and push to localhost:8000Add the same class on eclipse2 and push.Merge.Get all the changes to eclipse1 and commit to bitbucketDemo
  22. 22. Git is MercurialMacGyver is Bond
  23. 23. Git vs. Mercurialflexible straightforwardscattered monolithicmutable history immutable historyhierarchical history linear historyRejects CVS/SVN Can integrate w/ SVN
  24. 24. Impact on small projects (1)Have you ever used a remote repository?Have you had an idiot colleague thatconstantly broke something?Doing diff, getting history is a pain!
  25. 25. Impact on small projects (2)Have you been working on a feature that isquite big and at the end of the day you wantedto commit even though it is not finished?Have you ever wrapped your half-donefeature so that it wouldn’t impact the wholeproject?
  26. 26. previous repository was TeamWare (home-brewed DSCM as they call it)Since b24 openjdk7 has been on MercurialIt is a hg-forest (means multiple repositories)There are push and pull gates, so in the“official” repository there aren’t many changes
  27. 27. Q&A
  28. 28. Resources
  29. 29. Resources
  30. 30. ResourcesGit vs. Mercurial 2008/08/07/git-vs-mercurial/ 2008/apr/06/differences-between- mercurial-and-git/