hgbook
annotate en/examples/tour @ 689:f3f901cfbfc7
Describe the qfinish command in preference to qdelete -r.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri Apr 24 17:00:00 2009 -0700 (2009-04-24) |
parents | c44d5854620b |
children | c8d662d3cb40 |
rev | line source |
---|---|
bos@87 | 1 #!/bin/bash |
bos@87 | 2 |
bos@87 | 3 #$ name: version |
bos@87 | 4 |
bos@87 | 5 hg version |
bos@87 | 6 |
bos@87 | 7 #$ name: help |
bos@87 | 8 |
bos@87 | 9 hg help init |
bos@87 | 10 |
bos@87 | 11 #$ name: clone |
bos@87 | 12 |
bos@87 | 13 hg clone http://hg.serpentine.com/tutorial/hello |
bos@87 | 14 |
bos@87 | 15 #$ name: ls |
bos@139 | 16 #$ ignore: ^drwx.* |
bos@174 | 17 #$ ignore: ^total \d+ |
bos@87 | 18 |
bos@87 | 19 ls -l |
bos@87 | 20 ls hello |
bos@88 | 21 |
bos@88 | 22 #$ name: ls-a |
bos@88 | 23 |
bos@88 | 24 cd hello |
bos@88 | 25 ls -a |
bos@88 | 26 |
bos@88 | 27 #$ name: log |
bos@88 | 28 |
bos@88 | 29 hg log |
bos@88 | 30 |
bos@88 | 31 #$ name: log-r |
bos@88 | 32 |
bos@88 | 33 hg log -r 3 |
hg@307 | 34 hg log -r 0272e0d5a517 |
bos@88 | 35 hg log -r 1 -r 4 |
bos@88 | 36 |
bos@88 | 37 #$ name: log.range |
bos@88 | 38 |
bos@88 | 39 hg log -r 2:4 |
bos@91 | 40 |
bos@91 | 41 #$ name: log-v |
bos@91 | 42 |
bos@91 | 43 hg log -v -r 3 |
bos@91 | 44 |
bos@91 | 45 #$ name: log-vp |
bos@91 | 46 |
bos@91 | 47 hg log -v -p -r 2 |
bos@91 | 48 |
bos@91 | 49 #$ name: reclone |
bos@91 | 50 |
bos@91 | 51 cd .. |
bos@91 | 52 hg clone hello my-hello |
bos@91 | 53 cd my-hello |
bos@91 | 54 |
bos@609 | 55 #$ name: cat1 |
bos@609 | 56 cat hello.c |
bos@609 | 57 |
bos@609 | 58 #$ name: |
bos@91 | 59 |
bos@91 | 60 sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c |
bos@91 | 61 |
bos@609 | 62 #$ name: cat2 |
bos@609 | 63 # ... edit edit edit ... |
bos@609 | 64 cat hello.c |
bos@609 | 65 |
bos@91 | 66 #$ name: status |
bos@91 | 67 |
bos@91 | 68 ls |
bos@91 | 69 hg status |
bos@91 | 70 |
bos@91 | 71 #$ name: diff |
bos@91 | 72 |
bos@91 | 73 hg diff |
bos@91 | 74 |
bos@91 | 75 #$ name: |
bos@91 | 76 |
bos@91 | 77 export HGEDITOR='echo Added an extra line of output >' |
bos@91 | 78 |
bos@91 | 79 #$ name: commit |
bos@91 | 80 |
bos@91 | 81 hg commit |
bos@91 | 82 |
hg@307 | 83 #$ name: merge.dummy1 |
hg@307 | 84 |
hg@307 | 85 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-hello |
hg@307 | 86 |
bos@91 | 87 #$ name: tip |
bos@91 | 88 |
bos@91 | 89 hg tip -vp |
bos@91 | 90 |
bos@91 | 91 #$ name: clone-pull |
bos@91 | 92 |
bos@91 | 93 cd .. |
bos@91 | 94 hg clone hello hello-pull |
bos@91 | 95 |
bos@91 | 96 #$ name: incoming |
bos@91 | 97 |
bos@91 | 98 cd hello-pull |
bos@91 | 99 hg incoming ../my-hello |
bos@91 | 100 |
bos@91 | 101 #$ name: pull |
bos@91 | 102 |
bos@91 | 103 hg tip |
bos@91 | 104 hg pull ../my-hello |
bos@91 | 105 hg tip |
bos@91 | 106 |
bos@91 | 107 #$ name: update |
bos@91 | 108 |
bos@91 | 109 grep printf hello.c |
bos@91 | 110 hg update tip |
bos@91 | 111 grep printf hello.c |
bos@91 | 112 |
bos@91 | 113 #$ name: parents |
bos@91 | 114 |
bos@91 | 115 hg parents |
bos@91 | 116 |
bos@91 | 117 #$ name: older |
bos@91 | 118 |
bos@91 | 119 hg update 2 |
bos@91 | 120 hg parents |
bos@94 | 121 hg update |
bos@92 | 122 |
bos@92 | 123 #$ name: clone-push |
bos@92 | 124 |
bos@92 | 125 cd .. |
bos@92 | 126 hg clone hello hello-push |
bos@92 | 127 |
bos@92 | 128 #$ name: outgoing |
bos@92 | 129 |
bos@92 | 130 cd my-hello |
bos@92 | 131 hg outgoing ../hello-push |
bos@92 | 132 |
bos@92 | 133 #$ name: push |
bos@92 | 134 |
bos@92 | 135 hg push ../hello-push |
bos@92 | 136 |
bos@92 | 137 #$ name: push.nothing |
bos@92 | 138 |
bos@92 | 139 hg push ../hello-push |
bos@93 | 140 |
bos@93 | 141 #$ name: outgoing.net |
bos@93 | 142 |
bos@93 | 143 hg outgoing http://hg.serpentine.com/tutorial/hello |
bos@93 | 144 |
bos@93 | 145 #$ name: push.net |
bos@93 | 146 |
bos@93 | 147 hg push http://hg.serpentine.com/tutorial/hello |
bos@93 | 148 |
bos@619 | 149 #$ name: |
bos@619 | 150 cp hello.c ../new-hello.c |
bos@619 | 151 sed -i '/printf/i\\tprintf("once more, hello.\\n");' ../new-hello.c |
bos@619 | 152 |
bos@94 | 153 #$ name: merge.clone |
bos@94 | 154 |
bos@94 | 155 cd .. |
bos@94 | 156 hg clone hello my-new-hello |
bos@94 | 157 cd my-new-hello |
bos@619 | 158 # The file new-hello.c is lightly edited. |
bos@619 | 159 cp ../new-hello.c hello.c |
bos@94 | 160 hg commit -m 'A new hello for a new day.' |
bos@94 | 161 |
hg@307 | 162 #$ name: merge.dummy2 |
hg@307 | 163 |
hg@307 | 164 hg log -r 5 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV5.my-new-hello |
hg@307 | 165 |
bos@94 | 166 #$ name: merge.cat |
bos@94 | 167 |
bos@94 | 168 cat hello.c |
bos@94 | 169 cat ../my-hello/hello.c |
bos@94 | 170 |
bos@94 | 171 #$ name: merge.pull |
bos@94 | 172 |
bos@94 | 173 hg pull ../my-hello |
bos@94 | 174 |
hg@307 | 175 #$ name: merge.dummy3 |
hg@307 | 176 |
hg@307 | 177 hg log -r 6 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV6.my-new-hello |
hg@307 | 178 |
bos@94 | 179 #$ name: merge.heads |
bos@94 | 180 |
bos@94 | 181 hg heads |
bos@94 | 182 |
bos@94 | 183 #$ name: merge.update |
bos@94 | 184 |
bos@94 | 185 hg update |
bos@94 | 186 |
bos@94 | 187 #$ name: merge.merge |
bos@94 | 188 |
bos@94 | 189 hg merge |
bos@94 | 190 |
bos@94 | 191 #$ name: merge.parents |
bos@94 | 192 |
bos@94 | 193 hg parents |
bos@94 | 194 cat hello.c |
bos@94 | 195 |
bos@94 | 196 #$ name: merge.commit |
bos@94 | 197 |
bos@94 | 198 hg commit -m 'Merged changes' |
bos@94 | 199 |
hg@307 | 200 #$ name: merge.dummy4 |
hg@307 | 201 |
hg@307 | 202 hg log -r 7 | grep changeset | cut -c 16-19 2>/dev/null > /tmp/REV7.my-new-hello |
hg@307 | 203 |
bos@94 | 204 #$ name: merge.tip |
bos@94 | 205 |
bos@94 | 206 hg tip |