Mercurial > hgbook
annotate en/examples/tour @ 530:f809de31887a
more translation :D
added a term to the glossary
author | jerojasro@localhost |
---|---|
date | Sun, 30 Nov 2008 18:41:51 -0500 |
parents | fb5c0d56d7f1 |
children | c44d5854620b |
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 | |
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 | |
406 | 76 #$ name: merge.dummy1 |
77 | |
78 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-hello | |
79 | |
91 | 80 #$ name: tip |
81 | |
82 hg tip -vp | |
83 | |
84 #$ name: clone-pull | |
85 | |
86 cd .. | |
87 hg clone hello hello-pull | |
88 | |
89 #$ name: incoming | |
90 | |
91 cd hello-pull | |
92 hg incoming ../my-hello | |
93 | |
94 #$ name: pull | |
95 | |
96 hg tip | |
97 hg pull ../my-hello | |
98 hg tip | |
99 | |
100 #$ name: update | |
101 | |
102 grep printf hello.c | |
103 hg update tip | |
104 grep printf hello.c | |
105 | |
106 #$ name: parents | |
107 | |
108 hg parents | |
109 | |
110 #$ name: older | |
111 | |
112 hg update 2 | |
113 hg parents | |
94 | 114 hg update |
92 | 115 |
116 #$ name: clone-push | |
117 | |
118 cd .. | |
119 hg clone hello hello-push | |
120 | |
121 #$ name: outgoing | |
122 | |
123 cd my-hello | |
124 hg outgoing ../hello-push | |
125 | |
126 #$ name: push | |
127 | |
128 hg push ../hello-push | |
129 | |
130 #$ name: push.nothing | |
131 | |
132 hg push ../hello-push | |
93 | 133 |
134 #$ name: outgoing.net | |
135 | |
136 hg outgoing http://hg.serpentine.com/tutorial/hello | |
137 | |
138 #$ name: push.net | |
139 | |
140 hg push http://hg.serpentine.com/tutorial/hello | |
141 | |
94 | 142 #$ name: merge.clone |
143 | |
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.' | |
149 | |
406 | 150 #$ name: merge.dummy2 |
151 | |
152 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello | |
153 | |
94 | 154 #$ name: merge.cat |
155 | |
156 cat hello.c | |
157 cat ../my-hello/hello.c | |
158 | |
159 #$ name: merge.pull | |
160 | |
161 hg pull ../my-hello | |
162 | |
406 | 163 #$ name: merge.dummy3 |
164 | |
165 hg log -r 6 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV6.my-new-hello | |
166 | |
94 | 167 #$ name: merge.heads |
168 | |
169 hg heads | |
170 | |
171 #$ name: merge.update | |
172 | |
173 hg update | |
174 | |
175 #$ name: merge.merge | |
176 | |
177 hg merge | |
178 | |
179 #$ name: merge.parents | |
180 | |
181 hg parents | |
182 cat hello.c | |
183 | |
184 #$ name: merge.commit | |
185 | |
186 hg commit -m 'Merged changes' | |
187 | |
406 | 188 #$ name: merge.dummy4 |
189 | |
190 hg log -r 7 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV7.my-new-hello | |
191 | |
94 | 192 #$ name: merge.tip |
193 | |
194 hg tip |