DistributedVersion Control    Mihail Stoynov
How many of you have  used any DVCS?
How many of you have  used any DVCS?
How many of you have  used any DVCS?
How many of you have  used any DVCS?              The Deep Virtual                   Compton              Scattering (DVCS...
History of VCSs
History of VCSsFirst there was an ad hoc approach (copy dirs)Then local version control systems (VCSs)Then centralized (me...
Problems of VCSs (1)The VCS server is asingle point of failureClients only have asnapshotCannot commit whenthe server is o...
Problems of VCSs (2)no distinction betweensaving a change andmaking it availableGetting history, doingdiffs requires these...
Linus on CVS/SVN       Because my hatred of CVS has       meant that I see Subversion as       being the most pointless   ...
VCSs vs. DVCSsClients have the wholerepositoryThere may be manyserversMicro commitspossible (two stepcommit)No latency (al...
List of DVCSesGit (inspired by BitKeeper)Mercurial (Hg) (inspired by BitKeeper)BitKeeper (proprietary)BazaarDarcs
GitDeveloped by Torvalds for the Linux kernel  When the BitKeeper license was revoked  The controversy with Andrew Tridgel...
git clone linux-2.6git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitCloning into linux-2.6......
SVN mechanicsSVN stores information as a list of file-basedchanges
Git mechanicsGit thinks of its data more like a set ofsnapshots of a mini filesystem
IntegrityGit uses SHA1checksums to protectcontent against errorsThe checksum alsoincludes the parent’schecksumThis is also...
Show github.org       Show the certificate to loginDemo       show eclipse properties -> ssh2       show .ssh/id_rsa       ...
Mercurial (Hg)Started by Matt Mackall a month after Git  because of the same incident with BitKeeper  unfortunately the li...
Command-linehg init     hg clonehg add      hg pushhg commit   hg diffhg log      hg updatehg status   hg pullhg serve
Create a repository on bitbucketCreate a project and push to the repositoryhg clone the project on a temp diradd to .hg/hg...
Git is   MercurialMacGyver    is Bond
Git vs. Mercurialflexible                straightforwardscattered              monolithicmutable history        immutable h...
Impact on small     projects (1)Have you ever used a remote repository?Have you had an idiot colleague thatconstantly brok...
Impact on small    projects (2)Have you been working on a feature that isquite big and at the end of the day you wantedto ...
http://hg.openjdk.java.netThe previous repository was TeamWare (home-brewed DSCM as they call it)Since b24 openjdk7 has be...
Q&A
Resourceshttp://www.theregister.co.uk/2005/04/14/torvalds_attacks_tridgell/http://progit.org/book/ch1-3.htmlhttps://github...
Resourceshttp://en.wikipedia.org/wiki/Mercurial_(software)http://en.wikipedia.org/wiki/Git_(software)
ResourcesGit vs. Mercurial  http://importantshock.wordpress.com/  2008/08/07/git-vs-mercurial/  http://www.rockstarprogram...
Upcoming SlideShare
Loading in...5
×

Distributed Version Control Systems

2,545

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
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,545
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
43
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • 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 github.com (300mb)http://progit.org/book/
    14. 14. git clone linux-2.6git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitCloning 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 github.org 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 anywayhginit.com - 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
=
*push_ssl
=
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. http://hg.openjdk.java.netThe 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. Resourceshttp://www.theregister.co.uk/2005/04/14/torvalds_attacks_tridgell/http://progit.org/book/ch1-3.htmlhttps://github.com/mihailstoynov/GithubProjecthttp://hginit.com
    29. 29. Resourceshttp://en.wikipedia.org/wiki/Mercurial_(software)http://en.wikipedia.org/wiki/Git_(software)
    30. 30. ResourcesGit vs. Mercurial http://importantshock.wordpress.com/ 2008/08/07/git-vs-mercurial/ http://www.rockstarprogrammer.org/post/ 2008/apr/06/differences-between- mercurial-and-git/
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×