Mercurial > public > dvcs_intro_brownbag
comparison slides.rst @ 4:c9a18db51976
Basic presentation finished.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 12 Nov 2011 14:49:09 -0600 |
parents | 0130da731f83 |
children | b9801a668bff |
comparison
equal
deleted
inserted
replaced
3:0130da731f83 | 4:c9a18db51976 |
---|---|
7 ---- | 7 ---- |
8 | 8 |
9 (Sublimal Message) | 9 (Sublimal Message) |
10 ================== | 10 ================== |
11 | 11 |
12 (We should be using this at work... ) | 12 .. image:: images/stop.jpg |
13 ------------------------------------- | 13 |
14 | 14 ---- |
15 (Seriously... ) | |
16 | |
17 ---- | |
18 | |
19 | 15 |
20 # whoami | 16 # whoami |
21 ======== | 17 ======== |
22 | 18 |
23 Brian Neal <bgneal1@rockwellcollins.com> | 19 Brian Neal <bgneal1@rockwellcollins.com> |
284 Introduction to Mercurial | 280 Introduction to Mercurial |
285 ========================= | 281 ========================= |
286 | 282 |
287 - Repositories & working copies | 283 - Repositories & working copies |
288 - Changesets | 284 - Changesets |
289 - Revisions, changesets, & heads | 285 - Branches & Tags |
286 - Example workflow | |
290 - Command overview | 287 - Command overview |
291 - Example workflow | |
292 | 288 |
293 ---- | 289 ---- |
294 | 290 |
295 Repositories & Working Copies | 291 Repositories & Working Copies |
296 ============================= | 292 ============================= |
297 | 293 |
298 A repository consists of two things: | 294 A repository consists of two things: |
299 | 295 |
300 - Your working copy (a directory tree of files) | 296 - Your working directory (similar to a working copy in SVN) |
301 - The repository itself (also known as "the store") | 297 - The repository itself (also known as "the store") |
302 | 298 |
303 - A .hg directory at the top of your working copy | 299 - A .hg directory at the top of your working copy |
304 | 300 |
305 Example:: | 301 Example:: |
306 | 302 |
307 brian@gremmie:~/Documents/Rockwell/brownbags/dvcs/dvcs$ la | 303 $ ls -A |
308 .hg .hgignore images/ slides.cfg slides.css slides.html slides.rst | 304 .hg .hgignore images/ slides.cfg slides.css slides.html slides.rst |
309 | 305 |
310 ---- | 306 ---- |
311 | 307 |
312 What's in a Repository? | 308 What's in a Repository? |
314 | 310 |
315 A repository consists of a directed, acyclic graph of *changesets* | 311 A repository consists of a directed, acyclic graph of *changesets* |
316 | 312 |
317 .. image:: images/repos.png | 313 .. image:: images/repos.png |
318 | 314 |
319 - Each changeset can have 0, 1, or 2 parents | 315 - Each changeset can have 0, 1, or 2 parents (and infinite children) |
320 - A changeset with 0 parents is the root | 316 - A changeset with 0 parents is the root |
321 - A changeset with 2 parents is the result of a merge | 317 - A changeset with 2 parents is the result of a merge |
322 - The newest changeset is called the *tip* | 318 - The newest changeset is called the *tip*, a special tag name |
319 | |
320 ---- | |
321 | |
322 What's a Changeset? | |
323 =================== | |
324 | |
325 A changeset is an atomic collection of changes and some meta information. | |
326 The meta information includes: | |
327 | |
328 - Who made the changes | |
329 - When the changes were made | |
330 - Why - the commit message | |
331 - The name of the branch the changes were made on ("default" is the default) | |
332 - A local revision number | |
333 - A changeset ID; a 40 digit hex number (SHA-1 hash of the changeset & parents) | |
334 | |
335 A changeset can be named by: | |
336 | |
337 - Revision number (within a repository) | |
338 - Changeset ID (globally) | |
339 - Tag name | |
340 | |
341 ---- | |
342 | |
343 Branches & Tags | |
344 =============== | |
345 | |
346 - In the simple case, each changeset appear in a line | |
347 - When a changeset develops 2 or more children, a branch occurs | |
348 | |
349 - The latest revision of a branch is called a *head* | |
350 - A *merge* is when two branches join back together | |
351 - Branches can be given names; the default branch name is *"default"* | |
352 | |
353 - Changesets can be given human readable names, or *tags* | |
354 | |
355 - *Local tags* are only visible within a repository | |
356 - *Regular tags* are revision controlled and propagate to other repos | |
357 - The newest head in a repository is a tag called *tip* | |
358 | |
359 ---- | |
360 | |
361 Example Workflow | |
362 ================ | |
363 | |
364 .. image:: images/workflow1.png | |
365 | |
366 ---- | |
367 | |
368 Example Workflow (cont.) | |
369 ======================== | |
370 | |
371 .. image:: images/workflow2.png | |
372 | |
373 ---- | |
374 | |
375 Example Workflow (cont.) | |
376 ======================== | |
377 | |
378 .. image:: images/workflow3.png | |
323 | 379 |
324 ---- | 380 ---- |
325 | 381 |
326 SVN Commands for Review | 382 SVN Commands for Review |
327 ======================= | 383 ======================= |
329 Basic SVN commands: | 385 Basic SVN commands: |
330 | 386 |
331 - add, remove, copy, move, mkdir | 387 - add, remove, copy, move, mkdir |
332 - checkout, commit, update, revert | 388 - checkout, commit, update, revert |
333 - merge, resolved, diff | 389 - merge, resolved, diff |
334 - status | 390 - status, log |
335 - lock, unlock | 391 - lock, unlock |
336 | 392 |
337 ---- | 393 ---- |
338 | 394 |
339 Mercurial Commands | 395 Basic Mercurial Commands |
340 ================== | 396 ======================== |
341 | 397 |
342 Mercurial (hg) vs SVN commands: | 398 Mercurial (hg) vs SVN commands: |
343 | 399 |
344 - add, remove, copy, move, :strike:`mkdir` | 400 - add, remove, copy, move, :strike:`mkdir` |
345 - :strike:`checkout`, commit, update, revert | 401 - :strike:`checkout`, commit, update, revert |
346 - merge, resolve, diff | 402 - merge, resolve, diff, **heads** |
347 - status | 403 - status, log |
348 - :strike:`lock, unlock` | 404 - :strike:`lock, unlock` |
349 | 405 |
350 Additional "distributed commands": | 406 Additional "distributed commands": |
351 | 407 |
352 - clone, push, pull | 408 - clone, push, pull |
353 - incoming, outgoing | 409 - incoming, outgoing |
354 - serve | 410 - serve |
355 | 411 |
412 **Not a whole lot to learn above SVN** | |
413 | |
414 ---- | |
415 | |
416 References | |
417 ========== | |
418 | |
419 - Mercurial http://mercurial.selenic.com/ | |
420 - Mercurial Wiki http://mercurial.selenic.com/wiki/ | |
421 - Mercurial Book (free!) http://hgbook.red-bean.com/ | |
422 - Hg Init: A Mercurial Tutorial http://hginit.com | |
423 - Version Control By Example (free!) http://www.ericsink.com/vcbe/ | |
424 | |
425 ---- | |
426 | |
427 Questions? | |
428 ========== | |
429 |