comparison en/examples/branching @ 179:5fc4a45c069f

Continue documentation of collaboration models.
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 30 Mar 2007 23:05:28 -0700
parents
children f078515438d2
comparison
equal deleted inserted replaced
178:1b55292716a4 179:5fc4a45c069f
1 #!/bin/bash
2
3 #$ name: init
4
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!'
9
10 #$ name: tag
11
12 hg tag v1.0
13 hg tip
14 hg tags
15
16 #$ name: main
17
18 cd ../main
19 echo 'This is exciting and new!' >> myfile
20 hg commit -m 'Add a new feature'
21 cat myfile
22
23 #$ name: update
24
25 cd ..
26 hg clone -U main main-old
27 cd main-old
28 hg update v1.0
29 cat myfile
30
31 #$ name: clone
32
33 cd ..
34 hg clone -rv1.0 main stable
35
36 #$ name: stable
37
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 hg push
43
44 #$ name:
45
46 export HGMERGE=$(mktemp)
47 echo '#!/bin/sh' > $HGMERGE
48 echo 'echo "This is a fix to a boring feature." > "$1"' >> $HGMERGE
49 echo 'echo "This is exciting and new!" >> "$1"' >> $HGMERGE
50 chmod 700 $HGMERGE
51
52 #$ name: merge
53
54 cd ../main
55 hg pull ../stable
56 hg merge
57 hg commit -m 'Bring in bugfix from stable branch'
58 cat myfile
59
60 #$ name:
61
62 rm $HGMERGE