Sync from HG (v2.4 milestone)