Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
global ui, hg
from mercurial import ui, hg
use_mercurial_glob = True
except ImportError:
d = Diagnostic(
message=format_traceback_and_exception(),
level='warning',
source='mercurial'
)
to_parent.write(encode_result([], [d], None))
to_parent.flush()
configs = {}
if options.config is not None:
with open(options.config, 'rb') as f:
for section, contents in bser.loads(f.read()).iteritems():
for field, value in contents.iteritems():
configs[(section, field)] = value
ignore_paths = []
if options.ignore_paths is not None:
with open(options.ignore_paths, 'rb') as f:
ignore_paths = [make_glob(i) for i in bser.loads(f.read())]
buildFileProcessor = BuildFileProcessor(
project_root,
cell_roots,
options.build_file_name,
options.allow_empty_globs,
options.ignore_buck_autodeps_files,
options.no_autodeps_signatures,
watchman_client,
def _loads(self, response):
""" Parse the BSER packet """
return bser.loads(
response,
True,
value_encoding=encoding.get_local_encoding(),
value_errors=encoding.default_local_errors,
)