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