Show More
@@ -1,41 +1,47 b'' | |||
|
1 | #!/bin/sh | |
|
1 | $ echo "[extensions]" >> $HGRCPATH | |
|
2 | $ echo "graphlog=" >> $HGRCPATH | |
|
2 | 3 | |
|
3 | echo "[extensions]" >> $HGRCPATH | |
|
4 | echo "graphlog=" >> $HGRCPATH | |
|
4 | $ addcommit () { | |
|
5 | > echo $1 > $1 | |
|
6 | > hg add $1 | |
|
7 | > hg commit -d "${2} 0" -m $1 | |
|
8 | > } | |
|
5 | 9 | |
|
6 |
|
|
|
7 | echo $1 > $1 | |
|
8 | hg add $1 | |
|
9 | hg commit -d "${2} 0" -m $1 | |
|
10 | } | |
|
10 | $ commit () { | |
|
11 | > hg commit -d "${2} 0" -m $1 | |
|
12 | > } | |
|
11 | 13 | |
|
12 | commit () { | |
|
13 | hg commit -d "${2} 0" -m $1 | |
|
14 | } | |
|
14 | $ hg init a | |
|
15 | $ cd a | |
|
16 | $ addcommit "A" 0 | |
|
17 | $ addcommit "B" 1 | |
|
18 | $ echo "C" >> A | |
|
19 | $ commit "C" 2 | |
|
15 | 20 | |
|
16 | hg init a | |
|
17 | cd a | |
|
18 | addcommit "A" 0 | |
|
19 |
|
|
|
20 | echo "C" >> A | |
|
21 | commit "C" 2 | |
|
21 | $ hg update -C 0 | |
|
22 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
23 | $ echo "D" >> A | |
|
24 | $ commit "D" 3 | |
|
25 | created new head | |
|
22 | 26 | |
|
23 | hg update -C 0 | |
|
24 | echo "D" >> A | |
|
25 | commit "D" 3 | |
|
27 | Merging a conflict araises | |
|
26 | 28 | |
|
27 | echo | |
|
28 | echo "% Merging a conflict araises" | |
|
29 | hg merge | |
|
29 | $ hg merge | |
|
30 | merging A | |
|
31 | warning: conflicts during merge. | |
|
32 | merging A failed! | |
|
33 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
|
34 | use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon | |
|
35 | ||
|
36 | Correct the conflict without marking the file as resolved | |
|
30 | 37 | |
|
31 | echo | |
|
32 | echo "% Correct the conflict without marking the file as resolved" | |
|
33 | echo "ABCD" > A | |
|
34 | hg commit -m "Merged" | |
|
38 | $ echo "ABCD" > A | |
|
39 | $ hg commit -m "Merged" | |
|
40 | abort: unresolved merge conflicts (see hg resolve) | |
|
35 | 41 | |
|
36 | echo | |
|
37 | echo "% Mark the conflict as resolved and commit" | |
|
38 | hg resolve -m A | |
|
39 | hg commit -m "Merged" | |
|
42 | Mark the conflict as resolved and commit | |
|
40 | 43 | |
|
41 | exit 0 | |
|
44 | $ hg resolve -m A | |
|
45 | $ hg commit -m "Merged" | |
|
46 | ||
|
47 | $ exit 0 |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now