Mercurial > public > dvcs_intro_brownbag
comparison slides.rst @ 16:048e5aea6d36 tip
Updates for June 2012 presentation.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 25 Jun 2012 19:51:34 -0500 |
parents | 727c48601d66 |
children |
comparison
equal
deleted
inserted
replaced
15:70e53cce4ad0 | 16:048e5aea6d36 |
---|---|
4 Introduction to Distributed Version Control with Mercurial | 4 Introduction to Distributed Version Control with Mercurial |
5 ========================================================== | 5 ========================================================== |
6 | 6 |
7 ---- | 7 ---- |
8 | 8 |
9 (Subliminal Message) | 9 Agenda |
10 ==================== | 10 ====== |
11 | 11 |
12 .. image:: images/stop.jpg | 12 - Brief history of version control tools |
13 - Features of distributed version control | |
14 - Brief introduction to Mercurial | |
13 | 15 |
14 ---- | 16 ---- |
15 | 17 |
16 # whoami | 18 # whoami |
17 ======== | 19 ======== |
25 - UMS (July 1999 - Spring 2000) | 27 - UMS (July 1999 - Spring 2000) |
26 - Surgical Strike - (Spring - Fall 2000) | 28 - Surgical Strike - (Spring - Fall 2000) |
27 - JTRS 2B - (Fall 2000 - Summer 2001) | 29 - JTRS 2B - (Fall 2000 - Summer 2001) |
28 - SCAMP SEP - (Summer 2001 - October 2004) | 30 - SCAMP SEP - (Summer 2001 - October 2004) |
29 - TTNT (January 2005 - Present) | 31 - TTNT (January 2005 - Present) |
32 | |
33 ---- | |
34 | |
35 Disclaimers | |
36 =========== | |
37 | |
38 - This is not a sales pitch | |
39 - I actually :strike:`like` respect Subversion | |
40 | |
41 - I'm the "Subversion guy" on my team | |
42 - I developed SVN training and have given it ~9-10 times | |
43 - http://subversion.tigris.org/issues/show_bug.cgi?id=3919 | |
44 | |
45 - I am not an expert | |
46 | |
47 - I'm probably making this look too easy | |
48 | |
49 ---- | |
50 | |
51 Why learn about DVCS? | |
52 ===================== | |
53 | |
54 - DVCS have exploded in the open source world | |
55 | |
56 - Interestingly, Subversion is growing in corporate environments | |
57 | |
58 - Frustration with current tools | |
59 - Interesting to see how the tools have evolved | |
60 | |
61 - As a software practitioner, you should know what your options are | |
30 | 62 |
31 ---- | 63 ---- |
32 | 64 |
33 Brief History of Version Control Tools | 65 Brief History of Version Control Tools |
34 ====================================== | 66 ====================================== |
155 - Switching between branches will blow your mind | 187 - Switching between branches will blow your mind |
156 | 188 |
157 - Initial pull down of an entire repository *might* be slower than a CVCS | 189 - Initial pull down of an entire repository *might* be slower than a CVCS |
158 | 190 |
159 - Then again, you might be surprised | 191 - Then again, you might be surprised |
160 - Mercurial, for example, stores an entire repository in less space than | 192 - Mercurial, for example, stores an *entire* repository in less space than |
161 a SVN working copy in many cases | 193 a SVN working copy in many cases |
162 | 194 |
163 | 195 |
164 ---- | 196 ---- |
165 | 197 |
180 - Imagine a team split between Cedar Rapids & Richardson... | 212 - Imagine a team split between Cedar Rapids & Richardson... |
181 - With a CVCS, you have to pick where to put the server | 213 - With a CVCS, you have to pick where to put the server |
182 - The remote location is stuck with network latency & associated problems | 214 - The remote location is stuck with network latency & associated problems |
183 - With a DVCS, each site can have a central repository | 215 - With a DVCS, each site can have a central repository |
184 | 216 |
185 - The two central repos can be synched when convenient or even scripted | 217 - The two central repos can be synch'ed when convenient or even scripted |
186 | 218 |
187 .. image:: images/split_geography.png | 219 .. image:: images/split_geography.png |
188 | 220 |
189 ---- | 221 ---- |
190 | 222 |
219 - Subversion has a bad reputation for merging | 251 - Subversion has a bad reputation for merging |
220 | 252 |
221 - Some of this is not warranted... | 253 - Some of this is not warranted... |
222 | 254 |
223 - Merge tracking was added in SVN v1.5 | 255 - Merge tracking was added in SVN v1.5 |
256 - Steadily improved in v1.6 - v1.7 | |
224 | 257 |
225 - SVN does not handle file renames and tree conflicts very well | 258 - SVN does not handle file renames and tree conflicts very well |
226 - A lot of teams simply avoid merging out of fear | 259 - A lot of teams simply avoid merging out of fear or superstition |
227 | 260 |
228 ---- | 261 ---- |
229 | 262 |
230 Easier Merging (cont.) | 263 Easier Merging (cont.) |
231 ====================== | 264 ====================== |
234 | 267 |
235 - Merging simply has to work correctly and be easy in a DVCS | 268 - Merging simply has to work correctly and be easy in a DVCS |
236 | 269 |
237 - More attention was paid to this aspect by DVCS's | 270 - More attention was paid to this aspect by DVCS's |
238 | 271 |
239 - DVCS's use directed acyclic graphs internally to represent change sets | 272 - DVCS's use **directed acyclic graphs** internally to represent change sets |
240 | 273 |
241 - More information is available to make merge decisions | 274 - More information is available to make merge decisions |
242 - Easier to find common ancestors of code | 275 - Easier to find common ancestors of code |
243 | 276 |
244 - Developer changes and merge changes are separate | 277 - Developer changes and merge changes are separate |
251 =================== | 284 =================== |
252 | 285 |
253 - With a CVCS: | 286 - With a CVCS: |
254 | 287 |
255 - You make changes in your working copy | 288 - You make changes in your working copy |
256 - Before you can commit, you often must peform an update | 289 - Before you can commit, you often must perform an update |
257 | 290 |
258 - This may trigger a merge | 291 - This may trigger a merge |
259 - Your changes are now mixed up with your friendly coworkers' changes | 292 - Your changes are now mixed up with your friendly coworkers' changes |
260 - Sometimes this can be a problem... | 293 - Sometimes this can be a problem... |
261 | 294 |
279 | 312 |
280 - This makes working with binary files difficult in a team environment | 313 - This makes working with binary files difficult in a team environment |
281 | 314 |
282 - Huge repositories are not practical | 315 - Huge repositories are not practical |
283 | 316 |
284 - Hetrogenous repositories are not practical | 317 - Heterogeneous repositories are not practical |
285 | 318 |
286 - Not a good idea to mix, say, software, systems, and firmware in the same repo | 319 - Not a good idea to mix, say, software, systems, and firmware in the same repo |
287 - Not a good idea to mix multiple products in the same repo | 320 - Not a good idea to mix multiple products in the same repo |
288 - Arguably, this applies to a CVCS as well | 321 - *Arguably, this applies to a CVCS as well* |
289 | 322 |
290 - No support for path-based access control | 323 - No support for path-based access control |
291 | 324 |
292 - With current tools, you either can access the full repo, or nothing | 325 - With current tools, you either can access the full repo, or nothing |
293 | 326 |
315 - Extensible with official and 3rd party extensions | 348 - Extensible with official and 3rd party extensions |
316 - TortoiseHg is a popular GUI for Windows | 349 - TortoiseHg is a popular GUI for Windows |
317 - Reputation for being fast & easy to get started with | 350 - Reputation for being fast & easy to get started with |
318 - Can be served via Apache Web server | 351 - Can be served via Apache Web server |
319 - Repository hooks | 352 - Repository hooks |
320 - Integrates with Trac | 353 - Integrates with the Trac issue tracker |
321 - Can import history from other tools, including Subversion | 354 - Can import history from other tools, including Subversion |
322 | 355 |
323 ---- | 356 ---- |
324 | 357 |
325 Repositories & Working Directories | 358 Repositories & Working Directories |
396 - *Regular tags* are revision controlled and propagate to other repos | 429 - *Regular tags* are revision controlled and propagate to other repos |
397 - The newest head in a repository is a tag called *tip* | 430 - The newest head in a repository is a tag called *tip* |
398 | 431 |
399 ---- | 432 ---- |
400 | 433 |
434 A note on branching... | |
435 ====================== | |
436 | |
437 - Branching happens *all the time* when multiple developers are involved | |
438 - It is so natural you may not notice it at first | |
439 - Branching often has two meanings: | |
440 | |
441 - The "normal" day-to-day branching when developers combine changes | |
442 - The conceptual branching that occurs when: | |
443 | |
444 - You need a feature branch | |
445 - You need a release branch | |
446 - You need an experimental branch | |
447 - etc. | |
448 | |
449 ---- | |
450 | |
451 Ways to Branch in Hg | |
452 ==================== | |
453 | |
454 - Just make another clone of the repository! | |
455 | |
456 - Slowest, safest, easiest to understand | |
457 - Hard links are used (where available) to minimize disk space | |
458 | |
459 - Bookmarks | |
460 | |
461 - Lightweight tags can be applied to changesets | |
462 - Similar to how Git does branches | |
463 - Bookmarks can be deleted; they are not permanent | |
464 | |
465 - Named branches | |
466 | |
467 - Actually recording the branch name in the changeset | |
468 | |
469 - Anonymous branches | |
470 | |
471 - Update to any old changeset, make changes, commit | |
472 - "Good" for emergency fixes, bad for remembering what you did | |
473 | |
474 ---- | |
475 | |
401 Example Workflow | 476 Example Workflow |
402 ================ | 477 ================ |
403 | 478 |
404 .. image:: images/workflow1.png | 479 .. image:: images/workflow1.png |
405 | 480 |