Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PRBool to bool conversion

45 views
Skip to first unread message

Michael Wu

unread,
Sep 16, 2011, 7:45:05 PM9/16/11
to dev-pl...@lists.mozilla.org
Hi,

We're almost ready to convert from PRBool to bool. (Bug 675553 and Bug 681188 for comm-central)

The current plan is to close mozilla-central, mozilla-incoming, and comm-central at 10pm PST on September 28th. This is the day after m-c merges to aurora so this change can get as much testing as possible before release. Comm-central will also be converted to bool at the same time. Trees will reopen as soon as things look green.

You will be able to unbitrot patches in your queue with this bash script:
https://people.mozilla.com/~mwu/convert.sh

Run this script in the top level directory of your repo with all patches popped. It will backup your .hg/patches directory to patches-backup.tar.gz and then run the appropriate sed script on all the files in .hg/patches. Hopefully you do not have any patches named PRBool or PRPackedBool.
The script is not perfect and may have issues in C code, code in security/manager, and code that's near Preferences::GetBool.

The sed script is fairly conservative with replacing PR_TRUEs and PR_FALSEs, so you may want to do an additional s/PR_TRUE/true/g and s/PR_FALSE/false/g on your patches afterwards.

The individual sed scripts are available if you want to run it on other patches.

Windows & Linux:
https://bug681188.bugzilla.mozilla.org/attachment.cgi?id=560638

OSX:
https://bug681188.bugzilla.mozilla.org/attachment.cgi?id=560639

Running sed on a patch:

Linux & OSX:
sed -i.old -f replace.sed $PATCHFILE

Windows (Bug 373784):
cp $PATCHFILE $PATCHFILE.old &&
sed -f replace.sed $PATCHFILE.old > $PATCHFILE

Thanks,
-Michael Wu

Justin Wood (Callek)

unread,
Sep 17, 2011, 5:21:15 AM9/17/11
to
On 9/16/2011 7:45 PM, Michael Wu wrote:
> Hi,
>
> We're almost ready to convert from PRBool to bool. (Bug 675553 and Bug 681188 for comm-central)
>
> The current plan is to close mozilla-central, mozilla-incoming, and comm-central at 10pm PST on September 28th. This is the day after m-c merges to aurora so this change can get as much testing as possible before release. Comm-central will also be converted to bool at the same time. Trees will reopen as soon as things look green.

Just to be clear, the best way to close comm-central is to close both
ThunderbirdTrunk and SeaMonkey tree's. As otherwise stuff can still land
in suite/* if seamonkey is open, or elsewhere if ThunderbirdTrunk is open.

Thanks for the heads up though!

--
~Justin Wood (Callek)
0 new messages