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@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