hgbook
annotate en/examples/branch-repo @ 198:615f3c6b30e1
Start to describe branch management.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Apr 16 17:21:38 2007 -0700 (2007-04-16) |
parents | |
children | 58e3a6c76725 |
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@198 | 33 echo "I'm adding a new feature with my mind!" > mynewfile |
bos@198 | 34 hg commit -A -m 'New feature' |
bos@198 | 35 |