vendor-branching

Vendor Branching using Fossil

NOTE: Fossil recommends to create the branch at commit time

See also the Fossil fork!

. switch to vendor branch

# create or switch to vendor branch

fossil branch new $VENDOR_BRANCH
fossil update $VENDOR_BRANCH

. empty vendor directory

mkdir -p $LOCAL_VENDOR_DIR
cd $LOCAL_VENDOR_DIR
rm -rfI *

.. "sibling" vendor drop (i.e. vendor uses Fossil)

import a bundle or a patch?

.. "alien" vendor drop (vendor does not use Fossil)

wget $ZIPFILE_URL
unzip $ZIPFILE
etc

# NOTE/TODO: 
# Rename the directory if it contains version names!

fossil addremove --dotfiles

. commit & tag the vendor branch

fossil commit --tag $TAG --branch $VENDOR_BRANCH -m "Import $VERSION from $VENDOR as $TAG"

. switch to your task branch

fossil update taskbranch

. merge vendor branch

fossil merge $TAG

. update VENDOR file in the vendor directory

edit $LOCAL_VENDOR_DIR/VENDOR.md # (unless VENDOR.sh runs the vendor drop)

VENDOR.md could also be a VENDOR.sh file that executes a vendor drop. As the next vendor drops are similar, a script is recommended! See this Fossil example

. tweak vendor code

hack away

. merge to main branch

fossil update trunk
merge task branch

. publish

Fossil should autosync everything...


Notes (if any)