summaryrefslogtreecommitdiff
path: root/tools/weavemerge.sh
blob: 27c98896cd34b142209dcb2d3ab13fa1ffd4825a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /bin/zsh -xe

weave init test.weave

weave add test.weave <<EOF
aaa
bbb
ccc
EOF

weave add test.weave 0 <<EOF
aaa
bbb
stuff from martin
ccc
ddd
EOF

weave add test.weave 0 <<EOF
aaa
bbb
stuff from john
more john stuff
ccc
EOF

weave add test.weave 1 2 <<EOF
aaa
bbb
stuff from martin
fix up merge
more john stuff
ccc
ddd
EOF

weave add test.weave 3 <<EOF
aaa
bbb
stuff from martin
fix up merge
modify john's code
ccc
ddd
add stuff here
EOF

# v5 
weave add test.weave 2 <<EOF
aaa
bbb
stuff from john
more john stuff
john replaced ccc line
EOF

# now try merging 5(2) with 4(3(2 1))