Mercurial > hgbook
annotate ja/examples/tour @ 776:019040fbf5f5
merged to upstream: phase 1
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 21 Apr 2009 00:36:40 +0900 |
parents | en/examples/tour@4e23c220d1b0 en/examples/tour@b0db5adf11c1 |
children | 896ab6eaf1c6 |
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 |
406 | 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 | 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 | |
714 | 55 #$ name: cat1 |
56 cat hello.c | |
57 | |
58 #$ name: | |
91 | 59 |
60 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c | |
61 | |
714 | 62 #$ name: cat2 |
63 # ... edit edit edit ... | |
64 cat hello.c | |
65 | |
91 | 66 #$ name: status |
67 | |
68 ls | |
69 hg status | |
70 | |
71 #$ name: diff | |
72 | |
73 hg diff | |
74 | |
75 #$ name: | |
76 | |
77 export HGEDITOR='echo Added an extra line of output >' | |
78 | |
79 #$ name: commit | |
80 | |
81 hg commit | |
82 | |
406 | 83 #$ name: merge.dummy1 |
84 | |
85 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-hello | |
86 | |
91 | 87 #$ name: tip |
88 | |
89 hg tip -vp | |
90 | |
91 #$ name: clone-pull | |
92 | |
93 cd .. | |
94 hg clone hello hello-pull | |
95 | |
96 #$ name: incoming | |
97 | |
98 cd hello-pull | |
99 hg incoming ../my-hello | |
100 | |
101 #$ name: pull | |
102 | |
103 hg tip | |
104 hg pull ../my-hello | |
105 hg tip | |
106 | |
107 #$ name: update | |
108 | |
109 grep printf hello.c | |
110 hg update tip | |
111 grep printf hello.c | |
112 | |
113 #$ name: parents | |
114 | |
115 hg parents | |
116 | |
117 #$ name: older | |
118 | |
119 hg update 2 | |
120 hg parents | |
94 | 121 hg update |
92 | 122 |
123 #$ name: clone-push | |
124 | |
125 cd .. | |
126 hg clone hello hello-push | |
127 | |
128 #$ name: outgoing | |
129 | |
130 cd my-hello | |
131 hg outgoing ../hello-push | |
132 | |
133 #$ name: push | |
134 | |
135 hg push ../hello-push | |
136 | |
137 #$ name: push.nothing | |
138 | |
139 hg push ../hello-push | |
93 | 140 |
141 #$ name: outgoing.net | |
142 | |
143 hg outgoing http://hg.serpentine.com/tutorial/hello | |
144 | |
145 #$ name: push.net | |
146 | |
147 hg push http://hg.serpentine.com/tutorial/hello | |
148 | |
718 | 149 #$ name: |
150 cp hello.c ../new-hello.c | |
151 sed -i '/printf/i\\tprintf("once more, hello.\\n");' ../new-hello.c | |
152 | |
94 | 153 #$ name: merge.clone |
154 | |
155 cd .. | |
156 hg clone hello my-new-hello | |
157 cd my-new-hello | |
718 | 158 # The file new-hello.c is lightly edited. |
159 cp ../new-hello.c hello.c | |
94 | 160 hg commit -m 'A new hello for a new day.' |
161 | |
406 | 162 #$ name: merge.dummy2 |
163 | |
164 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello | |
165 | |
94 | 166 #$ name: merge.cat |
167 | |
168 cat hello.c | |
169 cat ../my-hello/hello.c | |
170 | |
171 #$ name: merge.pull | |
172 | |
173 hg pull ../my-hello | |
174 | |
406 | 175 #$ name: merge.dummy3 |
176 | |
177 hg log -r 6 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV6.my-new-hello | |
178 | |
94 | 179 #$ name: merge.heads |
180 | |
181 hg heads | |
182 | |
183 #$ name: merge.update | |
184 | |
185 hg update | |
186 | |
187 #$ name: merge.merge | |
188 | |
189 hg merge | |
190 | |
191 #$ name: merge.parents | |
192 | |
193 hg parents | |
194 cat hello.c | |
195 | |
196 #$ name: merge.commit | |
197 | |
198 hg commit -m 'Merged changes' | |
199 | |
406 | 200 #$ name: merge.dummy4 |
201 | |
202 hg log -r 7 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV7.my-new-hello | |
203 | |
94 | 204 #$ name: merge.tip |
205 | |
206 hg tip |