hgbook

annotate en/examples/branch-repo @ 559:b90b024729f1

WIP DocBook snapshot that all compiles. Mirabile dictu!
author Bryan O'Sullivan <bos@serpentine.com>
date Wed Feb 18 00:22:09 2009 -0800 (2009-02-18)
parents 615f3c6b30e1
children
rev   line source
bos@198 1 #!/bin/bash
bos@198 2
bos@198 3 hg init myproject
bos@198 4 cd myproject
bos@198 5 echo hello > myfile
bos@198 6 hg commit -A -m 'Initial commit'
bos@198 7 cd ..
bos@198 8
bos@198 9 #$ name: tag
bos@198 10
bos@198 11 cd myproject
bos@198 12 hg tag v1.0
bos@198 13
bos@198 14 #$ name: clone
bos@198 15
bos@198 16 cd ..
bos@198 17 hg clone myproject myproject-1.0.1
bos@198 18
bos@198 19 #$ name: bugfix
bos@198 20
bos@198 21 hg clone myproject-1.0.1 my-1.0.1-bugfix
bos@198 22 cd my-1.0.1-bugfix
bos@198 23 echo 'I fixed a bug using only echo!' >> myfile
bos@198 24 hg commit -m 'Important fix for 1.0.1'
bos@198 25 #$ ignore: /tmp/branch-repo.*
bos@198 26 hg push
bos@198 27
bos@198 28 #$ name: new
bos@198 29
bos@198 30 cd ..
bos@198 31 hg clone myproject my-feature
bos@198 32 cd my-feature
bos@199 33 echo 'This sure is an exciting new feature!' > mynewfile
bos@198 34 hg commit -A -m 'New feature'
bos@199 35 hg push
bos@198 36
bos@199 37 #$ name: pull
bos@199 38
bos@199 39 cd ..
bos@199 40 hg clone myproject myproject-merge
bos@199 41 cd myproject-merge
bos@199 42 hg pull ../myproject-1.0.1
bos@199 43
bos@199 44 #$ name: merge
bos@199 45
bos@199 46 hg merge
bos@199 47 hg commit -m 'Merge bugfix from 1.0.1 branch'
bos@199 48 hg push