Showing posts with label mercurial. Show all posts
Showing posts with label mercurial. Show all posts

Monday, September 20, 2010

Testing patches from Bugzilla

I just started using MQ (Mercurial Queues). Now that I've tried it I can't imagine ever using a mercurial repo without it! I know that sounds a bit cliche, like something out of a commercial, but it's true!

Here's how to test patches from bugzilla. With MQ you can apply the patches, test them and then remove them with ease if you want to revert back to trunk code. Well the main purpose of MQ is to help with code development so that you can write new patches, edit, update, and remove when needed. But there is also times you want to test someone else's patches, for example from a bug on Bugzilla, in this case too MQ can help.

How to test patches using MQ.. (updated 23.09.2010)

- First make sure you have MQ installed. MQ is a Mercurial extension. Make sure you have MQ setup by following the Mozilla MQ guide ( https://developer.mozilla.org/en/Mercurial_Queues ).

- Now you can use either method 1 or method 2 below to import the patches to MQ..

Mtd 1:

hg qimport -n name-of-patch patch-url
(patch-url will be the atachment url from bugzilla)

Mtd2:

A more convenient method is to use the qimportbz extension which will allow you to import patches directly from the Bug# http://robarnold.org/hg-qimport-my-bugzilla-patch-redux/

After setting up qimportbz extension do:

hg qimport bz://xxxxxx
(xxxxxx is the bug number on bugzilla)

When a list of patches is displayed enter the numbers of the patches you want with a space in between. The first patch applied will be named with the bugnumber (you can rename this later in the .hg/patches folder). The qimport extension will attempt to name all the following patches with the same name and give the error..

A patch file named 'bug-xxxxxx.diff' already exists in your patch directory. Rename patch 'abcdef' (yyyyyy) (r)/overwrite (o)?

Hit enter and give a new name for the patch. Continue for all the remaining patches until importing is complete.

-After importing the patch(es)..

hg qpush name-of-patch
(apply the patch to MQ. you can use -a option to apply all the patches at once)

Test the patch(es)

hg qpop
(removes patches from the top of the queue)

For a quick lookat MQ commands see http://mercurial.selenic.com/wiki/MqExtension

Thursday, July 8, 2010

Sync services become part of the mozilla platform

With Bug 571902 the weave sync services have now been integrated into the mozilla platform by the weave developer team. The sync code can now be found in the mozilla-central repo under services/. Look forward to seeing Seamonkey include sync as a service in a future release. My GSoC project mentor KaiRo has reported Bug 576970 to get the sync UI ported into Seamonkey (comm-central repo). Although landing sync code in mozilla platform means the application specific code has been separated (mainly ui code) there is still app-specific code in the services/sync which is why I still need my tabs sync patch for Seamonkey to be approved by the Weave team.

Work done last week:

1. Updated my patch for getting tabs sync to work in Seamonkey to include new weave code changes.

2. Started a new mercurial repo to track changes I make to the weave code.
https://bitbucket.org/hariniachala/sm-weave

Learned a lot about mercurial in the process.

3. Changed mailnews extension code to sync both feed and newsgroup mailheaders (status and tags). I am using a svn repo for the mailnews extension.
http://code.google.com/p/weave-mailnews-sync/

Work to be done:

1. Sync mailnews engine by default on application startup.
2. Create a testing plan for testing new mailnews engine in Seamonkey & Thunderbird.
3. Update mercurial repo with mailnews code.
4. Track Bug 576970 and see how sync can be ported into Seamonkey!:)

During this time I discussed with KaiRo on some aspects of the project. It was decided that all weave development for Seamonkey should be tested with Seamonkey trunk code. It was also decided to continue development of mailnews engines as a separate extension.