Mercurial > hgbook
comparison es/examples/branching @ 432:04c08ad7e92e
Translated svgs dummy .tex towards building
author | Igor TAmara <igor@tamarapatino.org> |
---|---|
date | Sat, 18 Oct 2008 07:48:21 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
431:d13a05515acf | 432:04c08ad7e92e |
---|---|
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 #$ ignore: /tmp/branching.* | |
43 hg push | |
44 | |
45 #$ name: | |
46 | |
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 | |
52 | |
53 #$ name: merge | |
54 | |
55 cd ../main | |
56 hg pull ../stable | |
57 hg merge | |
58 hg commit -m 'Bring in bugfix from stable branch' | |
59 cat myfile | |
60 | |
61 #$ name: | |
62 | |
63 rm $HGMERGE |