Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A stale patch means one that used to apply cleanly to the latest Clojure master version, but due to commits made since the patch was created, it no longer does.  In particular, the command:

Code Block
languagebashnone
% git am --keep-cr -s < patch_file

...

To apply such a patch, the 'patch' program by Larry Wall is extremely useful.  It comes preinstalled with Mac OS X and most Linux distributions.  You can easily install it with Cygwin for Windows.

Code Block
languagebashnone
% patch -p1 < patch_file

The output will give you some hints of whether each "hunk" of the patch file succeeded or failed.  If they all succeed, then likely the only thing wrong with the patch file is that a few context lines were changed.  If any hunks fail, patch creates files ending with ".rej" containing rejected hunks that it did not apply, and you can focus on those as places where the source code likely changed more significantly.  A command like this will find them all:

Code Block
languagebashnone
% find . -name '*.rej'

You will need to look at those rejected hunks, perhaps think about them for a bit to see if and how they still apply, and apply them by hand-editing the source code yourself.

When recreating a new git format patch with:

Code Block
languagebashnone
% git format-patch master --stdout > patch_file

...