Tip:
Highlight text to annotate it
X
So to get code landed into Firefox, you first need to make a change,
and then make a patch file with that change in it.
This video is going to basically show you how to create such a patch file.
A patch file is basically a collection of changes to the source code.
And these changes are usually uploaded to a bug in Bugzilla, reviewed by a trusted developer,
and then eventually landed into Firefox.
So the first thing we're going to do is make a change to the source code.
And I'm going to pretend that I'm just working off of a bug with an ID of 123456.
So I'm going to go ahead and open up the source code.
And I'm going to pretend that bug, with ID 123456, basically has a function that has too much whitespace.
And it's asking us to remove that whitespace.
So you can look down here, this function below only has 2 spaces, this one has a bunch more on line 57.
So I'm going to reduce those spaces to 2.
And I'm going to go ahead and save that.
And now what I'm going to do is I'm going to type hg qnew bug123456
Because that's the imaginary bug ID we were talking about.
And I usually just name it with a little description after too, and I usually give it a .diff extension.
Also you can pass -m and this is basically a message that will be included in the patch.
And the format for that is basically the same, Bug 123456 - and then you just give a description of what's being changed in the patch.
So I'm just putting Whitespace changes in browser.js
And I hit enter.
So that created a patch file, right now you have no idea where that patch file is.
But if you go look in .hg/patches/
You'll see that there's a .diff file right there right there.
And we can actually go and open up that file to see what it looks like.
Alright here we are, and we can see at the very top it has some patch headers.
It has the name, and it has a description that we entered.
And when we scroll down, you'll see that this little minus here shows that there's a removal of one line,
and the + shows that there's an addition of one line.
And that's all!
Subtitles by the Amara.org community