Hey Everyone, it's been a long long time since I posted, however I am back, posting about a recent problem I encountered. I have been working on Reader Mode for Metro Firefox for a while now, and I am familiar with their easy to use MQ (Mercurial Queues) system.
However, I started experimenting with their Github repository, gecko-dev and tried to apply my patch on the forked repository (I hoped, sincerely hoped, but yeah you know how this story goes, don't you?).
Anyway, coming straight to the point, I was welcomed to git by a sweet message:
"git:Patch does not apply"
I looked around, and found a simple fix for this:
$git apply --reject ThePatchThatFailed.patch
Let me explain what this does. It will apply the parts of the patch that succeed to the local repository, and whatever is not applied is saved to a *.rej file.
Now you can manually fix the hunks (or in normal language, specific parts that start with @@ -1251,6 +1251,23 @@...).
Using the *.rej files to manually make changes to the local repostory is straightforward, open the rej file and the corresponding file with the same name without the .rej extension and manually add your changes to the file. Once done, you can just delete the rej file and repeat for all other rej files.
Once you finish, you can just git commit your repository and you're done! Sounds easy, right? Is there an easy way around this? Please feel free to share your opinions :)