Mercurial > hgbook
annotate en/examples/tour @ 93:97638d862ef3
Network bits.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 12 Oct 2006 16:27:00 -0700 |
parents | 72d207927dc4 |
children | 0b97b0bdc830 |
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 | |
92 | 108 |
109 #$ name: clone-push | |
110 | |
111 cd .. | |
112 hg clone hello hello-push | |
113 | |
114 #$ name: outgoing | |
115 | |
116 cd my-hello | |
117 hg outgoing ../hello-push | |
118 | |
119 #$ name: push | |
120 | |
121 hg push ../hello-push | |
122 | |
123 #$ name: push.nothing | |
124 | |
125 hg push ../hello-push | |
93 | 126 |
127 #$ name: outgoing.net | |
128 | |
129 hg outgoing http://hg.serpentine.com/tutorial/hello | |
130 | |
131 #$ name: push.net | |
132 | |
133 hg push http://hg.serpentine.com/tutorial/hello | |
134 | |
135 #$ name: | |
136 exit 0 |