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 | $ addcommit () { | |
4 | echo "graphlog=" >> $HGRCPATH |
|
5 | > echo $1 > $1 | |
|
6 | > hg add $1 | |||
|
7 | > hg commit -d "${2} 0" -m $1 | |||
|
8 | > } | |||
5 |
|
9 | |||
6 |
|
|
10 | $ commit () { | |
7 | echo $1 > $1 |
|
11 | > hg commit -d "${2} 0" -m $1 | |
8 | hg add $1 |
|
12 | > } | |
9 | hg commit -d "${2} 0" -m $1 |
|
|||
10 | } |
|
|||
11 |
|
13 | |||
12 | commit () { |
|
14 | $ hg init a | |
13 | hg commit -d "${2} 0" -m $1 |
|
15 | $ cd a | |
14 | } |
|
16 | $ addcommit "A" 0 | |
|
17 | $ addcommit "B" 1 | |||
|
18 | $ echo "C" >> A | |||
|
19 | $ commit "C" 2 | |||
15 |
|
20 | |||
16 | hg init a |
|
21 | $ hg update -C 0 | |
17 | cd a |
|
22 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
18 | addcommit "A" 0 |
|
23 | $ echo "D" >> A | |
19 |
|
|
24 | $ commit "D" 3 | |
20 | echo "C" >> A |
|
25 | created new head | |
21 | commit "C" 2 |
|
|||
22 |
|
26 | |||
23 | hg update -C 0 |
|
27 | Merging a conflict araises | |
24 | echo "D" >> A |
|
|||
25 | commit "D" 3 |
|
|||
26 |
|
28 | |||
27 | echo |
|
29 | $ hg merge | |
28 | echo "% Merging a conflict araises" |
|
30 | merging A | |
29 | hg merge |
|
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 |
|
38 | $ echo "ABCD" > A | |
32 | echo "% Correct the conflict without marking the file as resolved" |
|
39 | $ hg commit -m "Merged" | |
33 | echo "ABCD" > A |
|
40 | abort: unresolved merge conflicts (see hg resolve) | |
34 | hg commit -m "Merged" |
|
|||
35 |
|
41 | |||
36 | echo |
|
42 | Mark the conflict as resolved and commit | |
37 | echo "% Mark the conflict as resolved and commit" |
|
|||
38 | hg resolve -m A |
|
|||
39 | hg commit -m "Merged" |
|
|||
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 |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now