annotate es/examples/branching @ 746:d0160b0b1a9e

Merge with http://hg.serpentine.com/mercurial/book
author Dongsheng Song <dongsheng.song@gmail.com>
date Wed, 18 Mar 2009 20:32:37 +0800
parents 04c08ad7e92e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
432
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
1 #!/bin/bash
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
2
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
3 #$ name: init
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
4
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
5 hg init main
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
6 cd main
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
7 echo 'This is a boring feature.' > myfile
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
8 hg commit -A -m 'We have reached an important milestone!'
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
9
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
10 #$ name: tag
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
11
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
12 hg tag v1.0
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
13 hg tip
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
14 hg tags
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
15
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
16 #$ name: main
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
17
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
18 cd ../main
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
19 echo 'This is exciting and new!' >> myfile
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
20 hg commit -m 'Add a new feature'
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
21 cat myfile
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
22
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
23 #$ name: update
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
24
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
25 cd ..
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
26 hg clone -U main main-old
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
27 cd main-old
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
28 hg update v1.0
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
29 cat myfile
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
30
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
31 #$ name: clone
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
32
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
33 cd ..
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
34 hg clone -rv1.0 main stable
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
35
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
36 #$ name: stable
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
37
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
38 hg clone stable stable-fix
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
39 cd stable-fix
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
40 echo 'This is a fix to a boring feature.' > myfile
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
41 hg commit -m 'Fix a bug'
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
42 #$ ignore: /tmp/branching.*
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
43 hg push
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
44
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
45 #$ name:
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
46
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
47 export HGMERGE=$(mktemp)
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
48 echo '#!/bin/sh' > $HGMERGE
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
49 echo 'echo "This is a fix to a boring feature." > "$1"' >> $HGMERGE
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
50 echo 'echo "This is exciting and new!" >> "$1"' >> $HGMERGE
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
51 chmod 700 $HGMERGE
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
52
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
53 #$ name: merge
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
54
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
55 cd ../main
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
56 hg pull ../stable
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
57 hg merge
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
58 hg commit -m 'Bring in bugfix from stable branch'
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
59 cat myfile
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
60
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
61 #$ name:
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
62
04c08ad7e92e Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff changeset
63 rm $HGMERGE