bos@87: #!/bin/bash bos@87: bos@87: #$ name: version bos@87: bos@87: hg version bos@87: bos@87: #$ name: help bos@87: bos@87: hg help init bos@87: bos@87: #$ name: clone bos@87: bos@87: hg clone http://hg.serpentine.com/tutorial/hello bos@87: bos@87: #$ name: ls bos@87: bos@87: ls -l bos@87: ls hello bos@88: bos@88: #$ name: ls-a bos@88: bos@88: cd hello bos@88: ls -a bos@88: bos@88: #$ name: log bos@88: bos@88: hg log bos@88: bos@88: #$ name: log-r bos@88: bos@88: hg log -r 3 bos@88: hg log -r ff5d7b70a2a9 bos@88: hg log -r 1 -r 4 bos@88: bos@88: #$ name: log.range bos@88: bos@88: hg log -r 2:4 bos@91: bos@91: #$ name: log-v bos@91: bos@91: hg log -v -r 3 bos@91: bos@91: #$ name: log-vp bos@91: bos@91: hg log -v -p -r 2 bos@91: bos@91: #$ name: reclone bos@91: bos@91: cd .. bos@91: hg clone hello my-hello bos@91: cd my-hello bos@91: bos@91: #$ name: sed bos@91: bos@91: sed -i '/printf/a\\tprintf("hello again!\\n");' hello.c bos@91: bos@91: #$ name: status bos@91: bos@91: ls bos@91: hg status bos@91: bos@91: #$ name: diff bos@91: bos@91: hg diff bos@91: bos@91: #$ name: bos@91: bos@91: export HGEDITOR='echo Added an extra line of output >' bos@102: HGRCPATH_ORIG=$HGRCPATH bos@102: export HGRCPATH= bos@102: bos@102: #$ name: commit-no-user bos@102: bos@102: hg commit bos@102: bos@102: #$ name: bos@102: bos@102: export HGRCPATH=$HGRCPATH_ORIG bos@91: bos@91: #$ name: commit bos@91: bos@91: hg commit bos@91: bos@91: #$ name: tip bos@91: bos@91: hg tip -vp bos@91: bos@91: #$ name: clone-pull bos@91: bos@91: cd .. bos@91: hg clone hello hello-pull bos@91: bos@91: #$ name: incoming bos@91: bos@91: cd hello-pull bos@91: hg incoming ../my-hello bos@91: bos@91: #$ name: pull bos@91: bos@91: hg tip bos@91: hg pull ../my-hello bos@91: hg tip bos@91: bos@91: #$ name: update bos@91: bos@91: grep printf hello.c bos@91: hg update tip bos@91: grep printf hello.c bos@91: bos@91: #$ name: parents bos@91: bos@91: hg parents bos@91: bos@91: #$ name: older bos@91: bos@91: hg update 2 bos@91: hg parents bos@94: hg update bos@92: bos@92: #$ name: clone-push bos@92: bos@92: cd .. bos@92: hg clone hello hello-push bos@92: bos@92: #$ name: outgoing bos@92: bos@92: cd my-hello bos@92: hg outgoing ../hello-push bos@92: bos@92: #$ name: push bos@92: bos@92: hg push ../hello-push bos@92: bos@92: #$ name: push.nothing bos@92: bos@92: hg push ../hello-push bos@93: bos@93: #$ name: outgoing.net bos@93: bos@93: hg outgoing http://hg.serpentine.com/tutorial/hello bos@93: bos@93: #$ name: push.net bos@93: bos@93: hg push http://hg.serpentine.com/tutorial/hello bos@93: bos@94: #$ name: merge.clone bos@94: bos@94: cd .. bos@94: hg clone hello my-new-hello bos@94: cd my-new-hello bos@94: sed -i '/printf/i\\tprintf("once more, hello.\\n");' hello.c bos@94: hg commit -m 'A new hello for a new day.' bos@94: bos@94: #$ name: merge.cat bos@94: bos@94: cat hello.c bos@94: cat ../my-hello/hello.c bos@94: bos@94: #$ name: merge.pull bos@94: bos@94: hg pull ../my-hello bos@94: bos@94: #$ name: merge.heads bos@94: bos@94: hg heads bos@94: bos@94: #$ name: merge.update bos@94: bos@94: hg update bos@94: bos@94: #$ name: merge.merge bos@94: bos@94: hg merge bos@94: bos@94: #$ name: merge.parents bos@94: bos@94: hg parents bos@94: cat hello.c bos@94: bos@94: #$ name: merge.commit bos@94: bos@94: hg commit -m 'Merged changes' bos@94: bos@94: #$ name: merge.tip bos@94: bos@94: hg tip