hgbook
view 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.
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 |
line source
1 #!/bin/bash
3 #$ name: version
5 hg version
7 #$ name: help
9 hg help init
11 #$ name: clone
13 hg clone http://hg.serpentine.com/tutorial/hello
15 #$ name: ls
16 #$ ignore: ^drwx.*
17 #$ ignore: ^total \d+
19 ls -l
20 ls hello
22 #$ name: ls-a
24 cd hello
25 ls -a
27 #$ name: log
29 hg log
31 #$ name: log-r
33 hg log -r 3
34 hg log -r 0272e0d5a517
35 hg log -r 1 -r 4
37 #$ name: log.range
39 hg log -r 2:4
41 #$ name: log-v
43 hg log -v -r 3
45 #$ name: log-vp
47 hg log -v -p -r 2
49 #$ name: reclone
51 cd ..
52 hg clone hello my-hello
53 cd my-hello
55 #$ name: sed
57 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
59 #$ name: status
61 ls
62 hg status
64 #$ name: diff
66 hg diff
68 #$ name:
70 export HGEDITOR='echo Added an extra line of output >'
72 #$ name: commit
74 hg commit
76 #$ name: merge.dummy1
78 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-hello
80 #$ name: tip
82 hg tip -vp
84 #$ name: clone-pull
86 cd ..
87 hg clone hello hello-pull
89 #$ name: incoming
91 cd hello-pull
92 hg incoming ../my-hello
94 #$ name: pull
96 hg tip
97 hg pull ../my-hello
98 hg tip
100 #$ name: update
102 grep printf hello.c
103 hg update tip
104 grep printf hello.c
106 #$ name: parents
108 hg parents
110 #$ name: older
112 hg update 2
113 hg parents
114 hg update
116 #$ name: clone-push
118 cd ..
119 hg clone hello hello-push
121 #$ name: outgoing
123 cd my-hello
124 hg outgoing ../hello-push
126 #$ name: push
128 hg push ../hello-push
130 #$ name: push.nothing
132 hg push ../hello-push
134 #$ name: outgoing.net
136 hg outgoing http://hg.serpentine.com/tutorial/hello
138 #$ name: push.net
140 hg push http://hg.serpentine.com/tutorial/hello
142 #$ name: merge.clone
144 cd ..
145 hg clone hello my-new-hello
146 cd my-new-hello
147 sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c
148 hg commit -m 'A new hello for a new day.'
150 #$ name: merge.dummy2
152 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello
154 #$ name: merge.cat
156 cat hello.c
157 cat ../my-hello/hello.c
159 #$ name: merge.pull
161 hg pull ../my-hello
163 #$ name: merge.dummy3
165 hg log -r 6 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV6.my-new-hello
167 #$ name: merge.heads
169 hg heads
171 #$ name: merge.update
173 hg update
175 #$ name: merge.merge
177 hg merge
179 #$ name: merge.parents
181 hg parents
182 cat hello.c
184 #$ name: merge.commit
186 hg commit -m 'Merged changes'
188 #$ name: merge.dummy4
190 hg log -r 7 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV7.my-new-hello
192 #$ name: merge.tip
194 hg tip