Importing a patch from Bugzilla and removing old patches
-
0:01 - 0:03In this video, we're going to learn how to import a patch that someone else created.
-
0:03 - 0:06I'm going to show you 2 different ways to do this.
-
0:06 - 0:10One is from the local file system, and one is directly from a bug in bugzilla.
-
0:10 - 0:14So let's say we're doing a review, and I want to test someone else's functionality.
-
0:14 - 0:17Or perhaps I just want to import someone's patch, to have it locally.
-
0:17 - 0:21So what I can do is I can go to the bug in Bugzilla.
-
0:21 - 0:24For example 924900
-
0:24 - 0:27And I can go down to the attachments section right here.
-
0:27 - 0:32And I can right click, and save link as...
-
0:32 - 0:36And I'm just going to save it to the Downloads folder.
-
0:36 - 0:39And it says downloads complete.
-
0:39 - 0:42So next I'm going to open up the terminal.
-
0:42 - 0:47And I'm going to type hg qimport
-
0:47 - 0:50and that's going to import the patch directly in my patch queue.
-
0:50 - 0:53And all you do is you specify the location of the patch.
-
0:53 - 1:03So in my home directory, downloads, bug924900_removeSyncSetup.diff
-
1:03 - 1:04And I'm going to press enter.
-
1:04 - 1:10And you can see that it says: Adding bug blah blah blah to series file.
-
1:10 - 1:11OK.
-
1:11 - 1:13now I do hg qapplied.
-
1:13 - 1:16And it shows that nothing is yet applied.
-
1:16 - 1:18But it is in my series.
-
1:18 - 1:20So when I do hg qpush
-
1:20 - 1:25You'll see that it's applying that bug that we just imported.
-
1:25 - 1:29And when I do hg qapplied now, it's there now.
-
1:29 - 1:33So what I'm going to do now is I'm going to show you the second way.
-
1:33 - 1:36So first I'm just going to clear the terminal.
-
1:36 - 1:41And I'm just going to remove that bug now.
-
1:41 - 1:44So first you can do hg qpop
-
1:44 - 1:49And the reason I'm removing this patch is just so that I can get it directly from the web again.
-
1:49 - 1:56And you can actually use hg qremove and specify the bug number, as long as it's not applied already.
-
1:56 - 1:59And since we just popped it's not applied.
-
1:59 - 2:02So hg qremove, specify the bug, press enter.
-
2:02 - 2:04And it's gone now.
-
2:04 - 2:10So I'm going to go back to the web browser, and this time instead of downloading I'm just going to right click.
-
2:10 - 2:12And I'm going to copy link location.
-
2:12 - 2:15And then I'm going to go back to the terminal.
-
2:15 - 2:23And I'm going to do hg qimport and what you can do is you can just paste the link there.
-
2:23 - 2:36And then you specify -n and then the patch name, so bug924900.diff let's say.
-
2:36 - 2:38Hit enter.
-
2:38 - 2:40And it's there.
-
2:40 - 2:42So I can press hg qpush now.
-
2:42 - 2:45And it applies it in the same way.
-
2:45 - 2:50Now the reason why you need to specify the -n with the bug name when you do it this way.
-
2:50 - 2:54Is because it doesn't determine the patch name properly.
-
2:54 - 2:57And I believe it's just because of this query parameter there.
-
2:57 - 2:59And that's all I have for this video.
- Title:
- Importing a patch from Bugzilla and removing old patches
- Description:
-
Firefox development tutorial for importing remote patches and removing local patches.
http://codefirefox.comHelp us caption & translate this video!
http://amara.org/v/DRh9/
- Video Language:
- English
- Duration:
- 02:59
Brian Bondy edited English subtitles for Importing a patch from Bugzilla and removing old patches |