- Basic JS analysis for DXR
- Index multiple trees (starting with comm-central and mozilla-aurora, the most commonly used ones on MXR)
- Flexible, CORRECT deployment framework for DXR and others, to be factored out as Shiva. Goals: https://github.com/erikrose/shiva/tree/fast-burn#shiva
- Socorro or L10n or other team priorities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def full_traceback(callable, *args, **kwargs): | |
"""Work around the wretched exception reporting of concurrent.futures. | |
Futures generally gives no access to the traceback of the task; you get | |
only a traceback into the guts of futures, plus the description line of | |
the task's traceback. We jam the full traceback of any exception that | |
occurs into the message of the exception: disgusting but informative. | |
""" | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DXR] | |
a = 1 | |
b = 2 | |
[some_tree] | |
source_folder = PWD/code | |
object_folder = PWD/code | |
build_command = make clean; make -j $jobs | |
[another_tree] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from parsimonious import Grammar # Get Parsimonious from https://pypi.python.org/pypi/parsimonious/. | |
# This recognizes a subset of Python's regex language, minus lookaround | |
# assertions, non-greedy quantifiers, and named and other special sorts of | |
# groups. Lucene doesn't support those, though we might be able to fake it | |
# later via some transformation. | |
regex_grammar = Grammar(r""" | |
regexp = branch another_branch* | |
branch = piece* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from itertools import chain | |
import random | |
from random import randint | |
from time import sleep, time | |
from blessings import Terminal | |
t = Terminal() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from subprocess import check_output | |
from sys import argv | |
def main(): | |
user, branch = argv[1].split(':') | |
check_output('hub fetch %s' % user, shell=True) | |
check_output('git checkout %s/%s' % (user, branch), shell=True) | |
print 'Now reviewing %s:%s.' % (user, branch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@dstufft makes the point that fred==1.0.1 could represent fred…tar.gz, | |
fred…zip, or fred…wheel, etc. Right now, we don't care about the extension; we | |
just extract the package name from the downloaded file by means of a cheesy | |
heuristic. But what if an index entry makes available both a zip and a tarball? | |
Which does pip favor? With the current syntax, we support only a single hash. I | |
suppose we could count on pip keeping its format-favoring behavior stable over | |
time. Are we going to have a problem here? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from json import dumps | |
>>> u = u'jörg' | |
>>> e = u.encode('utf-8') | |
>>> dumps(u) | |
'"j\\u00f6rg"' | |
>>> dumps(e) | |
'"j\\u00f6rg"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def do_stuff(thing): | |
config = { | |
2: {'message': "Flibbety jibbet!"}, | |
4: {'message': "A!\nFlibbety jibbet!"}, | |
5: {'message': "B!\nFlibbety jibbet!"}, | |
7: {'message': "C!", 'run_funcs': False}, | |
} | |
if thing not in config: | |
return | |
print config[thing]['message'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def do_stuff(thing): | |
if thing == 2: | |
print "Flibbety jibbet!" | |
render_golfclubs() | |
sneeze_loudly(True) | |
do_other_stuff() | |
if thing == 4: | |
print "A!" | |
print "Flibbety jibbet!" |