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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
+
-
-
+
+
-
-
-
-
+
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
-
-
+
-
-
-
-
-
+
+
+
+
-
+
+
+
+
|
A truly separate root (made with `fossil open --empty` and a first commit)
doesn't work for this: `fossil merge` refuses it with "cannot find a common
ancestor". Branching from your latest code does work, but it puts all of A's
files on the vendor branch too.
## The history
Time runs up the page, newest at the top, as on Fossil's timeline. Upstream
Time runs down the page. Upstream releases arrive on `vendor-wrap` exactly as
shipped, and each one is merged across into trunk. From the moment A patches its copy of wrap, that change
releases arrive on `vendor-wrap` exactly as shipped, and each one is merged
across into trunk. From the moment A patches its copy of wrap, that change
rides along trunk through every later release, including the one that renames
the file.
```pikchr center
scale = 0.9
fontscale = 1.0
thickness = 0.015
arrowht = 0.08; arrowwid = 0.06
arrowht = 0.07
$ink = 0x29333a; $muted = 0x53616c; $rule = 0x6b737b
$base = 0xe7eef2; $vend = 0xdde8f3; $accent = 0x9a3f08; $patch = 0xf6e2d2
$r = 0.085
$vx = 1.7
$lx = -0.28
$rx = $vx + 0.28
$vx = 1.5
$dy = 0.56
$lx = -0.3
$rx = $vx + 0.3
# column headings
text "TRUNK" bold at (0, 0.62)
text "project A" small color $muted at (0, 0.46)
text "VENDOR-WRAP" bold at ($vx, 0.62)
text "upstream, exactly as shipped" small color $muted at ($vx, 0.46)
# check-ins, oldest at the top
Root: circle rad $r fill none color $rule dashed at (0, 0)
Start: circle rad $r fill $base color $ink at (0, -0.62)
Cont: circle rad $r fill $base color $ink at (0, -1.24)
V10: circle rad $r fill $vend color $ink at ($vx, -1.86)
M10: circle rad $r fill $base color $ink at (0, -2.48)
Use: circle rad $r fill $base color $ink at (0, -3.10)
Patch: circle rad $r*1.35 fill $patch color $accent thick at (0, -3.72)
V11: circle rad $r fill $vend color $ink at ($vx, -4.40)
M11: circle rad $r fill $base color $ink at (0, -5.10)
V20: circle rad $r fill $vend color $ink at ($vx, -5.86)
# Check-ins, oldest at the bottom: time runs up, as on Fossil's timeline.
Start: circle rad 0.1in thickness 1.5px fill white at (0, 1*$dy)
Root: circle same dashed at (0, 0)
Cont: circle same as Start at (0, 2*$dy)
V10: circle same as Start at ($vx, 3*$dy)
M10: circle same as Start at (0, 4*$dy)
Use: circle same as Start at (0, 5*$dy)
Patch: circle same as Start at (0, 6*$dy)
V11: circle same as Start at ($vx, 7*$dy)
M11: circle same as Start at (0, 8*$dy)
V20: circle same as Start at ($vx, 9*$dy)
M20: circle same as Start at (0, 10*$dy)
M20: circle rad $r fill $base color $ink at (0, -6.56)
# trunk: plain until the patch, then carrying A's change
line from Root.s to Start.n color $ink
line from Start.s to Cont.n color $ink
line from Cont.s to M10.n color $ink
line from M10.s to Use.n color $ink
line from Use.s to Patch.n color $ink
line from Patch.s to M11.n color $accent thickness 0.04
line from M11.s to M20.n color $accent thickness 0.04
arrow from M20.s down 0.35 color $accent thickness 0.04
# Parent to child.
arrow from Root to Start chop
arrow from Start to Cont chop
arrow from Cont to M10 chop
arrow from M10 to Use chop
arrow from Use to Patch chop
arrow from Patch to M11 chop
arrow from M11 to M20 chop
arrow from M20.n up 0.3
arrow from Root to V10 chop
# vendor-wrap: starts at the empty root, has no files of A's
line from Root.e right until even with V10 then to V10.n rad 0.2 color $ink
line from V10.s to V11.n color $ink
line from V11.s to V20.n color $ink
arrow from V10 to V11 chop
arrow from V11 to V20 chop
# merges: fossil merge vendor-wrap, run on trunk
arrow from V10.w to M10.ne chop dashed color $muted
arrow from V11.w to M11.ne chop dashed color $muted
arrow from V20.w to M20.ne chop dashed color $muted
# Merges.
arrow dashed 0.03 from V10 to M10 chop
arrow dashed 0.03 from V11 to M11 chop
arrow dashed 0.03 from V20 to M20 chop
# Bands, drawn underneath.
layer = 0
VB: box fill 0x9bcdfc color 0x9bcdfc wid 0.42 ht V20.n.y - V10.s.y + 0.36 with .s at (V10.x, V10.s.y - 0.18)
text "vendor-wrap" small at VB.s - (0, 0.14)
PB: box fill 0xe8d8d0 color 0xe8d8d0 wid 0.42 ht M20.n.y - Patch.s.y + 0.36 with .s at (Patch.x, Patch.s.y - 0.18)
text "trunk" small at Root.s - (0, 0.16)
layer = 1000
# trunk annotations, right-aligned to the left of the column
define tl { text $1 bold rjust at ($lx, $4.y + 0.14)
text $2 small mono rjust color $muted at ($lx, $4.y - 0.02)
text $3 small rjust color $muted at ($lx, $4.y - 0.17) }
# Trunk notes, left of the line.
define tl { text $1 rjust at ($lx, $4.y + 0.13)
text $2 mono small rjust at ($lx, $4.y - 0.02)
text $3 small rjust at ($lx, $4.y - 0.16) }
define tp { text $1 bold rjust color $accent at ($lx, $4.y + 0.14)
text $2 small mono rjust color $accent at ($lx, $4.y - 0.02)
text $3 small rjust color $accent at ($lx, $4.y - 0.17) }
tl("INITIAL EMPTY CHECK-IN", "f2e1f9f4c8", "fossil new; 0 files", Root)
tl("START notes", "cd2c8ca84b", "+notes.c +Makefile +README.md", Start)
tl("CONTINUE", "930eb4ff6b", "no wrap library yet", Cont)
tl("MERGE wrap 1.0", "e8cd137bb0", "ADDED vendor/wrap/* (4 files)", M10)
tl("USE wrap", "5781ae8096", "notes.c, Makefile edited", Use)
tp("PATCH wrap.c:7", "b9eed52216", "is_space() also breaks at '\\t'", Patch)
tl("MERGE wrap 1.1", "c977a16fd1", "MERGE wrap.c, +wrap_test.c, −legacy.c", M11)
tl("PATCH wrap.c:7", "b9eed52216", "is_space() also breaks at '\\t'", Patch)
tl("MERGE wrap 1.1", "c977a16fd1", "MERGE wrap.c +wrap_test.c −legacy.c; patch kept", M11)
text "PATCH RETAINED" small bold rjust color $accent at ($lx, M11.y - 0.32)
tl("MERGE wrap 2.0", "e305905700", "RENAME wrap.c → textwrap.c", M20)
tl("MERGE wrap 2.0", "e305905700", "RENAME wrap.c → textwrap.c; patch kept", M20)
text "PATCH RETAINED AT textwrap.c:7" small bold rjust color $accent at ($lx, M20.y - 0.32)
# vendor annotations, left-aligned to the right of the column
define vl { text $1 bold ljust at ($rx, $4.y + 0.14)
text $2 small mono ljust color $muted at ($rx, $4.y - 0.02)
text $3 small ljust color $muted at ($rx, $4.y - 0.17) }
# Vendor notes, right of the line.
define vl { text $1 ljust at ($rx, $4.y + 0.13)
text $2 mono small ljust at ($rx, $4.y - 0.02)
text $3 small ljust at ($rx, $4.y - 0.16) }
vl("IMPORT wrap 1.0", "ab245b7902", "4 files into vendor/wrap/", V10)
vl("IMPORT wrap 1.1", "6e37e4e613", "wrap.c:20 >= → >, +wrap_test.c, −legacy.c", V11)
vl("IMPORT wrap 1.1", "6e37e4e613", "wrap.c:20 >= → >; +wrap_test.c −legacy.c", V11)
vl("IMPORT wrap 2.0", "b6163fde93", "fossil mv wrap.c textwrap.c", V20)
text "A's patch," small italic ljust at PB.se + (0.08, 0.26)
text "carried forward" small italic ljust at PB.se + (0.08, 0.12)
```
Check-ins: [notes starts](/info/cd2c8ca84b) · [wrap 1.0](/info/ab245b7902) · [merge 1.0](/info/e8cd137bb0) · [A patches wrap](/info/b9eed52216) · [wrap 1.1](/info/6e37e4e613) · [merge 1.1](/info/c977a16fd1) · [wrap 2.0](/info/b6163fde93) · [merge 2.0](/info/e305905700)
What the merges of 1.1 and 2.0 printed:
fossil merge vendor-wrap (wrap 1.1)
|