bos@202: #!/bin/bash
bos@202: 
bos@202: hg init a
bos@202: cd a
bos@202: echo hello > myfile
bos@202: hg commit -A -m 'Initial commit'
bos@202: 
bos@202: #$ name: branches
bos@202: 
bos@203: hg tip
bos@202: hg branches
bos@203: 
bos@203: #$ name: branch
bos@203: 
bos@203: hg branch
bos@203: 
bos@203: #$ name: create
bos@203: 
bos@203: hg branch foo
bos@203: hg branch
bos@203: 
bos@203: #$ name: status
bos@203: 
bos@203: hg status
bos@203: hg tip
bos@203: 
bos@203: #$ name: commit
bos@203: 
bos@203: echo 'hello again' >> myfile
bos@203: hg commit -m 'Second commit'
bos@203: hg tip
bos@206: 
bos@206: #$ name: rebranch
bos@206: 
bos@206: hg branch
bos@206: hg branch bar
bos@206: echo new file > newfile
bos@206: hg commit -A -m 'Third commit'
bos@206: hg tip
bos@206: 
bos@206: #$ name: parents
bos@206: 
bos@206: hg parents
bos@206: hg branches
bos@206: 
bos@206: #$ name: update-switchy
bos@206: 
bos@206: hg update foo
bos@206: hg parents
bos@206: hg update bar
bos@206: hg parents
bos@206: 
bos@206: #$ name: update-nothing
bos@206: 
bos@206: hg update foo
bos@206: hg update
bos@206: 
bos@206: #$ name: foo-commit
bos@206: 
bos@206: echo something > somefile
bos@206: hg commit -A -m 'New file'
bos@206: hg heads
bos@206: 
bos@206: #$ name: update-bar
bos@206: 
bos@206: hg update bar
bos@206: 
bos@206: #$ name: merge
bos@206: 
bos@206: hg branch
hg@299: hg merge foo
bos@206: hg commit -m 'Merge'
bos@206: hg tip