hgbook

annotate en/examples/tour @ 122:3af28630fe8c

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