B2G/Hacking: Difference between revisions

Jump to navigation Jump to search
Line 129: Line 129:
Patches generated using git diff are not suitable for checkin-needed, since they're missing the appropriate hg author and commit-message headers.  The output of <code>git format-patch</code> (the equivalent of <code>hg export</code>) is also not suitable for checkin-needed, because hg can't read git's author and commit-message headers.
Patches generated using git diff are not suitable for checkin-needed, since they're missing the appropriate hg author and commit-message headers.  The output of <code>git format-patch</code> (the equivalent of <code>hg export</code>) is also not suitable for checkin-needed, because hg can't read git's author and commit-message headers.


One way to generate a checkin-needed patche using git is to generate a file using <code>git format-patch -U8 -M -C</code> and then run it through <code>git patch-to-hg-patch</code> from [https://github.com/jlebar/moz-git-tools moz-git-tools].  (I'd accept pull-requests to streamline this process.)
One way to generate a checkin-needed patche using git is to generate a file using <code>git format-patch -U8 --patience -M -C</code> and then run it through <code>git patch-to-hg-patch</code> from [https://github.com/jlebar/moz-git-tools moz-git-tools].  (I'd accept pull-requests to streamline this process.)


Alternatively, if you attach your patches using <code>git bz attach</code> from [https://github.com/jlebar/moz-git-tools moz-git-tools], the patches will automagically have the correct format.
Alternatively, if you attach your patches using <code>git bz attach</code> from [https://github.com/jlebar/moz-git-tools moz-git-tools], the patches will automagically have the correct format.
187

edits

Navigation menu