I am just wondering what the "best" process is for updating Backdrop core when my current install has bug fixes that are not yet in core. (The fixes all have PR's but they haven't yet been committed.)

I am updating from 1.27.0 to 1.27.1 and the updates doc at https://docs.backdropcms.org/documentation/core-updates is pretty basic.

Accepted answer

Slight improvement to @argiepiano's procedure. Again for PR 4690, it would be:

  1. Using shell access, go to the Backdrop doc root.
  2. Run this command to get the diff file:  wget https://github.com/backdrop/backdrop/pull/4690.diff
  3. Run the command: patch -p1 < 4690.diff
  4. After checking that all works, remove the patch file(s).

Comments

In cases when there are uncommitted PRs, you don't actually update Backdrop, but you patch it with the PRs. Then run update.php if needed by the patch(es). 

There are different ways to patch Backdrop. Typically, this is what I do. Say you want to patch it with this PR: https://github.com/backdrop/backdrop/pull/4690

  1. Open the URL above adding .diff at the end, as in https://github.com/backdrop/backdrop/pull/4690.diff
  2. That will show a text document. Save it to the root of your Backdrop installation (call the file "4690.diff")
  3. Using shell access, go to the root o your B installation
  4. Run the command patch -p1 <4690.diff  
  5. That's it. That will apply that patch to your backdrop codebase. Notice the "<" - it's needed for that command to run correctly.

 

@argiepiano, thanks for the procedure.

I actually meant that I needed to update Backdrop because my site is still at 1.27.0 and 1.27.1 has been released. And then I wanted to add the patches from the PR's -- so your answer is perfect for that part.

I was pondering doing it via git but this looks easier. :)

ETA: Yes, I saw that it's a shell redirect. :)

Slight improvement to @argiepiano's procedure. Again for PR 4690, it would be:

  1. Using shell access, go to the Backdrop doc root.
  2. Run this command to get the diff file:  wget https://github.com/backdrop/backdrop/pull/4690.diff
  3. Run the command: patch -p1 < 4690.diff
  4. After checking that all works, remove the patch file(s).