Your SlideShare is downloading. ×
0
Mercurial
Modern Source Control Management

John Paulett
April 5, 2010
Overview
CVS Issues
Modern Alternatives
Distributed Version Control
Mercurial
Next Steps
CVS Shortcomings
     Network connectivity required
     Lack of support for renaming/moving
     Lack of atomic commits
 ...
CVS Replacements
     Subversion (2000) - svn
       ●     “CVS done right”
     Git (2005) – git
       ●     Created by ...
Distributed Version Control
                       (DVCS)
     Complete, local repository


     Branching & merging are t...
Mercurial
     mercurial.selenic.com


     Changesets, not files


     Mozilla, OpenJDK, OpenSolaris, Python,
     Zen, ...
Create a new repository
     $ hg init demo
     $ cd demo
     $ ls -a
     . ..     .hg




2010.04.05                  ...
Add a file
     $ echo "Hello world" > README
     $ hg add README
     $ hg status
     A README




2010.04.05          ...
Commit the changeset
     $ hg commit -m "Adding basic README"


     $ hg log
     0[tip]       9b1b9c995571     2010-01-...
Push to remote repository
    $ hg push ssh://hg@bitbucket.org/nrg/demo/
    pushing to ssh://hg@bitbucket.org/nrg/demo/
 ...
Clone Existing Repository
    $ hg clone http://bitbucket.org/nrg/demo/
    destination directory: demo
    requesting all...
Get Updates
   $ hg pull
   pulling from https://johnpaulett@bitbucket.org/nrg/demo/
   searching for changes
   adding ch...
Workflow
     Multiple workflows are possible


     “Integration Manager”
              blessed           developer      ...
Workflow
                    mainline


             john                      cnda




                               1.4...
Hosting
     bitbucket.org


     Self-hosted via Apache & SSH
       ●     hg.xnat.org


     Google Code / Sourceforge

...
Tools
     $ hg
     MercurialEclipse
     TortoiseHg
     CuteHg




2010.04.05                      16
Resources
     mercurial.selenic.com
     hgbook.red-bean.com
     hginit.com




2010.04.05                    17
Resources
     http://nrg.wikispaces.com/Mercurial
     http://betterexplained.com/articles/intro-to-distributed-
     ver...
hg Advantages
     Easy learning curve coming from
     CVS/SVN


     Allows 3rd parties to more easily contribute


    ...
Next Steps
     Try out Mercurial:
       ●     bitbucket.org/nrg




2010.04.05                           20
2010.04.05   21
Upcoming SlideShare
Loading in...5
×

Mercurial: Modern Source Control Management

3,388

Published on

Discussion on Mercurial and migration from CVS.

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,388
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
84
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Transcript of "Mercurial: Modern Source Control Management"

  1. 1. Mercurial Modern Source Control Management John Paulett April 5, 2010
  2. 2. Overview CVS Issues Modern Alternatives Distributed Version Control Mercurial Next Steps
  3. 3. CVS Shortcomings Network connectivity required Lack of support for renaming/moving Lack of atomic commits Single point of failure Expensive branch operations Day-long merges 2010.04.05 3
  4. 4. CVS Replacements Subversion (2000) - svn ● “CVS done right” Git (2005) – git ● Created by Linus Torvalds for kernel development Mercurial (2005) – hg ● Created after Linux-Bitkeeper incident Bazaar, darcs, monotone ... 2010.04.05 4
  5. 5. Distributed Version Control (DVCS) Complete, local repository Branching & merging are trivial Central server for sharing repositories 2010.04.05 5
  6. 6. Mercurial mercurial.selenic.com Changesets, not files Mozilla, OpenJDK, OpenSolaris, Python, Zen, OpenOffice, NetBeans 2010.04.05 6
  7. 7. Create a new repository $ hg init demo $ cd demo $ ls -a . .. .hg 2010.04.05 7
  8. 8. Add a file $ echo "Hello world" > README $ hg add README $ hg status A README 2010.04.05 8
  9. 9. Commit the changeset $ hg commit -m "Adding basic README" $ hg log 0[tip] 9b1b9c995571 2010-01-13 12:37 -0600 jpaulett Adding basic README 2010.04.05 9
  10. 10. Push to remote repository $ hg push ssh://hg@bitbucket.org/nrg/demo/ pushing to ssh://hg@bitbucket.org/nrg/demo/ searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files ... 2010.04.05 10
  11. 11. Clone Existing Repository $ hg clone http://bitbucket.org/nrg/demo/ destination directory: demo requesting all changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 2010.04.05 11
  12. 12. Get Updates $ hg pull pulling from https://johnpaulett@bitbucket.org/nrg/demo/ searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) $ hg update 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 2010.04.05 12
  13. 13. Workflow Multiple workflows are possible “Integration Manager” blessed developer developer repository public public integration developer developer manager private private 2010.04.05 http://whygitisbetterthanx.com/#any-workflow 13
  14. 14. Workflow mainline john cnda 1.4.1 changeset repository tag 1.4.2 2010.04.05 14
  15. 15. Hosting bitbucket.org Self-hosted via Apache & SSH ● hg.xnat.org Google Code / Sourceforge 2010.04.05 15
  16. 16. Tools $ hg MercurialEclipse TortoiseHg CuteHg 2010.04.05 16
  17. 17. Resources mercurial.selenic.com hgbook.red-bean.com hginit.com 2010.04.05 17
  18. 18. Resources http://nrg.wikispaces.com/Mercurial http://betterexplained.com/articles/intro-to-distributed- version-control-illustrated/ http://code.google.com/p/support/wiki/DVCSAnalysis 2010.04.05 18
  19. 19. hg Advantages Easy learning curve coming from CVS/SVN Allows 3rd parties to more easily contribute No more day long merges 2010.04.05 19
  20. 20. Next Steps Try out Mercurial: ● bitbucket.org/nrg 2010.04.05 20
  21. 21. 2010.04.05 21
  1. A particular slide catching your eye?

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

×