hgbook
annotate en/examples/tour @ 155:914babdc99c8
run-example: better error if bogus section name found.
Fix all such bogus names in sources.
Fix all such bogus names in sources.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Mar 12 23:10:32 2007 -0700 (2007-03-12) |
parents | ff9dc8bc2a8b |
children | ef6a1427d0af |
rev | line source |
---|---|
bos@87 | 1 #!/bin/bash |
bos@87 | 2 |
bos@87 | 3 #$ name: version |
bos@87 | 4 |
bos@87 | 5 hg version |
bos@87 | 6 |
bos@87 | 7 #$ name: help |
bos@87 | 8 |
bos@87 | 9 hg help init |
bos@87 | 10 |
bos@87 | 11 #$ name: clone |
bos@87 | 12 |
bos@87 | 13 hg clone http://hg.serpentine.com/tutorial/hello |
bos@87 | 14 |
bos@87 | 15 #$ name: ls |
bos@139 | 16 #$ ignore: ^drwx.* |
bos@87 | 17 |
bos@87 | 18 ls -l |
bos@87 | 19 ls hello |
bos@88 | 20 |
bos@88 | 21 #$ name: ls-a |
bos@88 | 22 |
bos@88 | 23 cd hello |
bos@88 | 24 ls -a |
bos@88 | 25 |
bos@88 | 26 #$ name: log |
bos@88 | 27 |
bos@88 | 28 hg log |
bos@88 | 29 |
bos@88 | 30 #$ name: log-r |
bos@88 | 31 |
bos@88 | 32 hg log -r 3 |
bos@88 | 33 hg log -r ff5d7b70a2a9 |
bos@88 | 34 hg log -r 1 -r 4 |
bos@88 | 35 |
bos@88 | 36 #$ name: log.range |
bos@88 | 37 |
bos@88 | 38 hg log -r 2:4 |
bos@91 | 39 |
bos@91 | 40 #$ name: log-v |
bos@91 | 41 |
bos@91 | 42 hg log -v -r 3 |
bos@91 | 43 |
bos@91 | 44 #$ name: log-vp |
bos@91 | 45 |
bos@91 | 46 hg log -v -p -r 2 |
bos@91 | 47 |
bos@91 | 48 #$ name: reclone |
bos@91 | 49 |
bos@91 | 50 cd .. |
bos@91 | 51 hg clone hello my-hello |
bos@91 | 52 cd my-hello |
bos@91 | 53 |
bos@91 | 54 #$ name: sed |
bos@91 | 55 |
bos@91 | 56 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c |
bos@91 | 57 |
bos@91 | 58 #$ name: status |
bos@91 | 59 |
bos@91 | 60 ls |
bos@91 | 61 hg status |
bos@91 | 62 |
bos@91 | 63 #$ name: diff |
bos@91 | 64 |
bos@91 | 65 hg diff |
bos@91 | 66 |
bos@91 | 67 #$ name: |
bos@91 | 68 |
bos@91 | 69 export HGEDITOR='echo Added an extra line of output >' |
bos@102 | 70 HGRCPATH_ORIG=$HGRCPATH |
bos@102 | 71 export HGRCPATH= |
bos@102 | 72 |
bos@102 | 73 #$ name: commit-no-user |
bos@102 | 74 |
bos@102 | 75 hg commit |
bos@102 | 76 |
bos@102 | 77 #$ name: |
bos@102 | 78 |
bos@102 | 79 export HGRCPATH=$HGRCPATH_ORIG |
bos@91 | 80 |
bos@91 | 81 #$ name: commit |
bos@91 | 82 |
bos@91 | 83 hg commit |
bos@91 | 84 |
bos@91 | 85 #$ name: tip |
bos@91 | 86 |
bos@91 | 87 hg tip -vp |
bos@91 | 88 |
bos@91 | 89 #$ name: clone-pull |
bos@91 | 90 |
bos@91 | 91 cd .. |
bos@91 | 92 hg clone hello hello-pull |
bos@91 | 93 |
bos@91 | 94 #$ name: incoming |
bos@91 | 95 |
bos@91 | 96 cd hello-pull |
bos@91 | 97 hg incoming ../my-hello |
bos@91 | 98 |
bos@91 | 99 #$ name: pull |
bos@91 | 100 |
bos@91 | 101 hg tip |
bos@91 | 102 hg pull ../my-hello |
bos@91 | 103 hg tip |
bos@91 | 104 |
bos@91 | 105 #$ name: update |
bos@91 | 106 |
bos@91 | 107 grep printf hello.c |
bos@91 | 108 hg update tip |
bos@91 | 109 grep printf hello.c |
bos@91 | 110 |
bos@91 | 111 #$ name: parents |
bos@91 | 112 |
bos@91 | 113 hg parents |
bos@91 | 114 |
bos@91 | 115 #$ name: older |
bos@91 | 116 |
bos@91 | 117 hg update 2 |
bos@91 | 118 hg parents |
bos@94 | 119 hg update |
bos@92 | 120 |
bos@92 | 121 #$ name: clone-push |
bos@92 | 122 |
bos@92 | 123 cd .. |
bos@92 | 124 hg clone hello hello-push |
bos@92 | 125 |
bos@92 | 126 #$ name: outgoing |
bos@92 | 127 |
bos@92 | 128 cd my-hello |
bos@92 | 129 hg outgoing ../hello-push |
bos@92 | 130 |
bos@92 | 131 #$ name: push |
bos@92 | 132 |
bos@92 | 133 hg push ../hello-push |
bos@92 | 134 |
bos@92 | 135 #$ name: push.nothing |
bos@92 | 136 |
bos@92 | 137 hg push ../hello-push |
bos@93 | 138 |
bos@93 | 139 #$ name: outgoing.net |
bos@93 | 140 |
bos@93 | 141 hg outgoing http://hg.serpentine.com/tutorial/hello |
bos@93 | 142 |
bos@93 | 143 #$ name: push.net |
bos@93 | 144 |
bos@93 | 145 hg push http://hg.serpentine.com/tutorial/hello |
bos@93 | 146 |
bos@94 | 147 #$ name: merge.clone |
bos@94 | 148 |
bos@94 | 149 cd .. |
bos@94 | 150 hg clone hello my-new-hello |
bos@94 | 151 cd my-new-hello |
bos@94 | 152 sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c |
bos@94 | 153 hg commit -m 'A new hello for a new day.' |
bos@94 | 154 |
bos@94 | 155 #$ name: merge.cat |
bos@94 | 156 |
bos@94 | 157 cat hello.c |
bos@94 | 158 cat ../my-hello/hello.c |
bos@94 | 159 |
bos@94 | 160 #$ name: merge.pull |
bos@94 | 161 |
bos@94 | 162 hg pull ../my-hello |
bos@94 | 163 |
bos@94 | 164 #$ name: merge.heads |
bos@94 | 165 |
bos@94 | 166 hg heads |
bos@94 | 167 |
bos@94 | 168 #$ name: merge.update |
bos@94 | 169 |
bos@94 | 170 hg update |
bos@94 | 171 |
bos@94 | 172 #$ name: merge.merge |
bos@94 | 173 |
bos@94 | 174 hg merge |
bos@94 | 175 |
bos@94 | 176 #$ name: merge.parents |
bos@94 | 177 |
bos@94 | 178 hg parents |
bos@94 | 179 cat hello.c |
bos@94 | 180 |
bos@94 | 181 #$ name: merge.commit |
bos@94 | 182 |
bos@94 | 183 hg commit -m 'Merged changes' |
bos@94 | 184 |
bos@94 | 185 #$ name: merge.tip |
bos@94 | 186 |
bos@94 | 187 hg tip |