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