Since we changed the source code location from 2_2_* to our current development branch. It may be of interest how to patch the code while ignoring this path change:
First create the patch you want to merge:
% git format-patch --patience --ignore-all-space --find-copies-harder -3
This will generate patches of the last 3 commits. Then you copy the patch you want into your 2_2_AS7 checkout. And do something like this:
% git apply --reject --directory=src/main -p5 --ignore-space-change 0007-HORNETQ-895-Fix-dead-lock-between-RemotingConnection.patch
The trick here is that:
So the combination of the last two described options allow you to remap the path of the files you are patching. The first one will allow a job that fails somehow to complete partially (which already helps a lot).
If anyone knows a better way to do this, please let me know.