annotate en/examples/tour @ 826:a17d6390a480

More fixes to chapters 1 and 2.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 03 May 2009 20:27:09 -0700
parents c8d662d3cb40
children 477d6a3e5023
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
87
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 #!/bin/bash
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
3 #$ name: version
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
5 hg version
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
6
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
7 #$ name: help
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
8
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9 hg help init
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
10
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
11 #$ name: clone
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13 hg clone http://hg.serpentine.com/tutorial/hello
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
14
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
15 #$ name: ls
139
ceaca14e49f0 Add local regexps to ignore bits of output.
Bryan O'Sullivan <bos@serpentine.com>
parents: 102
diff changeset
16 #$ ignore: ^drwx.*
174
ef6a1427d0af Update tour info more usefully.
Bryan O'Sullivan <bos@serpentine.com>
parents: 139
diff changeset
17 #$ ignore: ^total \d+
87
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
18
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
19 ls -l
0995016342f8 More bumf.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
20 ls hello
88
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
21
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
22 #$ name: ls-a
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
23
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
24 cd hello
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
25 ls -a
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
26
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
27 #$ name: log
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
28
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
29 hg log
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
30
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
31 #$ name: log-r
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
32
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
33 hg log -r 3
406
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
34 hg log -r 0272e0d5a517
88
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
35 hg log -r 1 -r 4
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
36
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
37 #$ name: log.range
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
38
d351032c189c Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 87
diff changeset
39 hg log -r 2:4
91
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
40
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
41 #$ name: log-v
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
42
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
43 hg log -v -r 3
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
44
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
45 #$ name: log-vp
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
46
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
47 hg log -v -p -r 2
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
48
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
49 #$ name: reclone
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
50
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
51 cd ..
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
52 hg clone hello my-hello
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
53 cd my-hello
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
54
714
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
55 #$ name: cat1
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
56 cat hello.c
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
57
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
58 #$ name:
91
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
59
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
60 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
61
714
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
62 #$ name: cat2
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
63 # ... edit edit edit ...
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
64 cat hello.c
c44d5854620b Fix up chapter 1.
Bryan O'Sullivan <bos@serpentine.com>
parents: 406
diff changeset
65
91
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
66 #$ name: status
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
67
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
68 ls
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
69 hg status
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
70
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
71 #$ name: diff
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
72
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
73 hg diff
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
74
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
75 #$ name:
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
76
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
77 export HGEDITOR='echo Added an extra line of output >'
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
78
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
79 #$ name: commit
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
80
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
81 hg commit
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
82
406
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
83 #$ name: merge.dummy1
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
84
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
85 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-hello
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
86
91
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
87 #$ name: tip
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
88
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
89 hg tip -vp
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
90
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
91 #$ name: clone-pull
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
92
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
93 cd ..
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
94 hg clone hello hello-pull
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
95
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
96 #$ name: incoming
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
97
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
98 cd hello-pull
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
99 hg incoming ../my-hello
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
100
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
101 #$ name: pull
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
102
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
103 hg tip
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
104 hg pull ../my-hello
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
105 hg tip
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
106
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
107 #$ name: update
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
108
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
109 grep printf hello.c
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
110 hg update tip
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
111 grep printf hello.c
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
112
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
113 #$ name: parents
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
114
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
115 hg parents
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
116
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
117 #$ name: older
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
118
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
119 hg update 2
7524d52d9577 More tour progress.
Bryan O'Sullivan <bos@serpentine.com>
parents: 88
diff changeset
120 hg parents
94
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
121 hg update
824
c8d662d3cb40 Improve chapter 1 further, based on comments.
Bryan O'Sullivan <bos@serpentine.com>
parents: 718
diff changeset
122 hg parents
92
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
123
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
124 #$ name: clone-push
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
125
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
126 cd ..
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
127 hg clone hello hello-push
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
128
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
129 #$ name: outgoing
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
130
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
131 cd my-hello
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
132 hg outgoing ../hello-push
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
133
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
134 #$ name: push
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
135
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
136 hg push ../hello-push
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
137
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
138 #$ name: push.nothing
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
139
72d207927dc4 Tour: push.
Bryan O'Sullivan <bos@serpentine.com>
parents: 91
diff changeset
140 hg push ../hello-push
93
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
141
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
142 #$ name: outgoing.net
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
143
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
144 hg outgoing http://hg.serpentine.com/tutorial/hello
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
145
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
146 #$ name: push.net
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
147
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
148 hg push http://hg.serpentine.com/tutorial/hello
97638d862ef3 Network bits.
Bryan O'Sullivan <bos@serpentine.com>
parents: 92
diff changeset
149
718
4e23c220d1b0 Update chapter 2
Bryan O'Sullivan <bos@serpentine.com>
parents: 714
diff changeset
150 #$ name:
4e23c220d1b0 Update chapter 2
Bryan O'Sullivan <bos@serpentine.com>
parents: 714
diff changeset
151 cp hello.c ../new-hello.c
826
a17d6390a480 More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents: 824
diff changeset
152 sed -i '/printf("hello,/i\\tprintf("once more, hello.\\n");' ../new-hello.c
718
4e23c220d1b0 Update chapter 2
Bryan O'Sullivan <bos@serpentine.com>
parents: 714
diff changeset
153
94
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
154 #$ name: merge.clone
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
155
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
156 cd ..
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
157 hg clone hello my-new-hello
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
158 cd my-new-hello
718
4e23c220d1b0 Update chapter 2
Bryan O'Sullivan <bos@serpentine.com>
parents: 714
diff changeset
159 # The file new-hello.c is lightly edited.
4e23c220d1b0 Update chapter 2
Bryan O'Sullivan <bos@serpentine.com>
parents: 714
diff changeset
160 cp ../new-hello.c hello.c
94
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
161 hg commit -m 'A new hello for a new day.'
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
162
406
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
163 #$ name: merge.dummy2
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
164
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
165 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
166
826
a17d6390a480 More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents: 824
diff changeset
167 #$ name: merge.cat1
94
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
168
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
169 cat hello.c
826
a17d6390a480 More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents: 824
diff changeset
170
a17d6390a480 More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents: 824
diff changeset
171 #$ name: merge.cat2
a17d6390a480 More fixes to chapters 1 and 2.
Bryan O'Sullivan <bos@serpentine.com>
parents: 824
diff changeset
172
94
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
173 cat ../my-hello/hello.c
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
174
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
175 #$ name: merge.pull
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
176
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
177 hg pull ../my-hello
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
178
406
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
179 #$ name: merge.dummy3
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
180
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
181 hg log -r 6 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV6.my-new-hello
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
182
94
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
183 #$ name: merge.heads
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
184
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
185 hg heads
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
186
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
187 #$ name: merge.update
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
188
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
189 hg update
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
190
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
191 #$ name: merge.merge
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
192
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
193 hg merge
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
194
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
195 #$ name: merge.parents
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
196
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
197 hg parents
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
198 cat hello.c
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
199
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
200 #$ name: merge.commit
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
201
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
202 hg commit -m 'Merged changes'
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
203
406
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
204 #$ name: merge.dummy4
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
205
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
206 hg log -r 7 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV7.my-new-hello
fb5c0d56d7f1 Fix test 'tour'.
Guido Ostkamp <hg@ostkamp.fastmail.fm>
parents: 174
diff changeset
207
94
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
208 #$ name: merge.tip
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
209
0b97b0bdc830 Basic merge coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents: 93
diff changeset
210 hg tip