Mercurial > public > dvcs_intro_brownbag
changeset 16:048e5aea6d36 tip
Updates for June 2012 presentation.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 25 Jun 2012 19:51:34 -0500 |
parents | 70e53cce4ad0 |
children | |
files | my_theme/js/slides.js slides.html slides.rst |
diffstat | 3 files changed, 367 insertions(+), 84 deletions(-) [+] |
line wrap: on
line diff
--- a/my_theme/js/slides.js Mon Jun 25 18:50:42 2012 -0500 +++ b/my_theme/js/slides.js Mon Jun 25 19:51:34 2012 -0500 @@ -400,11 +400,13 @@ break; case 37: // left arrow case 33: // page up + event.preventDefault(); prevSlide(); break; case 39: // right arrow case 32: // space case 34: // page down + event.preventDefault(); nextSlide(); break; case 50: // 2
--- a/slides.html Mon Jun 25 18:50:42 2012 -0500 +++ b/slides.html Mon Jun 25 19:51:34 2012 -0500 @@ -74,7 +74,7 @@ </aside> <aside class="page_number"> - 1/33 + 1/37 </aside> </footer> </div> @@ -85,10 +85,14 @@ <div class="slide"> <div class="inner"> - <header><h1>(Subliminal Message)</h1></header> + <header><h1>Agenda</h1></header> - <section><img alt="images/stop.jpg" src="images/stop.jpg" /></section> + <section><ul class="simple"> +<li>Brief history of version control tools</li> +<li>Features of distributed version control</li> +<li>Brief introduction to Mercurial</li> +</ul></section> </div> <div class="presenter_notes"> @@ -104,7 +108,7 @@ </aside> <aside class="page_number"> - 2/33 + 2/37 </aside> </footer> </div> @@ -143,7 +147,89 @@ </aside> <aside class="page_number"> - 3/33 + 3/37 + </aside> + </footer> + </div> + </div> + + <!-- slide source: slides.rst --> + <div class="slide-wrapper"> + <div class="slide"> + <div class="inner"> + + <header><h1>Disclaimers</h1></header> + + + <section><ul class="simple"> +<li>This is not a sales pitch</li> +<li>I actually <span class="strike">like</span> respect Subversion<ul> +<li>I'm the "Subversion guy" on my team</li> +<li>I developed SVN training and have given it ~9-10 times</li> +<li><a class="reference external" href="http://subversion.tigris.org/issues/show_bug.cgi?id=3919">http://subversion.tigris.org/issues/show_bug.cgi?id=3919</a></li> +</ul> +</li> +<li>I am not an expert<ul> +<li>I'm probably making this look too easy</li> +</ul> +</li> +</ul></section> + + </div> + <div class="presenter_notes"> + <header><h1>Presenter Notes</h1></header> + <section> + + </section> + </div> + <footer> + + <aside class="source"> + Source: <a href="slides.rst">slides.rst</a> + </aside> + + <aside class="page_number"> + 4/37 + </aside> + </footer> + </div> + </div> + + <!-- slide source: slides.rst --> + <div class="slide-wrapper"> + <div class="slide"> + <div class="inner"> + + <header><h1>Why learn about DVCS?</h1></header> + + + <section><ul class="simple"> +<li>DVCS have exploded in the open source world<ul> +<li>Interestingly, Subversion is growing in corporate environments</li> +</ul> +</li> +<li>Frustration with current tools</li> +<li>Interesting to see how the tools have evolved<ul> +<li>As a software practitioner, you should know what your options are</li> +</ul> +</li> +</ul></section> + + </div> + <div class="presenter_notes"> + <header><h1>Presenter Notes</h1></header> + <section> + + </section> + </div> + <footer> + + <aside class="source"> + Source: <a href="slides.rst">slides.rst</a> + </aside> + + <aside class="page_number"> + 5/37 </aside> </footer> </div> @@ -182,7 +268,7 @@ </aside> <aside class="page_number"> - 4/33 + 6/37 </aside> </footer> </div> @@ -224,7 +310,7 @@ </aside> <aside class="page_number"> - 5/33 + 7/37 </aside> </footer> </div> @@ -269,7 +355,7 @@ </aside> <aside class="page_number"> - 6/33 + 8/37 </aside> </footer> </div> @@ -299,7 +385,7 @@ </aside> <aside class="page_number"> - 7/33 + 9/37 </aside> </footer> </div> @@ -331,7 +417,7 @@ </aside> <aside class="page_number"> - 8/33 + 10/37 </aside> </footer> </div> @@ -371,7 +457,7 @@ </aside> <aside class="page_number"> - 9/33 + 11/37 </aside> </footer> </div> @@ -413,7 +499,7 @@ </aside> <aside class="page_number"> - 10/33 + 12/37 </aside> </footer> </div> @@ -455,7 +541,7 @@ </aside> <aside class="page_number"> - 11/33 + 13/37 </aside> </footer> </div> @@ -477,7 +563,7 @@ </li> <li>Initial pull down of an entire repository <em>might</em> be slower than a CVCS<ul> <li>Then again, you might be surprised</li> -<li>Mercurial, for example, stores an entire repository in less space than +<li>Mercurial, for example, stores an <em>entire</em> repository in less space than a SVN working copy in many cases</li> </ul> </li> @@ -497,7 +583,7 @@ </aside> <aside class="page_number"> - 12/33 + 14/37 </aside> </footer> </div> @@ -534,7 +620,7 @@ </aside> <aside class="page_number"> - 13/33 + 15/37 </aside> </footer> </div> @@ -553,7 +639,7 @@ <li>With a CVCS, you have to pick where to put the server</li> <li>The remote location is stuck with network latency & associated problems</li> <li>With a DVCS, each site can have a central repository<ul> -<li>The two central repos can be synched when convenient or even scripted</li> +<li>The two central repos can be synch'ed when convenient or even scripted</li> </ul> </li> </ul> @@ -573,7 +659,7 @@ </aside> <aside class="page_number"> - 14/33 + 16/37 </aside> </footer> </div> @@ -613,7 +699,7 @@ </aside> <aside class="page_number"> - 15/33 + 17/37 </aside> </footer> </div> @@ -648,7 +734,7 @@ </aside> <aside class="page_number"> - 16/33 + 18/37 </aside> </footer> </div> @@ -666,10 +752,11 @@ <li>Subversion has a bad reputation for merging<ul> <li>Some of this is not warranted...<ul> <li>Merge tracking was added in SVN v1.5</li> +<li>Steadily improved in v1.6 - v1.7</li> </ul> </li> <li>SVN does not handle file renames and tree conflicts very well</li> -<li>A lot of teams simply avoid merging out of fear</li> +<li>A lot of teams simply avoid merging out of fear or superstition</li> </ul> </li> </ul></section> @@ -688,7 +775,7 @@ </aside> <aside class="page_number"> - 17/33 + 19/37 </aside> </footer> </div> @@ -708,7 +795,7 @@ <li>More attention was paid to this aspect by DVCS's</li> </ul> </li> -<li>DVCS's use directed acyclic graphs internally to represent change sets<ul> +<li>DVCS's use <strong>directed acyclic graphs</strong> internally to represent change sets<ul> <li>More information is available to make merge decisions</li> <li>Easier to find common ancestors of code</li> </ul> @@ -735,7 +822,7 @@ </aside> <aside class="page_number"> - 18/33 + 20/37 </aside> </footer> </div> @@ -752,7 +839,7 @@ <section><ul class="simple"> <li>With a CVCS:<ul> <li>You make changes in your working copy</li> -<li>Before you can commit, you often must peform an update<ul> +<li>Before you can commit, you often must perform an update<ul> <li>This may trigger a merge</li> <li>Your changes are now mixed up with your friendly coworkers' changes</li> <li>Sometimes this can be a problem...</li> @@ -785,7 +872,7 @@ </aside> <aside class="page_number"> - 19/33 + 21/37 </aside> </footer> </div> @@ -806,10 +893,10 @@ </ul> </li> <li>Huge repositories are not practical</li> -<li>Hetrogenous repositories are not practical<ul> +<li>Heterogeneous repositories are not practical<ul> <li>Not a good idea to mix, say, software, systems, and firmware in the same repo</li> <li>Not a good idea to mix multiple products in the same repo</li> -<li>Arguably, this applies to a CVCS as well</li> +<li><em>Arguably, this applies to a CVCS as well</em></li> </ul> </li> <li>No support for path-based access control<ul> @@ -832,7 +919,7 @@ </aside> <aside class="page_number"> - 20/33 + 22/37 </aside> </footer> </div> @@ -869,7 +956,7 @@ </aside> <aside class="page_number"> - 21/33 + 23/37 </aside> </footer> </div> @@ -893,7 +980,7 @@ <li>Reputation for being fast & easy to get started with</li> <li>Can be served via Apache Web server</li> <li>Repository hooks</li> -<li>Integrates with Trac</li> +<li>Integrates with the Trac issue tracker</li> <li>Can import history from other tools, including Subversion</li> </ul></section> @@ -911,7 +998,7 @@ </aside> <aside class="page_number"> - 22/33 + 24/37 </aside> </footer> </div> @@ -962,7 +1049,7 @@ </aside> <aside class="page_number"> - 23/33 + 25/37 </aside> </footer> </div> @@ -999,7 +1086,7 @@ </aside> <aside class="page_number"> - 24/33 + 26/37 </aside> </footer> </div> @@ -1044,7 +1131,7 @@ </aside> <aside class="page_number"> - 25/33 + 27/37 </aside> </footer> </div> @@ -1088,7 +1175,102 @@ </aside> <aside class="page_number"> - 26/33 + 28/37 + </aside> + </footer> + </div> + </div> + + <!-- slide source: slides.rst --> + <div class="slide-wrapper"> + <div class="slide"> + <div class="inner"> + + <header><h1>A note on branching...</h1></header> + + + <section><ul class="simple"> +<li>Branching happens <em>all the time</em> when multiple developers are involved</li> +<li>It is so natural you may not notice it at first</li> +<li>Branching often has two meanings:<ul> +<li>The "normal" day-to-day branching when developers combine changes</li> +<li>The conceptual branching that occurs when:<ul> +<li>You need a feature branch</li> +<li>You need a release branch</li> +<li>You need an experimental branch</li> +<li>etc.</li> +</ul> +</li> +</ul> +</li> +</ul></section> + + </div> + <div class="presenter_notes"> + <header><h1>Presenter Notes</h1></header> + <section> + + </section> + </div> + <footer> + + <aside class="source"> + Source: <a href="slides.rst">slides.rst</a> + </aside> + + <aside class="page_number"> + 29/37 + </aside> + </footer> + </div> + </div> + + <!-- slide source: slides.rst --> + <div class="slide-wrapper"> + <div class="slide"> + <div class="inner"> + + <header><h1>Ways to Branch in Hg</h1></header> + + + <section><ul class="simple"> +<li>Just make another clone of the repository!<ul> +<li>Slowest, safest, easiest to understand</li> +<li>Hard links are used (where available) to minimize disk space</li> +</ul> +</li> +<li>Bookmarks<ul> +<li>Lightweight tags can be applied to changesets</li> +<li>Similar to how Git does branches</li> +<li>Bookmarks can be deleted; they are not permanent</li> +</ul> +</li> +<li>Named branches<ul> +<li>Actually recording the branch name in the changeset</li> +</ul> +</li> +<li>Anonymous branches<ul> +<li>Update to any old changeset, make changes, commit</li> +<li>"Good" for emergency fixes, bad for remembering what you did</li> +</ul> +</li> +</ul></section> + + </div> + <div class="presenter_notes"> + <header><h1>Presenter Notes</h1></header> + <section> + + </section> + </div> + <footer> + + <aside class="source"> + Source: <a href="slides.rst">slides.rst</a> + </aside> + + <aside class="page_number"> + 30/37 </aside> </footer> </div> @@ -1118,7 +1300,7 @@ </aside> <aside class="page_number"> - 27/33 + 31/37 </aside> </footer> </div> @@ -1148,7 +1330,7 @@ </aside> <aside class="page_number"> - 28/33 + 32/37 </aside> </footer> </div> @@ -1185,7 +1367,7 @@ </aside> <aside class="page_number"> - 29/33 + 33/37 </aside> </footer> </div> @@ -1222,7 +1404,7 @@ </aside> <aside class="page_number"> - 30/33 + 34/37 </aside> </footer> </div> @@ -1265,7 +1447,7 @@ </aside> <aside class="page_number"> - 31/33 + 35/37 </aside> </footer> </div> @@ -1305,7 +1487,7 @@ </aside> <aside class="page_number"> - 32/33 + 36/37 </aside> </footer> </div> @@ -1333,7 +1515,7 @@ </aside> <aside class="page_number"> - 33/33 + 37/37 </aside> </footer> </div> @@ -1354,7 +1536,7 @@ <tr id="toc-row-2"> - <th><a href="#slide2">(Subliminal Message)</a></th> + <th><a href="#slide2">Agenda</a></th> <td><a href="#slide2">2</a></td> </tr> @@ -1366,13 +1548,13 @@ <tr id="toc-row-4"> - <th><a href="#slide4">Brief History of Version Control Tools</a></th> + <th><a href="#slide4">Disclaimers</a></th> <td><a href="#slide4">4</a></td> </tr> <tr id="toc-row-5"> - <th><a href="#slide5">Brief History of Version Control Tools</a></th> + <th><a href="#slide5">Why learn about DVCS?</a></th> <td><a href="#slide5">5</a></td> </tr> @@ -1384,167 +1566,191 @@ <tr id="toc-row-7"> - <th><a href="#slide7">What is a CVCS Again?</a></th> + <th><a href="#slide7">Brief History of Version Control Tools</a></th> <td><a href="#slide7">7</a></td> </tr> <tr id="toc-row-8"> - <th><a href="#slide8">So what's a DVCS look like?</a></th> + <th><a href="#slide8">Brief History of Version Control Tools</a></th> <td><a href="#slide8">8</a></td> </tr> <tr id="toc-row-9"> - <th><a href="#slide9">What does a DVCS buy you?</a></th> + <th><a href="#slide9">What is a CVCS Again?</a></th> <td><a href="#slide9">9</a></td> </tr> <tr id="toc-row-10"> - <th><a href="#slide10">Private Workspaces</a></th> + <th><a href="#slide10">So what's a DVCS look like?</a></th> <td><a href="#slide10">10</a></td> </tr> <tr id="toc-row-11"> - <th><a href="#slide11">Offline Mode</a></th> + <th><a href="#slide11">What does a DVCS buy you?</a></th> <td><a href="#slide11">11</a></td> </tr> <tr id="toc-row-12"> - <th><a href="#slide12">Speed</a></th> + <th><a href="#slide12">Private Workspaces</a></th> <td><a href="#slide12">12</a></td> </tr> <tr id="toc-row-13"> - <th><a href="#slide13">Scalability</a></th> + <th><a href="#slide13">Offline Mode</a></th> <td><a href="#slide13">13</a></td> </tr> <tr id="toc-row-14"> - <th><a href="#slide14">Split Geography</a></th> + <th><a href="#slide14">Speed</a></th> <td><a href="#slide14">14</a></td> </tr> <tr id="toc-row-15"> - <th><a href="#slide15">Flexible Workflows</a></th> + <th><a href="#slide15">Scalability</a></th> <td><a href="#slide15">15</a></td> </tr> <tr id="toc-row-16"> - <th><a href="#slide16">Distributed Backups</a></th> + <th><a href="#slide16">Split Geography</a></th> <td><a href="#slide16">16</a></td> </tr> <tr id="toc-row-17"> - <th><a href="#slide17">Easier Merging</a></th> + <th><a href="#slide17">Flexible Workflows</a></th> <td><a href="#slide17">17</a></td> </tr> <tr id="toc-row-18"> - <th><a href="#slide18">Easier Merging (cont.)</a></th> + <th><a href="#slide18">Distributed Backups</a></th> <td><a href="#slide18">18</a></td> </tr> <tr id="toc-row-19"> - <th><a href="#slide19">Commit Before Merge</a></th> + <th><a href="#slide19">Easier Merging</a></th> <td><a href="#slide19">19</a></td> </tr> <tr id="toc-row-20"> - <th><a href="#slide20">Okay, what's the catch?</a></th> + <th><a href="#slide20">Easier Merging (cont.)</a></th> <td><a href="#slide20">20</a></td> </tr> <tr id="toc-row-21"> - <th><a href="#slide21">Introduction to Mercurial</a></th> + <th><a href="#slide21">Commit Before Merge</a></th> <td><a href="#slide21">21</a></td> </tr> <tr id="toc-row-22"> - <th><a href="#slide22">Mercurial Overview</a></th> + <th><a href="#slide22">Okay, what's the catch?</a></th> <td><a href="#slide22">22</a></td> </tr> <tr id="toc-row-23"> - <th><a href="#slide23">Repositories & Working Directories</a></th> + <th><a href="#slide23">Introduction to Mercurial</a></th> <td><a href="#slide23">23</a></td> </tr> <tr id="toc-row-24"> - <th><a href="#slide24">What's in a Repository?</a></th> + <th><a href="#slide24">Mercurial Overview</a></th> <td><a href="#slide24">24</a></td> </tr> <tr id="toc-row-25"> - <th><a href="#slide25">What's a Changeset?</a></th> + <th><a href="#slide25">Repositories & Working Directories</a></th> <td><a href="#slide25">25</a></td> </tr> <tr id="toc-row-26"> - <th><a href="#slide26">Branches & Tags</a></th> + <th><a href="#slide26">What's in a Repository?</a></th> <td><a href="#slide26">26</a></td> </tr> <tr id="toc-row-27"> - <th><a href="#slide27">Example Workflow</a></th> + <th><a href="#slide27">What's a Changeset?</a></th> <td><a href="#slide27">27</a></td> </tr> <tr id="toc-row-28"> - <th><a href="#slide28">Example Workflow (cont.)</a></th> + <th><a href="#slide28">Branches & Tags</a></th> <td><a href="#slide28">28</a></td> </tr> <tr id="toc-row-29"> - <th><a href="#slide29">Example Workflow (cont.)</a></th> + <th><a href="#slide29">A note on branching...</a></th> <td><a href="#slide29">29</a></td> </tr> <tr id="toc-row-30"> - <th><a href="#slide30">SVN Commands for Review</a></th> + <th><a href="#slide30">Ways to Branch in Hg</a></th> <td><a href="#slide30">30</a></td> </tr> <tr id="toc-row-31"> - <th><a href="#slide31">Basic Mercurial Commands</a></th> + <th><a href="#slide31">Example Workflow</a></th> <td><a href="#slide31">31</a></td> </tr> <tr id="toc-row-32"> - <th><a href="#slide32">References</a></th> + <th><a href="#slide32">Example Workflow (cont.)</a></th> <td><a href="#slide32">32</a></td> </tr> <tr id="toc-row-33"> - <th><a href="#slide33">Questions?</a></th> + <th><a href="#slide33">Example Workflow (cont.)</a></th> <td><a href="#slide33">33</a></td> </tr> + <tr id="toc-row-34"> + <th><a href="#slide34">SVN Commands for Review</a></th> + <td><a href="#slide34">34</a></td> + </tr> + + + <tr id="toc-row-35"> + <th><a href="#slide35">Basic Mercurial Commands</a></th> + <td><a href="#slide35">35</a></td> + </tr> + + + <tr id="toc-row-36"> + <th><a href="#slide36">References</a></th> + <td><a href="#slide36">36</a></td> + </tr> + + + <tr id="toc-row-37"> + <th><a href="#slide37">Questions?</a></th> + <td><a href="#slide37">37</a></td> + </tr> + + </table> </div>
--- a/slides.rst Mon Jun 25 18:50:42 2012 -0500 +++ b/slides.rst Mon Jun 25 19:51:34 2012 -0500 @@ -6,10 +6,12 @@ ---- -(Subliminal Message) -==================== +Agenda +====== -.. image:: images/stop.jpg +- Brief history of version control tools +- Features of distributed version control +- Brief introduction to Mercurial ---- @@ -30,6 +32,36 @@ ---- +Disclaimers +=========== + +- This is not a sales pitch +- I actually :strike:`like` respect Subversion + + - I'm the "Subversion guy" on my team + - I developed SVN training and have given it ~9-10 times + - http://subversion.tigris.org/issues/show_bug.cgi?id=3919 + +- I am not an expert + + - I'm probably making this look too easy + +---- + +Why learn about DVCS? +===================== + +- DVCS have exploded in the open source world + + - Interestingly, Subversion is growing in corporate environments + +- Frustration with current tools +- Interesting to see how the tools have evolved + + - As a software practitioner, you should know what your options are + +---- + Brief History of Version Control Tools ====================================== @@ -157,7 +189,7 @@ - Initial pull down of an entire repository *might* be slower than a CVCS - Then again, you might be surprised - - Mercurial, for example, stores an entire repository in less space than + - Mercurial, for example, stores an *entire* repository in less space than a SVN working copy in many cases @@ -182,7 +214,7 @@ - The remote location is stuck with network latency & associated problems - With a DVCS, each site can have a central repository - - The two central repos can be synched when convenient or even scripted + - The two central repos can be synch'ed when convenient or even scripted .. image:: images/split_geography.png @@ -221,9 +253,10 @@ - Some of this is not warranted... - Merge tracking was added in SVN v1.5 + - Steadily improved in v1.6 - v1.7 - SVN does not handle file renames and tree conflicts very well - - A lot of teams simply avoid merging out of fear + - A lot of teams simply avoid merging out of fear or superstition ---- @@ -236,7 +269,7 @@ - More attention was paid to this aspect by DVCS's - - DVCS's use directed acyclic graphs internally to represent change sets + - DVCS's use **directed acyclic graphs** internally to represent change sets - More information is available to make merge decisions - Easier to find common ancestors of code @@ -253,7 +286,7 @@ - With a CVCS: - You make changes in your working copy - - Before you can commit, you often must peform an update + - Before you can commit, you often must perform an update - This may trigger a merge - Your changes are now mixed up with your friendly coworkers' changes @@ -281,11 +314,11 @@ - Huge repositories are not practical -- Hetrogenous repositories are not practical +- Heterogeneous repositories are not practical - Not a good idea to mix, say, software, systems, and firmware in the same repo - Not a good idea to mix multiple products in the same repo - - Arguably, this applies to a CVCS as well + - *Arguably, this applies to a CVCS as well* - No support for path-based access control @@ -317,7 +350,7 @@ - Reputation for being fast & easy to get started with - Can be served via Apache Web server - Repository hooks -- Integrates with Trac +- Integrates with the Trac issue tracker - Can import history from other tools, including Subversion ---- @@ -398,6 +431,48 @@ ---- +A note on branching... +====================== + +- Branching happens *all the time* when multiple developers are involved +- It is so natural you may not notice it at first +- Branching often has two meanings: + + - The "normal" day-to-day branching when developers combine changes + - The conceptual branching that occurs when: + + - You need a feature branch + - You need a release branch + - You need an experimental branch + - etc. + +---- + +Ways to Branch in Hg +==================== + +- Just make another clone of the repository! + + - Slowest, safest, easiest to understand + - Hard links are used (where available) to minimize disk space + +- Bookmarks + + - Lightweight tags can be applied to changesets + - Similar to how Git does branches + - Bookmarks can be deleted; they are not permanent + +- Named branches + + - Actually recording the branch name in the changeset + +- Anonymous branches + + - Update to any old changeset, make changes, commit + - "Good" for emergency fixes, bad for remembering what you did + +---- + Example Workflow ================