当前位置: 首页>>代码示例>>Python>>正文


Python SCMDetector.display_name方法代码示例

本文整理汇总了Python中webkitpy.common.checkout.scm.detection.SCMDetector.display_name方法的典型用法代码示例。如果您正苦于以下问题:Python SCMDetector.display_name方法的具体用法?Python SCMDetector.display_name怎么用?Python SCMDetector.display_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在webkitpy.common.checkout.scm.detection.SCMDetector的用法示例。


在下文中一共展示了SCMDetector.display_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: check

# 需要导入模块: from webkitpy.common.checkout.scm.detection import SCMDetector [as 别名]
# 或者: from webkitpy.common.checkout.scm.detection.SCMDetector import display_name [as 别名]
    def check(self, patch_string, fs=None):
        """Check style in the given patch."""
        fs = fs or FileSystem()
        patch_files = DiffParser(patch_string.splitlines()).files

        # If the user uses git, checking subversion config file only once is enough.
        call_only_once = True

        for path, diff_file in patch_files.iteritems():
            line_numbers = diff_file.added_or_modified_line_numbers()
            _log.debug('Found %s new or modified lines in: %s' % (len(line_numbers), path))

            if not line_numbers:
                match = re.search("\s*png$", path)
                if match and fs.exists(path):
                    if call_only_once:
                        self._text_file_reader.process_file(file_path=path, line_numbers=None)
                        cwd = FileSystem().getcwd()
                        detection = SCMDetector(fs, Executive()).detect_scm_system(cwd)
                        if detection.display_name() == "git":
                            call_only_once = False
                    continue
                # Don't check files which contain only deleted lines
                # as they can never add style errors. However, mark them as
                # processed so that we count up number of such files.
                self._text_file_reader.count_delete_only_file()
                continue

            self._text_file_reader.process_file(file_path=path, line_numbers=line_numbers)
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:31,代码来源:patchreader.py


注:本文中的webkitpy.common.checkout.scm.detection.SCMDetector.display_name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。