Show More
@@ -1,51 +1,79 | |||||
1 | #!/bin/sh |
|
|||
2 |
|
1 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
2 | $ echo "[extensions]" >> $HGRCPATH | |
4 | echo "convert=" >> $HGRCPATH |
|
3 | $ echo "convert=" >> $HGRCPATH | |
5 | echo 'graphlog =' >> $HGRCPATH |
|
4 | $ echo 'graphlog =' >> $HGRCPATH | |
6 |
|
5 | $ glog() | ||
7 | glog() |
|
6 | > { | |
8 | { |
|
7 | > hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@" | |
9 | hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@" |
|
8 | > } | |
10 | } |
|
9 | $ hg init repo1 | |
11 |
|
10 | $ cd repo1 | ||
12 | hg init repo1 |
|
11 | $ echo a > a | |
13 | cd repo1 |
|
12 | $ hg ci -Am adda | |
14 | echo a > a |
|
13 | adding a | |
15 | hg ci -Am adda |
|
14 | $ echo b > b | |
16 |
|
|
15 | $ echo a >> a | |
17 | echo a >> a |
|
16 | $ hg ci -Am addb | |
18 | hg ci -Am addb |
|
17 | adding b | |
19 | PARENTID1=`hg id --debug -i` |
|
18 | $ PARENTID1=`hg id --debug -i` | |
20 | echo c > c |
|
19 | $ echo c > c | |
21 | hg ci -Am addc |
|
20 | $ hg ci -Am addc | |
22 | PARENTID2=`hg id --debug -i` |
|
21 | adding c | |
23 | cd .. |
|
22 | $ PARENTID2=`hg id --debug -i` | |
|
23 | $ cd .. | |||
|
24 | $ hg init repo2 | |||
|
25 | $ cd repo2 | |||
|
26 | $ echo b > a | |||
|
27 | $ echo d > d | |||
|
28 | $ hg ci -Am addaandd | |||
|
29 | adding a | |||
|
30 | adding d | |||
|
31 | $ CHILDID1=`hg id --debug -i` | |||
|
32 | $ echo d >> d | |||
|
33 | $ hg ci -Am changed | |||
|
34 | $ CHILDID2=`hg id --debug -i` | |||
|
35 | $ echo e > e | |||
|
36 | $ hg ci -Am adde | |||
|
37 | adding e | |||
|
38 | $ cd .. | |||
24 |
|
39 | |||
25 | hg init repo2 |
|
40 | test invalid splicemap | |
26 | cd repo2 |
|
41 | ||
27 | echo b > a |
|
42 | $ cat > splicemap <<EOF | |
28 | echo d > d |
|
43 | > $CHILDID2 | |
29 | hg ci -Am addaandd |
|
44 | > EOF | |
30 | CHILDID1=`hg id --debug -i` |
|
45 | $ hg convert --splicemap splicemap repo2 repo1 | |
31 | echo d >> d |
|
46 | abort: syntax error in splicemap(1): key/value pair expected | |
32 | hg ci -Am changed |
|
47 | [255] | |
33 | CHILDID2=`hg id --debug -i` |
|
48 | ||
34 | echo e > e |
|
49 | splice repo2 on repo1 | |
35 | hg ci -Am adde |
|
|||
36 | cd .. |
|
|||
37 |
|
50 | |||
38 | echo '% test invalid splicemap' |
|
51 | $ cat > splicemap <<EOF | |
39 | cat > splicemap <<EOF |
|
52 | > $CHILDID1 $PARENTID1 | |
40 | $CHILDID2 |
|
53 | > $CHILDID2 $PARENTID2,$CHILDID1 | |
41 | EOF |
|
54 | > EOF | |
42 | hg convert --splicemap splicemap repo2 repo1 |
|
55 | $ hg clone repo1 target1 | |
43 |
|
56 | updating to branch default | ||
44 | echo '% splice repo2 on repo1' |
|
57 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
45 | cat > splicemap <<EOF |
|
58 | $ hg convert --splicemap splicemap repo2 target1 | |
46 | $CHILDID1 $PARENTID1 |
|
59 | scanning source... | |
47 | $CHILDID2 $PARENTID2,$CHILDID1 |
|
60 | sorting... | |
48 | EOF |
|
61 | converting... | |
49 | hg clone repo1 target1 |
|
62 | 2 addaandd | |
50 | hg convert --splicemap splicemap repo2 target1 |
|
63 | spliced in ['6d4c2037ddc2cb2627ac3a244ecce35283268f8e'] as parents of 527cdedf31fbd5ea708aa14eeecf53d4676f38db | |
51 | glog -R target1 |
|
64 | 1 changed | |
|
65 | spliced in ['e55c719b85b60e5102fac26110ba626e7cb6b7dc', '527cdedf31fbd5ea708aa14eeecf53d4676f38db'] as parents of e4ea00df91897da3079a10fab658c1eddba6617b | |||
|
66 | 0 adde | |||
|
67 | $ glog -R target1 | |||
|
68 | o 5 "adde" files: e | |||
|
69 | | | |||
|
70 | o 4 "changed" files: d | |||
|
71 | |\ | |||
|
72 | | o 3 "addaandd" files: a d | |||
|
73 | | | | |||
|
74 | @ | 2 "addc" files: c | |||
|
75 | |/ | |||
|
76 | o 1 "addb" files: a b | |||
|
77 | | | |||
|
78 | o 0 "adda" files: a | |||
|
79 |
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