XForms for Firefox 3.5

1 minute read

It has been quiet around Mozilla XForms for a while now. But now Beta3 of Firefox 3.5 is out and it's time to update the XForms plugin to get it released in time with the official Firefox release.

Mozilla switched from CVS to Mercurial (hg) with this release and removed the XForms extension from the core tree. We got a new hg repository, but it's still empty (http://hg.mozilla.org/xforms). So what's to do now?

  1. Convert the extensions/xforms directory from CVS to hg.
  2. Create a new hg repository on hg.mozilla.org for schema-validation and convert extensions/schema-validation to hg.
  3. Make the XForms extension build with Firefox 3.5 (there has been some cleanup work towards Mozilla2).

To get started, I did the CVS to hg conversion for XForms and schema-validatio n.The results are available at http://philipp.wagner.name/hg. I mainly followed Gijs instructions for converting Venkman, so that's the short version of how I did it:

  1. Check out existing code from CVS
    $> cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d xforms-cvs mozilla/extensions/xforms
  2. Make sure your ~/.hgrc file contains the following lines:
    [extensions]
    hgext.convert=
    mq =

    [convert]
    hg.usebranchnames=0
    hg.clonebranches=1

  3. Convert all branches
    $> hg --encoding utf8 convert xforms-cvs xforms-hg-initial
    This may take a while.
  4. Remove the [convert] section from your ~/.hgrc file
  5. Create the authors.txt file with a mapping of CVS usernames to names and e-mail addresses.
    For a list of authors use
    cd xforms-hg-initial/default && hg log | grep "user:" | sort | uniq | cut -c14- > ../../authors.txt
  6. Convert the default repository to the final XForms repository:
    $> hg --encoding utf8 convert --authors authors-merged.txt xforms-hg-initial/default/ xforms-hg-final

I chose to "merge" authors, by mapping multiple e-mail addresses to one (the current one). For schema-validation I did exactly the same and the result is available  in my hg repository.

The final step is go get it all compiling. Using hg annotate I found the relevant bug reports that changed things and I made the required changes to XForms, which resulted in the patch attached to bug #485734.

Now the XForms extension compiles and works as it did before on Firefox 3.5. What's left is to get all those outstanding patches into the code. To check it out, use

$> hg clone http://hg.mozilla.org/releases/mozilla-1.9.1 mozilla-1.9.1
cd mozilla-1.9.1
$> hg clone http://philipp.wagner.name/hg/xforms extensions/xforms
$> hg clone http://philipp.wagner.name/hg/schema-validation extensions/schema-validation

Then building works as it did before.

Categories:

Updated: