Watching commits to mozilla-central



All timestamps are based on your local time of:

Posted by: stak
Tags: mozilla
Posted on: 2013-04-22 09:11:47

Something I've wanted for a while is a way to receive notifications of commits to specific folders in mozilla-central, with some reasonable amount of diff included. Well, turns out there are now a bunch of ways to do this, so here's a quick rundown.

  • hgweb's Atom feed - I'm only including this for completeness, but you can get an Atom feed of all changes to the repository by using the RSS icon at the bottom of any page in the repo. Unfortunately, the feed is for all changes to the repo (can't filter by particular folders/files) and doesn't include diffs, so it's limited in usefulness.
  • Dave Townsend's Hg Change Feed - Dave Townsend recently set up a more comprehensive feed system and blogged about this (see blog post or jump straight to the tree navigator to subscribe). He has it set up for comm-central, mozilla-central, and mozilla-inbound, and you can watch any folder/file in any of these repos. Pretty nifty! However, the RSS feeds don't include diffs.
  • RSS to email options - Both of the above options give you RSS or Atom feeds, but some people prefer to get this as email. IFTTT recipes are a simple way to do this; Dave Townsend set up one for the toolkit folder and Margaret created one for the mobile folder. If you use Zimbra to manage your mail, you can also use that to get RSS as email; you can set this up in the web interface when you create a new folder. As is to be expected, these options just convert the RSS item to email, and so also don't contain diffs.
  • My mailing lists - Since I really really wanted to get diffs in the email notifications, I decided to roll my own solution. I already have an Amazon EC2 instance running for ZNC, so I cloned mozilla-central there, and wrote a quick script to pull the tree, look for changes in specific folders, and send an email using Amazon SES (free for the volume I'm sending at). The email goes to a mailman instance I also set up on this domain, so anybody who is interested can sign up. Right now I have mailing lists for mobile/ and widget/android/, since that's what I'm interested in, but I can add other folders if there is sufficient demand. With this approach it requires some work on my part to set it up for specific files and folders, but I get diffs in the emails and can customize it further as I find things that would be useful. [UPDATE 2014-04: Due to general unreliability and lack of widespread use I have decommissioned these lists]


Did I miss any options? Post in the comments.

Posted by Jesse Ruderman at 2013-04-22 16:36:48
You can watch a single file in the repository with an Atom URL like this:

http://hg.mozilla.org/mozilla-central/atom-log/default/modules/libpref/src/init/all.js
[ Reply to this ]
Posted by Mook at 2013-04-22 22:47:06
If you don't mind a bit of a delay, it's also possible to catch for per-directory commits via the GitHub mirror:
https://github.com/mozilla/mozilla-central/commits/mobile/.atom

(I'd prefer HgWeb picking this up, of course, but I can't seem to figure out how to do it for a whole subdirectory...)
[ Reply to this ]
Posted by nbp at 2013-04-23 22:35:26
I had the same problem to know when I should pull changes from mercurial. Now I have a script which check the content (md5sum) of:

http://hg.mozilla.org/integration/mozilla-inbound/json-pushes?full=1

This url is used by tbpl to refresh the page when there is a new commit. As I guess I am not the only one to leave tbpl tabs open, I guess this page is likely produced by some mercurial server hook and cached by the http server.

Before that, I used "hg identify" to know what was the tip of the repository, but I left it with a small refresh rate, as this involve a secure connection which implies an exchange of key every-time my computer was looking for updates.

The good news for you is that this json file list all modified by each commit, on top of which add something to emit notifications when a commit modify some specific folders.
[ Reply to this ]

[ Add a new comment ]

 
 
(c) Kartikaya Gupta, 2004-2025. User comments owned by their respective posters. All rights reserved.
You are accessing this website via IPv4. Consider upgrading to IPv6!