hgbook
annotate es/examples/branching @ 799:51f5fd4969eb
Lowering SSH, as in the original text.
author | Giulio@puck |
---|---|
date | Thu Aug 13 23:51:17 2009 +0200 (2009-08-13) |
parents | |
children |
rev | line source |
---|---|
igor@333 | 1 #!/bin/bash |
igor@333 | 2 |
igor@333 | 3 #$ name: init |
igor@333 | 4 |
igor@333 | 5 hg init main |
igor@333 | 6 cd main |
igor@333 | 7 echo 'This is a boring feature.' > myfile |
igor@333 | 8 hg commit -A -m 'We have reached an important milestone!' |
igor@333 | 9 |
igor@333 | 10 #$ name: tag |
igor@333 | 11 |
igor@333 | 12 hg tag v1.0 |
igor@333 | 13 hg tip |
igor@333 | 14 hg tags |
igor@333 | 15 |
igor@333 | 16 #$ name: main |
igor@333 | 17 |
igor@333 | 18 cd ../main |
igor@333 | 19 echo 'This is exciting and new!' >> myfile |
igor@333 | 20 hg commit -m 'Add a new feature' |
igor@333 | 21 cat myfile |
igor@333 | 22 |
igor@333 | 23 #$ name: update |
igor@333 | 24 |
igor@333 | 25 cd .. |
igor@333 | 26 hg clone -U main main-old |
igor@333 | 27 cd main-old |
igor@333 | 28 hg update v1.0 |
igor@333 | 29 cat myfile |
igor@333 | 30 |
igor@333 | 31 #$ name: clone |
igor@333 | 32 |
igor@333 | 33 cd .. |
igor@333 | 34 hg clone -rv1.0 main stable |
igor@333 | 35 |
igor@333 | 36 #$ name: stable |
igor@333 | 37 |
igor@333 | 38 hg clone stable stable-fix |
igor@333 | 39 cd stable-fix |
igor@333 | 40 echo 'This is a fix to a boring feature.' > myfile |
igor@333 | 41 hg commit -m 'Fix a bug' |
igor@333 | 42 #$ ignore: /tmp/branching.* |
igor@333 | 43 hg push |
igor@333 | 44 |
igor@333 | 45 #$ name: |
igor@333 | 46 |
igor@333 | 47 export HGMERGE=$(mktemp) |
igor@333 | 48 echo '#!/bin/sh' > $HGMERGE |
igor@333 | 49 echo 'echo "This is a fix to a boring feature." > "$1"' >> $HGMERGE |
igor@333 | 50 echo 'echo "This is exciting and new!" >> "$1"' >> $HGMERGE |
igor@333 | 51 chmod 700 $HGMERGE |
igor@333 | 52 |
igor@333 | 53 #$ name: merge |
igor@333 | 54 |
igor@333 | 55 cd ../main |
igor@333 | 56 hg pull ../stable |
igor@333 | 57 hg merge |
igor@333 | 58 hg commit -m 'Bring in bugfix from stable branch' |
igor@333 | 59 cat myfile |
igor@333 | 60 |
igor@333 | 61 #$ name: |
igor@333 | 62 |
igor@333 | 63 rm $HGMERGE |