hgbook
annotate en/examples/daily.files @ 124:c9aad709bd3a
Document the backout command.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue Dec 26 13:08:20 2006 -0800 (2006-12-26) |
parents | 6f37e6a7d8cd |
children | 5b034c2b74f7 |
rev | line source |
---|---|
bos@47 | 1 #!/bin/bash |
bos@47 | 2 |
bos@43 | 3 #$ name: add |
bos@42 | 4 |
bos@117 | 5 hg init add-example |
bos@117 | 6 cd add-example |
bos@117 | 7 echo a > a |
bos@42 | 8 hg status |
bos@117 | 9 hg add a |
bos@117 | 10 hg status |
bos@117 | 11 hg commit -m 'Added one file' |
bos@117 | 12 hg status |
bos@117 | 13 |
bos@117 | 14 #$ name: add-dir |
bos@117 | 15 |
bos@117 | 16 mkdir b |
bos@117 | 17 echo b > b/b |
bos@117 | 18 echo c > b/c |
bos@117 | 19 mkdir b/d |
bos@117 | 20 echo d > b/d/d |
bos@117 | 21 hg add b |
bos@117 | 22 hg commit -m 'Added all files in subdirectory' |
bos@117 | 23 |
bos@117 | 24 #$ name: |
bos@117 | 25 |
bos@117 | 26 cd .. |
bos@42 | 27 |
bos@42 | 28 #$ name: hidden |
bos@42 | 29 |
bos@117 | 30 hg init hidden-example |
bos@117 | 31 cd hidden-example |
bos@42 | 32 mkdir empty |
bos@42 | 33 touch empty/.hidden |
bos@42 | 34 hg add empty/.hidden |
bos@42 | 35 hg commit -m 'Manage an empty-looking directory' |
bos@42 | 36 ls empty |
bos@42 | 37 cd .. |
bos@117 | 38 hg clone hidden-example tmp |
bos@117 | 39 ls tmp |
bos@117 | 40 ls tmp/empty |
bos@117 | 41 |
bos@117 | 42 #$ name: |
bos@117 | 43 |
bos@117 | 44 cd .. |
bos@117 | 45 |
bos@117 | 46 #$ name: remove |
bos@117 | 47 |
bos@117 | 48 hg init remove-example |
bos@117 | 49 cd remove-example |
bos@117 | 50 echo a > a |
bos@117 | 51 mkdir b |
bos@117 | 52 echo b > b/b |
bos@117 | 53 hg add a b |
bos@117 | 54 hg commit -m 'Small example for file removal' |
bos@117 | 55 hg remove a |
bos@117 | 56 hg status |
bos@117 | 57 hg remove b |
bos@117 | 58 |
bos@117 | 59 #$ name: |
bos@117 | 60 |
bos@117 | 61 cd .. |
bos@117 | 62 |
bos@117 | 63 #$ name: missing |
bos@117 | 64 hg init missing-example |
bos@117 | 65 cd missing-example |
bos@117 | 66 echo a > a |
bos@117 | 67 hg add a |
bos@117 | 68 hg commit -m'File about to be missing' |
bos@117 | 69 rm a |
bos@117 | 70 hg status |
bos@117 | 71 |
bos@117 | 72 #$ name: remove-after |
bos@117 | 73 |
bos@117 | 74 hg remove --after a |
bos@117 | 75 hg status |
bos@117 | 76 |
bos@117 | 77 #$ name: recover-missing |
bos@117 | 78 hg revert a |
bos@117 | 79 cat a |
bos@117 | 80 hg status |
bos@117 | 81 |
bos@117 | 82 #$ name: |
bos@117 | 83 |
bos@117 | 84 cd .. |
bos@117 | 85 |
bos@117 | 86 #$ name: addremove |
bos@117 | 87 |
bos@117 | 88 hg init addremove-example |
bos@117 | 89 cd addremove-example |
bos@117 | 90 echo a > a |
bos@117 | 91 echo b > b |
bos@117 | 92 hg addremove |
bos@117 | 93 |
bos@117 | 94 #$ name: commit-addremove |
bos@117 | 95 |
bos@117 | 96 echo c > c |
bos@117 | 97 hg commit -A -m 'Commit with addremove' |