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