Skip to content

Instantly share code, notes, and snippets.

@Pike
Pike / l10n_impact.py
Created December 21, 2011 00:05
Mercurial extension to review the l10n impact between two revisions
# Copyright 2011 Mozilla Foundation
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from mercurial import hg, commands
from mercurial.match import match as _match
from mercurial.node import nullid
from mercurial.copies import copies as _copies
@Pike
Pike / profile.py
Created August 17, 2011 12:14
profile decorator, comes with no warranty or support, other than that I used it in some way before.
import hotshot
import os
import time
import settings
try:
PROFILE_LOG_BASE = settings.PROFILE_LOG_BASE
except:
PROFILE_LOG_BASE = "/tmp"
@Pike
Pike / aurora_review.py
Created May 10, 2011 10:20
Axel's hack to review aurora sign-offs, with multi-diffs for disconnected changesets
from shipping.models import *
from life.models import Changeset
from shipping.views import _signoffs
difft = 'https://l10n-stage-sj.mozilla.org/shipping/diff?repo=%s&from=%s&to=%s'
aurorabase='releases/l10n/mozilla-aurora/'
app = 'fennec'
av=AppVersion.objects.get(code=app+'-aurora')
sos=_signoffs(av,getlist=True)
m401=Milestone.objects.get(code=app+'4.0.1')
sos4=m401.signoffs