Mercurial > hgbook
annotate en/examples/tour @ 174:ef6a1427d0af
Update tour info more usefully.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 27 Mar 2007 15:46:32 -0700 |
parents | ceaca14e49f0 |
children | fb5c0d56d7f1 |
rev | line source |
---|---|
87 | 1 #!/bin/bash |
2 | |
3 #$ name: version | |
4 | |
5 hg version | |
6 | |
7 #$ name: help | |
8 | |
9 hg help init | |
10 | |
11 #$ name: clone | |
12 | |
13 hg clone http://hg.serpentine.com/tutorial/hello | |
14 | |
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 | 18 |
19 ls -l | |
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 |
d351032c189c
Progress with log coverage.
Bryan O'Sullivan <bos@serpentine.com>
parents:
87
diff
changeset
|
34 hg log -r ff5d7b70a2a9 |
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 | 40 |
41 #$ name: log-v | |
42 | |
43 hg log -v -r 3 | |
44 | |
45 #$ name: log-vp | |
46 | |
47 hg log -v -p -r 2 | |
48 | |
49 #$ name: reclone | |
50 | |
51 cd .. | |
52 hg clone hello my-hello | |
53 cd my-hello | |
54 | |
55 #$ name: sed | |
56 | |
57 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c | |
58 | |
59 #$ name: status | |
60 | |
61 ls | |
62 hg status | |
63 | |
64 #$ name: diff | |
65 | |
66 hg diff | |
67 | |
68 #$ name: | |
69 | |
70 export HGEDITOR='echo Added an extra line of output >' | |
71 | |
72 #$ name: commit | |
73 | |
74 hg commit | |
75 | |
76 #$ name: tip | |
77 | |
78 hg tip -vp | |
79 | |
80 #$ name: clone-pull | |
81 | |
82 cd .. | |
83 hg clone hello hello-pull | |
84 | |
85 #$ name: incoming | |
86 | |
87 cd hello-pull | |
88 hg incoming ../my-hello | |
89 | |
90 #$ name: pull | |
91 | |
92 hg tip | |
93 hg pull ../my-hello | |
94 hg tip | |
95 | |
96 #$ name: update | |
97 | |
98 grep printf hello.c | |
99 hg update tip | |
100 grep printf hello.c | |
101 | |
102 #$ name: parents | |
103 | |
104 hg parents | |
105 | |
106 #$ name: older | |
107 | |
108 hg update 2 | |
109 hg parents | |
94 | 110 hg update |
92 | 111 |
112 #$ name: clone-push | |
113 | |
114 cd .. | |
115 hg clone hello hello-push | |
116 | |
117 #$ name: outgoing | |
118 | |
119 cd my-hello | |
120 hg outgoing ../hello-push | |
121 | |
122 #$ name: push | |
123 | |
124 hg push ../hello-push | |
125 | |
126 #$ name: push.nothing | |
127 | |
128 hg push ../hello-push | |
93 | 129 |
130 #$ name: outgoing.net | |
131 | |
132 hg outgoing http://hg.serpentine.com/tutorial/hello | |
133 | |
134 #$ name: push.net | |
135 | |
136 hg push http://hg.serpentine.com/tutorial/hello | |
137 | |
94 | 138 #$ name: merge.clone |
139 | |
140 cd .. | |
141 hg clone hello my-new-hello | |
142 cd my-new-hello | |
143 sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c | |
144 hg commit -m 'A new hello for a new day.' | |
145 | |
146 #$ name: merge.cat | |
147 | |
148 cat hello.c | |
149 cat ../my-hello/hello.c | |
150 | |
151 #$ name: merge.pull | |
152 | |
153 hg pull ../my-hello | |
154 | |
155 #$ name: merge.heads | |
156 | |
157 hg heads | |
158 | |
159 #$ name: merge.update | |
160 | |
161 hg update | |
162 | |
163 #$ name: merge.merge | |
164 | |
165 hg merge | |
166 | |
167 #$ name: merge.parents | |
168 | |
169 hg parents | |
170 cat hello.c | |
171 | |
172 #$ name: merge.commit | |
173 | |
174 hg commit -m 'Merged changes' | |
175 | |
176 #$ name: merge.tip | |
177 | |
178 hg tip |