In this video, we're going to learn how to import a patch that someone else created.
I'm going to show you 2 different ways to do this.
One is from the local file system, and one is directly from a bug in bugzilla.
So let's say we're doing a review, and I want to test someone else's functionality.
Or perhaps I just want to import someone's patch, to have it locally.
So what I can do is I can go to the bug in Bugzilla.
For example 924900
And I can go down to the attachments section right here.
And I can right click, and save link as...
And I'm just going to save it to the Downloads folder.
And it says downloads complete.
So next I'm going to open up the terminal.
And I'm going to type hg qimport
and that's going to import the patch directly in my patch queue.
And all you do is you specify the location of the patch.
So in my home directory, downloads, bug924900_removeSyncSetup.diff
And I'm going to press enter.
And you can see that it says: Adding bug blah blah blah to series file.
OK.
now I do hg qapplied.
And it shows that nothing is yet applied.
But it is in my series.
So when I do hg qpush
You'll see that it's applying that bug that we just imported.
And when I do hg qapplied now, it's there now.
So what I'm going to do now is I'm going to show you the second way.
So first I'm just going to clear the terminal.
And I'm just going to remove that bug now.
So first you can do hg qpop
And the reason I'm removing this patch is just so that I can get it directly from the web again.
And you can actually use hg qremove and specify the bug number, as long as it's not applied already.
And since we just popped it's not applied.
So hg qremove, specify the bug, press enter.
And it's gone now.
So I'm going to go back to the web browser, and this time instead of downloading I'm just going to right click.
And I'm going to copy link location.
And then I'm going to go back to the terminal.
And I'm going to do hg qimport and what you can do is you can just paste the link there.
And then you specify -n and then the patch name, so bug924900.diff let's say.
Hit enter.
And it's there.
So I can press hg qpush now.
And it applies it in the same way.
Now the reason why you need to specify the -n with the bug name when you do it this way.
Is because it doesn't determine the patch name properly.
And I believe it's just because of this query parameter there.
And that's all I have for this video.