Login
Changes To Vendor branches
Login

Changes to "Vendor branches" between 2026-11-26 04:34:51 and 2026-11-26 04:42:03

︙
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
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
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







-
+

+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

-
+







descends from it, so the two branches share an ancestor and merge normally.

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, step by step
## The history

Upstream releases arrive on `vendor-wrap` exactly as shipped, and each one is
merged down 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.
| Step | Branch | Check-in | What happens |
|---|---|---|---|
| 1 | trunk | [cd2c8ca84b](https://fossil.craftdesign.group/fossil-examples/info/cd2c8ca84b) | Project A starts, with no wrap library yet. |
| 2 | vendor-wrap | [ab245b7902](https://fossil.craftdesign.group/fossil-examples/info/ab245b7902) | wrap 1.0 is imported into `vendor/wrap/`, exactly as upstream ships it. |
| 3 | trunk | [e8cd137bb0](https://fossil.craftdesign.group/fossil-examples/info/e8cd137bb0) | Merging vendor-wrap adds wrap 1.0 to A. |
| 4 | trunk | [5781ae8096](https://fossil.craftdesign.group/fossil-examples/info/5781ae8096) | A starts using wrap. |
| 5 | trunk | [b9eed52216](https://fossil.craftdesign.group/fossil-examples/info/b9eed52216) | **A patches its copy of wrap** to break lines at tabs too. Upstream doesn't have this. |
| 6 | vendor-wrap | [6e37e4e613](https://fossil.craftdesign.group/fossil-examples/info/6e37e4e613) | wrap 1.1: upstream fixes an off-by-one, adds `wrap_test.c` and removes `legacy.c`. |
| 7 | trunk | [c977a16fd1](https://fossil.craftdesign.group/fossil-examples/info/c977a16fd1) | Merging 1.1: the fix comes in, `wrap_test.c` is added, `legacy.c` is deleted, and **A's tab patch stays**. |
| 8 | vendor-wrap | [b6163fde93](https://fossil.craftdesign.group/fossil-examples/info/b6163fde93) | wrap 2.0: upstream renames `wrap.c` to `textwrap.c`. |
| 9 | trunk | [e305905700](https://fossil.craftdesign.group/fossil-examples/info/e305905700) | Merging 2.0: the rename comes in, **A's tab patch moves with the file**, and A's Makefile is updated for the new name. |

```pikchr center
scale = 0.9
fontscale = 1.0
thickness = 0.015
arrowht = 0.08; arrowwid = 0.06
$ink = 0x29333a; $muted = 0x53616c; $rule = 0x6b737b
$base = 0xe7eef2; $vend = 0xdde8f3; $accent = 0x9a3f08; $patch = 0xf6e2d2
$r = 0.09
$top = 1.25

# lane labels
text "vendor-wrap" italic rjust color $muted at (-0.25, $top)
text "upstream, as shipped" small rjust color $muted at (-0.25, $top - 0.17)
text "trunk" italic rjust color $muted at (-0.25, 0)
text "project A" small rjust color $muted at (-0.25, -0.17)

# check-ins
Root: circle rad $r fill none color $rule dashed at (0, 0)
Start: circle rad $r fill $base color $ink at (0.75, 0)
V10: circle rad $r fill $vend color $ink at (1.4, $top)
M10: circle rad $r fill $base color $ink at (2.05, 0)
Patch: circle rad $r*1.35 fill $patch color $accent thick at (2.85, 0)
V11: circle rad $r fill $vend color $ink at (3.6, $top)
M11: circle rad $r fill $base color $ink at (4.25, 0)
V20: circle rad $r fill $vend color $ink at (5.0, $top)
M20: circle rad $r fill $base color $ink at (5.65, 0)


# lanes
line from Root.e to Start.w color $ink
line from Start.e to M10.w color $ink
line from M10.e to Patch.w color $ink
# from the patch on, trunk carries A's change: drawn in the accent
line from Patch.e to M11.w color $accent thickness 0.04
line from M11.e to M20.w color $accent thickness 0.04
arrow from M20.e right 0.35 color $accent thickness 0.04
line from Root.n up $top - $r then right until even with V10.w then to V10.w rad 0.18 color $ink
line from V10.e to V11.w color $ink
line from V11.e to V20.w color $ink

# merges: each release flows down into trunk
arrow from V10.s to M10.n chop dashed color $muted
arrow from V11.s to M11.n chop dashed color $muted
arrow from V20.s to M20.n chop dashed color $muted

# upstream labels
text "wrap 1.0" bold at V10.n + (0, 0.17)
text "wrap 1.1" bold at V11.n + (0, 0.17)
text "off-by-one fix" small ljust color $muted at V11.s + (0.2, -0.16)
text "+wrap_test.c  −legacy.c" small ljust color $muted at V11.s + (0.27, -0.31)
text "wrap 2.0" bold at V20.n + (0, 0.17)
text "wrap.c → textwrap.c" small ljust color $muted at V20.s + (0.2, -0.16)

# trunk labels
text "empty first" small color $muted at Root.s - (0, 0.17)
text "check-in" small color $muted at Root.s - (0, 0.31)
text "notes starts" small at Start.s - (0, 0.17)
text "merge 1.0" small at M10.s - (0, 0.17)
text "A patches wrap" bold color $accent at Patch.s - (0, 0.19)
text "break at tabs" small color $accent at Patch.s - (0, 0.35)
text "merge 1.1" small at M11.s - (0, 0.17)
text "patch kept" small color $accent at M11.s - (0, 0.33)
text "merge 2.0" small at M20.s - (0, 0.17)
text "patch follows" small color $accent at M20.s - (0, 0.33)
text "the rename" small color $accent at M20.s - (0, 0.47)
```

Check-ins: [notes starts](https://fossil.craftdesign.group/fossil-examples/info/cd2c8ca84b) · [wrap 1.0](https://fossil.craftdesign.group/fossil-examples/info/ab245b7902) · [merge 1.0](https://fossil.craftdesign.group/fossil-examples/info/e8cd137bb0) · [A patches wrap](https://fossil.craftdesign.group/fossil-examples/info/b9eed52216) · [wrap 1.1](https://fossil.craftdesign.group/fossil-examples/info/6e37e4e613) · [merge 1.1](https://fossil.craftdesign.group/fossil-examples/info/c977a16fd1) · [wrap 2.0](https://fossil.craftdesign.group/fossil-examples/info/b6163fde93) · [merge 2.0](https://fossil.craftdesign.group/fossil-examples/info/e305905700)

What the merges in steps 7 and 9 printed:
What the merges of 1.1 and 2.0 printed:

    fossil merge vendor-wrap          (wrap 1.1)
    UPDATE vendor/wrap/README.md
    UPDATE vendor/wrap/wrap.h
    MERGE vendor/wrap/wrap.c
    DELETE vendor/wrap/legacy.c
    ADDED vendor/wrap/wrap_test.c
︙
87
88
89
90
91
92
93
94

95
96
97
98
99
100
101
149
150
151
152
153
154
155

156
157
158
159
160
161
162
163







-
+








    cd ../project
    fossil merge vendor-b
    # build and test, then:
    fossil commit -m "Merge B 1.1 from vendor-b."

If a release renames a file, record it with `fossil mv OLD NEW` before
`addremove`, as [step 8](https://fossil.craftdesign.group/fossil-examples/info/b6163fde93) does, and the merge carries your
`addremove`, as [the wrap 2.0 import](https://fossil.craftdesign.group/fossil-examples/info/b6163fde93) does, and the merge carries your
changes to the new name. Without `fossil mv`, Fossil sees a deleted file and a
new one, and your changes to it don't follow.

## Seeing your own changes to B

The vendor branch always holds B exactly as upstream shipped it, so comparing it
with trunk shows exactly what your project has changed in B and nothing else:
︙