Run the repository log command

        Returns:
            str: output of log command (``svn log -l <n> <--kwarg=value>``)
338864
def log(self, n=None, template=None, **kwargs):
        
        cmd = ['svn', 'log']
        if n:
            cmd.append('-l%d' % n)
        cmd.extend(
            (('--%s=%s' % (k, v)) for (k, v) in kwargs.items())
        )
        return self.sh(cmd, shell=False)
1088340
def log(arg, base=None):
    
    op = ops.Log(arg, base)
    return op.to_expr()
711085
def execute_and_report(command, *args, **kwargs):
    
    logging.info("Execute: %s %s" % (command, " ".join(args)))
    try:
        status, out, err = execute(command, *args, **kwargs)
        if status == 0:
            logging.info(
                "%s Finished successfully. Exit Code: 0.",
                os.path.basename(command),
            )
            return True
        else:
            try:
                logging.error(
                    "%s failed! Exit Code: %s\nOut: %s\nError: %s",
                    os.path.basename(command),
                    status,
                    out,
                    err,
                )
            except Exception as e:
                # This fails when some non ASCII characters are returned
                # from the application
                logging.error(
                    "%s failed [%s]! Exit Code: %s\nOut: %s\nError: %s",
                    e,
                    os.path.basename(command),
                    status,
                    repr(out),
                    repr(err),
                )
            return False
    except Exception:
        logging.exception(
            "%s failed! Exception thrown!", os.path.basename(command)
        )
        return False
425004
def run(self, arguments=None):
        """"""
        LogFileTool.run(self, arguments)

        for i, self.logfile in enumerate(self.args['logfile']):
            if i > 0:
                print("\n ------------------------------------------\n")

            if self.logfile.datetime_format == 'ctime-pre2.4':
                # no milliseconds when datetime format doesn't support it
                start_time = (self.logfile.start.strftime("%Y %b %d %H:%M:%S")
                              if self.logfile.start else "unknown")
                end_time = (self.logfile.end.strftime("%Y %b %d %H:%M:%S")
                            if self.logfile.start else "unknown")
            else:
                # include milliseconds
                start_time = (self.logfile.start.strftime("%Y %b %d "
                                                          "%H:%M:%S.%f")[:-3]
                              if self.logfile.start else "unknown")
                end_time = (self.logfile.end.strftime("%Y %b %d "
                                                      "%H:%M:%S.%f")[:-3]
                            if self.logfile.start else "unknown")

            print("     source: %s" % self.logfile.name)
            print("       host: %s"
                  % (self.logfile.hostname + ':' + str(self.logfile.port)
                     if self.logfile.hostname else "unknown"))
            print("      start: %s" % (start_time))
            print("        end: %s" % (end_time))

            # TODO: add timezone if iso8601 format
            print("date format: %s" % self.logfile.datetime_format)
            print("     length: %s" % len(self.logfile))
            print("     binary: %s" % (self.logfile.binary or "unknown"))

            version = (' -> '.join(self.logfile.versions) or "unknown")

            # if version is unknown, go by date
            if version == 'unknown':
                if self.logfile.datetime_format == 'ctime-pre2.4':
                    version = '< 2.4 (no milliseconds)'
                elif self.logfile.datetime_format == 'ctime':
                    version = '>= 2.4.x ctime (milliseconds present)'
                elif (self.logfile.datetime_format == "iso8601-utc" or
                      self.logfile.datetime_format == "iso8601-local"):
                    if self.logfile.has_level:
                        version = '>= 3.0 (iso8601 format, level, component)'
                    else:
                        version = '= 2.6.x (iso8601 format)'

            print("    version: %s" % version)
            print("    storage: %s"
                  % (self.logfile.storage_engine or 'unknown'))

            # now run all sections
            for section in self.sections:
                if section.active:
                    print("\n%s" % section.name.upper())
                    section.run()
18843
def run(self, raw_args=None):
		
		args = self.parser.parse_args(raw_args)

		core = Core()

		try:
			report = core.lint(**vars(args))
		except Exception as err:
			self.parser.error(str(err))

		print(report)
		self.parser.exit()
639469
def log(self, *args):
        '''
        
        '''
        if len(args):
            self._log = args[0]
        else:
            return self._log
515219
def run(self):
        """"""
        sha = VersionUtils.run_git_command(["rev-parse", "HEAD"], self.git_dir)
        tag = self.distribution.get_version()

        if self.has_tag(tag, sha):
            tags_sha = VersionUtils.run_git_command(["rev-parse", tag], self.git_dir)
            if sha != tags_sha:
                logger.error(
                    "git tag {0} sha does not match the sha requesting to be tagged, you need to increment the version number, Skipped Tagging!".format(
                        tag
                    )
                )
                return
            else:
                logger.info(
                    "git tag {0} already exists for this repo, Skipped Tagging!".format(
                        tag
                    )
                )
                return

        logger.info("Adding tag {0} for commit {1}".format(tag, sha))
        if not self.dry_run:
            VersionUtils.run_git_command(
                ["tag", "-m", '""', tag, sha], self.git_dir, throw_on_error=True
            )
            logger.info("Pushing tag {0} to remote {1}".format(tag, self.remote))
            VersionUtils.run_git_command(
                ["push", self.remote, tag], self.git_dir, throw_on_error=True
            )
768976
def run(cls):
        
        sigint_handler.override()
        # set settings.USE_CACHE before constructing parser, since constructing
        # parser requires loaded assistants
        settings.USE_CACHE = False if '--no-cache' in sys.argv else True
        cls.register_console_logging_handler(logger.logger)
        is_log_file = logger.add_log_file_handler(settings.LOG_FILE)
        if not is_log_file:
            logger.logger.warning("Could not create log file '{0}'.".format(settings.LOG_FILE))
        cls.inform_of_short_bin_name(sys.argv[0])
        top_assistant = bin.TopAssistant()
        tree = top_assistant.get_subassistant_tree()
        argparser = argparse_generator.ArgparseGenerator.\
            generate_argument_parser(tree, actions=actions.actions)
        parsed_args = vars(argparser.parse_args())

        parsed_args_decoded = dict()
        for k, v in parsed_args.items():
            parsed_args_decoded[k] = \
                v.decode(utils.defenc) if not six.PY3 and isinstance(v, str) else v
        parsed_args_decoded['__ui__'] = 'cli'

        if parsed_args.get('da_debug'):
            cls.change_logging_level(logging.DEBUG)

        # Prepare Action/PathRunner
        if actions.is_action_run(**parsed_args_decoded):
            to_run = actions.get_action_to_run(**parsed_args_decoded)(**parsed_args_decoded)
        else:
            parsed_args = cls.transform_executable_assistant_alias(parsed_args_decoded)
            path = top_assistant.get_selected_subassistant_path(**parsed_args_decoded)
            to_run = path_runner.PathRunner(path, parsed_args_decoded)

        try:
            to_run.run()
        except exceptions.ExecutionException:
            # error is already logged, just catch it and silently exit here
            sys.exit(1)
197125
def run(self, args=None):
        

        args = args or self.parser.parse_args()

        if args.debug:
            logging.basicConfig(level=logging.DEBUG)

        if args.version:
            print(version.VERSION)
            sys.exit(0)
669450
def _run(cmd, suppress_errors=False, suppress_output=False):
    
    if is_verbose():
        logger.debug('Executing: "%s"', format(cmd))
    process = subprocess.Popen(
        cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

    stderr_log_level = logging.NOTSET if suppress_errors else logging.ERROR
    stdout_log_level = logging.NOTSET if suppress_output else logging.DEBUG

    stdout_thread = PipeReader(
        process.stdout, process, logger, stdout_log_level)
    stderr_thread = PipeReader(
        process.stderr, process, logger, stderr_log_level)

    stdout_thread.start()
    stderr_thread.start()

    while process.poll() is None:
        time.sleep(PROCESS_POLLING_INTERVAL)

    stdout_thread.join()
    stderr_thread.join()

    process.aggr_stdout = stdout_thread.aggr
    process.aggr_stderr = stderr_thread.aggr

    return process
900771
def cmd_log(self, reopen=False, rotate=False):
        
        cmd = b''

        if reopen:
            cmd += b'l'

        if rotate:
            cmd += b'L'

        return self.send_command(cmd)
783083
def run(self):
        
        qclog = open(self.qclog_file, 'w')
        p = subprocess.Popen(self.current_command, stdout=qclog)
        return p
1066727
def run(configuration: str, level: str, target: str, short_format: bool):
    """"""
    initialise_logging(level=level, target=target, short_format=short_format)
    logger = logging.getLogger(__package__)
    logger.info('COBalD %s', cobald.__about__.__version__)
    logger.info(cobald.__about__.__url__)
    logger.info('%s %s (%s)', platform.python_implementation(), platform.python_version(), sys.executable)
    logger.debug(cobald.__file__)
    logger.info('Using configuration %s', configuration)
    with load(configuration):
        logger.info('Starting daemon services...')
        runtime.accept()
1290510
def run(**kwargs):
    """"""
    paths = kwargs.pop('paths', ())
    action = kwargs.pop('action')
    plugin = kwargs.pop('plugin')
    junit_xml = kwargs.pop('junit_xml')
    use_tracked_files = kwargs.pop('use_tracked_files')
    quiet = kwargs.pop('quiet')

    colorama.init(strip=kwargs.pop('no_color'))

    git_dir = current_git_dir()

    if git_dir is None:
        output(NOT_GIT_REPO_MSG)
        exit(1)

    repo_root = os.path.dirname(git_dir)

    files = []
    if paths:
        # We want to look at files in their current state if paths are passed through
        kwargs['include_unstaged_changes'] = True

        # If paths were provided get all the files for each path
        for path in paths:
            for f in list_files(path):
                f = os.path.relpath(f, repo_root)
                if not f.startswith('..'):  # Don't include files outside the repo root.
                    files.append(f)
    elif use_tracked_files:
        # If the use tracked files flag was passed, get a list of all the tracked files
        out, err, code = git.ls_files()
        files = out.splitlines()

        if kwargs.get('include_untracked'):
            out, err, code = git.ls_files(o=True, exclude_standard=True)
            files += out.splitlines()

    if files or paths:
        kwargs['files'] = files

    config = get_config(repo_root)
    runner = Runner(config.cwd, **kwargs)
    results = ResultCollection()

    if runner.unstaged_changes and not quiet:
        output(UNSTAGED_CHANGES_MSG, end='\n\n')

    processes = list(config.actions) + list(config.plugins)
    processes.sort(key=lambda x: x.name)  # Sort the list of processes for consistent results

    if plugin:
        try:
            processes = [config.plugins.get(plugin)]
        except config.plugins.DoesNotExist as e:
            output('{}\nAvailable plugins:'.format(e.message))

            for p in config.plugins:
                output(p.name)
            exit(1)

    if action:
        try:
            processes = [config.actions.get(action)]
        except config.actions.DoesNotExist as e:
            output('{}\nAvailable actions:'.format(e.message))

            for a in config.actions:
                output(a.name)
            exit(1)

    for process in processes:
        result, message = runner.run_process(process)
        results.append(result)

        if not quiet:
            output(message)

    if junit_xml:
        with open(junit_xml, 'w+') as f:
            f.write('{}'.format(results.dump_junit()))

    if not quiet:
        output(results.dump())
        output('#{{bright}}{}\nCompleted in: {}s'.format(''.ljust(79, '-'), round(results.execution_time, 2)))

    if results.has_error:
        exit(1)
    elif results.has_failure:
        exit(2)
918856
def _commit_run_log(self):
        "
        logger.debug('Committing run log for job {0}'.format(self.name))
        self.backend.commit_log(self.run_log)
763776
def runu(command, timeout=30, withexitstatus=False, events=None,
        extra_args=None, logfile=None, cwd=None, env=None, **kwargs):
    
    kwargs.setdefault('encoding', 'utf-8')
    return run(command, timeout=timeout, withexitstatus=withexitstatus,
                events=events, extra_args=extra_args, logfile=logfile, cwd=cwd,
                env=env, **kwargs)
626439
def run_output(self):
        """"""
        for f in logdissect.output.__formats__:
            ouroutput = self.output_modules[f]
            ouroutput.write_output(self.data_set['finalized_data'],
                    args=self.args)
            del(ouroutput)

        # Output to terminal if silent mode is not set:
        if not self.args.silentmode:
            if self.args.verbosemode:
                print('\n==== ++++ ==== Output: ==== ++++ ====\n')
            for line in self.data_set['finalized_data']['entries']:
                print(line['raw_text'])