annotate ja/examples/branching @ 803:5276f40fca1c

Propagate e6c99cbd0abd Updates to chapters 5, 6, and 7
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 09 Jul 2009 13:32:44 +0900
parents b0db5adf11c1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
179
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
1 #!/bin/bash
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
2
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
3 #$ name: init
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
4
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
5 hg init main
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
6 cd main
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
7 echo 'This is a boring feature.' > myfile
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
8 hg commit -A -m 'We have reached an important milestone!'
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
9
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
10 #$ name: tag
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
11
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
12 hg tag v1.0
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
13 hg tip
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
14 hg tags
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
15
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
16 #$ name: main
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
17
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
18 cd ../main
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
19 echo 'This is exciting and new!' >> myfile
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
20 hg commit -m 'Add a new feature'
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
21 cat myfile
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
22
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
23 #$ name: update
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
24
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
25 cd ..
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
26 hg clone -U main main-old
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
27 cd main-old
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
28 hg update v1.0
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
29 cat myfile
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
30
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
31 #$ name: clone
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
32
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
33 cd ..
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
34 hg clone -rv1.0 main stable
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
35
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
36 #$ name: stable
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
37
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
38 hg clone stable stable-fix
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
39 cd stable-fix
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
40 echo 'This is a fix to a boring feature.' > myfile
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
41 hg commit -m 'Fix a bug'
191
f078515438d2 Account for changed output.
Bryan O'Sullivan <bos@serpentine.com>
parents: 179
diff changeset
42 #$ ignore: /tmp/branching.*
179
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
43 hg push
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
44
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
45 #$ name:
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
46
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
47 export HGMERGE=$(mktemp)
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
48 echo '#!/bin/sh' > $HGMERGE
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
49 echo 'echo "This is a fix to a boring feature." > "$1"' >> $HGMERGE
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
50 echo 'echo "This is exciting and new!" >> "$1"' >> $HGMERGE
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
51 chmod 700 $HGMERGE
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
52
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
53 #$ name: merge
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
54
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
55 cd ../main
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
56 hg pull ../stable
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
57 hg merge
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
58 hg commit -m 'Bring in bugfix from stable branch'
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
59 cat myfile
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
60
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
61 #$ name:
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
62
5fc4a45c069f Continue documentation of collaboration models.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
63 rm $HGMERGE