SQLite Forum

extension-functions.c - pre-compiled Windows Binary
Login
You shouldn't edit the amalgamation at all.

Instead, [clone the Fossil repository][1], make your edits to a local working copy, then commit the change to a local branch. Since you don't have commit rights on the official repository, they won't [autosync][2], so you don't need to mess with [private branches][3]. Since they're on a branch, you can then pull upstream changes and merge them into your branch, effectively reapplying your local edits in a single step.

Here's the distilled workflow:

```
  $ mkdir -p ~/src/sqlite/my-branch
  $ cd ~/src/sqlite/trunk
  $ fossil open https://sqlite.org/src
  ...make your local edits to src/*.c...
  $ ./configure --with-chosen-opts  # one time only
  $ make sqlite3.c                  # build new amalgamation w/your edits
  ...test it...
  $ fossil set autosync pullonly    # once; squishes an annoying warning
  $ fossil ci --branch my-branch -m 'initial version of my branch'
```

This may look a bit complicated, but most of that is one-time-only stuff which doesn't need to be repeated when a new version of SQLite comes out that you want to merge your local changes into:

```
  $ cd ~/src/sqlite/trunk
  $ fossil merge trunk              # implicit update due to autosync
  $ make sqlite3.c
  ...retest that your changes still work atop the new trunk...
  $ fossil ci -m 'updated to latest trunk'
```

It's as simple as it could be now: pull upstream changes, tell Fossil to automatically merge them with your branch's changes, and rebuild the new amalgamation from the combination.

[1]: https://sqlite.org/src/
[2]: https://fossil-scm.org/home/help?cmd=autosync
[3]: https://www.fossil-scm.org/xfer/doc/trunk/www/private.wiki