hgbook

annotate en/examples/tour @ 307:fb5c0d56d7f1

Fix test 'tour'.

Executing 'tour' test now creates some files in /tmp to store the
revision numbers as they are created on the fly and appear in the output
files. When SVG files are to be converted to PNG or EPS files within the
Makefile, a tool 'fixsvg' will be invoked to substitute some placeholder
markup by the real version number which fits to the test output, before
the final conversion takes place.
author Guido Ostkamp <hg@ostkamp.fastmail.fm>
date Wed Aug 20 22:15:35 2008 +0200 (2008-08-20)
parents ef6a1427d0af
children c44d5854620b
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@174 17 #$ ignore: ^total \d+
bos@87 18
bos@87 19 ls -l
bos@87 20 ls hello
bos@88 21
bos@88 22 #$ name: ls-a
bos@88 23
bos@88 24 cd hello
bos@88 25 ls -a
bos@88 26
bos@88 27 #$ name: log
bos@88 28
bos@88 29 hg log
bos@88 30
bos@88 31 #$ name: log-r
bos@88 32
bos@88 33 hg log -r 3
hg@307 34 hg log -r 0272e0d5a517
bos@88 35 hg log -r 1 -r 4
bos@88 36
bos@88 37 #$ name: log.range
bos@88 38
bos@88 39 hg log -r 2:4
bos@91 40
bos@91 41 #$ name: log-v
bos@91 42
bos@91 43 hg log -v -r 3
bos@91 44
bos@91 45 #$ name: log-vp
bos@91 46
bos@91 47 hg log -v -p -r 2
bos@91 48
bos@91 49 #$ name: reclone
bos@91 50
bos@91 51 cd ..
bos@91 52 hg clone hello my-hello
bos@91 53 cd my-hello
bos@91 54
bos@91 55 #$ name: sed
bos@91 56
bos@91 57 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
bos@91 58
bos@91 59 #$ name: status
bos@91 60
bos@91 61 ls
bos@91 62 hg status
bos@91 63
bos@91 64 #$ name: diff
bos@91 65
bos@91 66 hg diff
bos@91 67
bos@91 68 #$ name:
bos@91 69
bos@91 70 export HGEDITOR='echo Added an extra line of output >'
bos@91 71
bos@91 72 #$ name: commit
bos@91 73
bos@91 74 hg commit
bos@91 75
hg@307 76 #$ name: merge.dummy1
hg@307 77
hg@307 78 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-hello
hg@307 79
bos@91 80 #$ name: tip
bos@91 81
bos@91 82 hg tip -vp
bos@91 83
bos@91 84 #$ name: clone-pull
bos@91 85
bos@91 86 cd ..
bos@91 87 hg clone hello hello-pull
bos@91 88
bos@91 89 #$ name: incoming
bos@91 90
bos@91 91 cd hello-pull
bos@91 92 hg incoming ../my-hello
bos@91 93
bos@91 94 #$ name: pull
bos@91 95
bos@91 96 hg tip
bos@91 97 hg pull ../my-hello
bos@91 98 hg tip
bos@91 99
bos@91 100 #$ name: update
bos@91 101
bos@91 102 grep printf hello.c
bos@91 103 hg update tip
bos@91 104 grep printf hello.c
bos@91 105
bos@91 106 #$ name: parents
bos@91 107
bos@91 108 hg parents
bos@91 109
bos@91 110 #$ name: older
bos@91 111
bos@91 112 hg update 2
bos@91 113 hg parents
bos@94 114 hg update
bos@92 115
bos@92 116 #$ name: clone-push
bos@92 117
bos@92 118 cd ..
bos@92 119 hg clone hello hello-push
bos@92 120
bos@92 121 #$ name: outgoing
bos@92 122
bos@92 123 cd my-hello
bos@92 124 hg outgoing ../hello-push
bos@92 125
bos@92 126 #$ name: push
bos@92 127
bos@92 128 hg push ../hello-push
bos@92 129
bos@92 130 #$ name: push.nothing
bos@92 131
bos@92 132 hg push ../hello-push
bos@93 133
bos@93 134 #$ name: outgoing.net
bos@93 135
bos@93 136 hg outgoing http://hg.serpentine.com/tutorial/hello
bos@93 137
bos@93 138 #$ name: push.net
bos@93 139
bos@93 140 hg push http://hg.serpentine.com/tutorial/hello
bos@93 141
bos@94 142 #$ name: merge.clone
bos@94 143
bos@94 144 cd ..
bos@94 145 hg clone hello my-new-hello
bos@94 146 cd my-new-hello
bos@94 147 sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c
bos@94 148 hg commit -m 'A new hello for a new day.'
bos@94 149
hg@307 150 #$ name: merge.dummy2
hg@307 151
hg@307 152 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello
hg@307 153
bos@94 154 #$ name: merge.cat
bos@94 155
bos@94 156 cat hello.c
bos@94 157 cat ../my-hello/hello.c
bos@94 158
bos@94 159 #$ name: merge.pull
bos@94 160
bos@94 161 hg pull ../my-hello
bos@94 162
hg@307 163 #$ name: merge.dummy3
hg@307 164
hg@307 165 hg log -r 6 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV6.my-new-hello
hg@307 166
bos@94 167 #$ name: merge.heads
bos@94 168
bos@94 169 hg heads
bos@94 170
bos@94 171 #$ name: merge.update
bos@94 172
bos@94 173 hg update
bos@94 174
bos@94 175 #$ name: merge.merge
bos@94 176
bos@94 177 hg merge
bos@94 178
bos@94 179 #$ name: merge.parents
bos@94 180
bos@94 181 hg parents
bos@94 182 cat hello.c
bos@94 183
bos@94 184 #$ name: merge.commit
bos@94 185
bos@94 186 hg commit -m 'Merged changes'
bos@94 187
hg@307 188 #$ name: merge.dummy4
hg@307 189
hg@307 190 hg log -r 7 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV7.my-new-hello
hg@307 191
bos@94 192 #$ name: merge.tip
bos@94 193
bos@94 194 hg tip