Mercurial > hgbook
annotate en/examples/tour @ 102:ff9dc8bc2a8b
More. Merge. Stuff.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 18 Oct 2006 15:47:04 -0700 |
parents | 0b97b0bdc830 |
children | ceaca14e49f0 |
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 >' | |
102 | 69 HGRCPATH_ORIG=$HGRCPATH |
70 export HGRCPATH= | |
71 | |
72 #$ name: commit-no-user | |
73 | |
74 hg commit | |
75 | |
76 #$ name: | |
77 | |
78 export HGRCPATH=$HGRCPATH_ORIG | |
91 | 79 |
80 #$ name: commit | |
81 | |
82 hg commit | |
83 | |
84 #$ name: tip | |
85 | |
86 hg tip -vp | |
87 | |
88 #$ name: clone-pull | |
89 | |
90 cd .. | |
91 hg clone hello hello-pull | |
92 | |
93 #$ name: incoming | |
94 | |
95 cd hello-pull | |
96 hg incoming ../my-hello | |
97 | |
98 #$ name: pull | |
99 | |
100 hg tip | |
101 hg pull ../my-hello | |
102 hg tip | |
103 | |
104 #$ name: update | |
105 | |
106 grep printf hello.c | |
107 hg update tip | |
108 grep printf hello.c | |
109 | |
110 #$ name: parents | |
111 | |
112 hg parents | |
113 | |
114 #$ name: older | |
115 | |
116 hg update 2 | |
117 hg parents | |
94 | 118 hg update |
92 | 119 |
120 #$ name: clone-push | |
121 | |
122 cd .. | |
123 hg clone hello hello-push | |
124 | |
125 #$ name: outgoing | |
126 | |
127 cd my-hello | |
128 hg outgoing ../hello-push | |
129 | |
130 #$ name: push | |
131 | |
132 hg push ../hello-push | |
133 | |
134 #$ name: push.nothing | |
135 | |
136 hg push ../hello-push | |
93 | 137 |
138 #$ name: outgoing.net | |
139 | |
140 hg outgoing http://hg.serpentine.com/tutorial/hello | |
141 | |
142 #$ name: push.net | |
143 | |
144 hg push http://hg.serpentine.com/tutorial/hello | |
145 | |
94 | 146 #$ name: merge.clone |
147 | |
148 cd .. | |
149 hg clone hello my-new-hello | |
150 cd my-new-hello | |
151 sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c | |
152 hg commit -m 'A new hello for a new day.' | |
153 | |
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 | |
163 #$ name: merge.heads | |
164 | |
165 hg heads | |
166 | |
167 #$ name: merge.update | |
168 | |
169 hg update | |
170 | |
171 #$ name: merge.merge | |
172 | |
173 hg merge | |
174 | |
175 #$ name: merge.parents | |
176 | |
177 hg parents | |
178 cat hello.c | |
179 | |
180 #$ name: merge.commit | |
181 | |
182 hg commit -m 'Merged changes' | |
183 | |
184 #$ name: merge.tip | |
185 | |
186 hg tip |