[diffoscope] 01/06: added jobs flag
Juliana Oliveira
jwnx-guest at moszumanska.debian.org
Tue Jan 9 05:04:26 CET 2018
This is an automated email from the git hooks/post-receive script.
jwnx-guest pushed a commit to branch jwnx_parallel_diffoscope
in repository diffoscope.
commit e922da64b939f766a9500808411f65df4659bffa
Author: Juliana Oliveira <juliana.orod at gmail.com>
Date: Mon Jan 8 21:27:03 2018 -0200
added jobs flag
---
diffoscope/config.py | 1 +
diffoscope/main.py | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/diffoscope/config.py b/diffoscope/config.py
index db6b3af..430844a 100644
--- a/diffoscope/config.py
+++ b/diffoscope/config.py
@@ -54,6 +54,7 @@ class Config(object):
compute_visual_diffs = False
max_container_depth = 50
force_details = False
+ jobs = 2
_singleton = {}
diff --git a/diffoscope/main.py b/diffoscope/main.py
index 4868758..b8fb09d 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -90,6 +90,9 @@ def create_parser():
'stdin is a tty, otherwise no.')
parser.add_argument('--no-default-limits', action='store_true', default=False,
help='Disable most default output limits and diff calculation limits.')
+ parser.add_argument('--jobs', metavar='JOBS', dest='jobs', type=int,
+ help='comparisons to run simultaneously (default to CPU count)',
+ default=Config().jobs)
group1 = parser.add_argument_group('output types')
group1.add_argument('--text', metavar='OUTPUT_FILE', dest='text_output',
@@ -363,6 +366,7 @@ def run_diffoscope(parsed_args):
Config().fuzzy_threshold = parsed_args.fuzzy_threshold
Config().new_file = parsed_args.new_file
Config().excludes = parsed_args.excludes
+ Config().jobs = parsed_args.jobs
Config().exclude_commands = parsed_args.exclude_commands
Config().exclude_directory_metadata = parsed_args.exclude_directory_metadata
Config().compute_visual_diffs = PresenterManager().compute_visual_diffs()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list