hgbook
annotate en/examples/tour @ 92:72d207927dc4
Tour: push.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu Oct 12 16:15:16 2006 -0700 (2006-10-12) |
parents | 7524d52d9577 |
children | 97638d862ef3 |
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@91 | 69 |
bos@91 | 70 #$ name: commit |
bos@91 | 71 |
bos@91 | 72 hg commit |
bos@91 | 73 |
bos@91 | 74 #$ name: tip |
bos@91 | 75 |
bos@91 | 76 hg tip -vp |
bos@91 | 77 |
bos@91 | 78 #$ name: clone-pull |
bos@91 | 79 |
bos@91 | 80 cd .. |
bos@91 | 81 hg clone hello hello-pull |
bos@91 | 82 |
bos@91 | 83 #$ name: incoming |
bos@91 | 84 |
bos@91 | 85 cd hello-pull |
bos@91 | 86 hg incoming ../my-hello |
bos@91 | 87 |
bos@91 | 88 #$ name: pull |
bos@91 | 89 |
bos@91 | 90 hg tip |
bos@91 | 91 hg pull ../my-hello |
bos@91 | 92 hg tip |
bos@91 | 93 |
bos@91 | 94 #$ name: update |
bos@91 | 95 |
bos@91 | 96 grep printf hello.c |
bos@91 | 97 hg update tip |
bos@91 | 98 grep printf hello.c |
bos@91 | 99 |
bos@91 | 100 #$ name: parents |
bos@91 | 101 |
bos@91 | 102 hg parents |
bos@91 | 103 |
bos@91 | 104 #$ name: older |
bos@91 | 105 |
bos@91 | 106 hg update 2 |
bos@91 | 107 hg parents |
bos@92 | 108 |
bos@92 | 109 #$ name: clone-push |
bos@92 | 110 |
bos@92 | 111 cd .. |
bos@92 | 112 hg clone hello hello-push |
bos@92 | 113 |
bos@92 | 114 #$ name: outgoing |
bos@92 | 115 |
bos@92 | 116 cd my-hello |
bos@92 | 117 hg outgoing ../hello-push |
bos@92 | 118 |
bos@92 | 119 #$ name: push |
bos@92 | 120 |
bos@92 | 121 hg push ../hello-push |
bos@92 | 122 |
bos@92 | 123 #$ name: push.nothing |
bos@92 | 124 |
bos@92 | 125 hg push ../hello-push |