Return to Video

Importing a patch from Bugzilla and removing old patches

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

Help us caption & translate this video!

http://amara.org/v/DRh9/

more » « less
Video Language:
English
Duration:
02:59

English subtitles

Revisions