hgbook

view en/examples/branching @ 348:0896fcbccdec

command to define how to enter translator's notes. Sorry about previous commit message
author jerojasro@localhost
date Sun Oct 19 22:51:00 2008 -0500 (2008-10-19)
parents 5fc4a45c069f
children
line source
1 #!/bin/bash
3 #$ name: init
5 hg init main
6 cd main
7 echo 'This is a boring feature.' > myfile
8 hg commit -A -m 'We have reached an important milestone!'
10 #$ name: tag
12 hg tag v1.0
13 hg tip
14 hg tags
16 #$ name: main
18 cd ../main
19 echo 'This is exciting and new!' >> myfile
20 hg commit -m 'Add a new feature'
21 cat myfile
23 #$ name: update
25 cd ..
26 hg clone -U main main-old
27 cd main-old
28 hg update v1.0
29 cat myfile
31 #$ name: clone
33 cd ..
34 hg clone -rv1.0 main stable
36 #$ name: stable
38 hg clone stable stable-fix
39 cd stable-fix
40 echo 'This is a fix to a boring feature.' > myfile
41 hg commit -m 'Fix a bug'
42 #$ ignore: /tmp/branching.*
43 hg push
45 #$ name:
47 export HGMERGE=$(mktemp)
48 echo '#!/bin/sh' > $HGMERGE
49 echo 'echo "This is a fix to a boring feature." > "$1"' >> $HGMERGE
50 echo 'echo "This is exciting and new!" >> "$1"' >> $HGMERGE
51 chmod 700 $HGMERGE
53 #$ name: merge
55 cd ../main
56 hg pull ../stable
57 hg merge
58 hg commit -m 'Bring in bugfix from stable branch'
59 cat myfile
61 #$ name:
63 rm $HGMERGE