code
stringlengths
3
6.57k
logging.debug("LocalPaths: %s", paths)
AbsoluteLocalPaths(self)
input_api.AffectedFiles()
af.AbsoluteLocalPath()
self.AffectedFiles()
AffectedTestableFiles(self, include_deletes=None)
input_api.change.AffectedTestableFiles()
warn("AffectedTestableFiles(include_deletes=%s)
str(include_deletes)
filter(lambda x: x.IsTestableFile()
self.AffectedFiles(include_deletes=False)
AffectedTextFiles(self, include_deletes=None)
self.AffectedTestableFiles(include_deletes=include_deletes)
FilterSourceFile(self, affected_file, white_list=None, black_list=None)
AffectedFile.LocalPath()
Find(affected_file, items)
affected_file.LocalPath()
self.re.match(item, local_path)
return (Find(affected_file, white_list or self.DEFAULT_WHITE_LIST)
Find(affected_file, black_list or self.DEFAULT_BLACK_LIST)
AffectedSourceFiles(self, source_file)
InputApi.FilterSourceFile()
filter(source_file, self.AffectedTestableFiles()
RightHandSideLines(self, source_file_filter=None)
number (1-based)
return (LF or CR)
self.AffectedSourceFiles(source_file_filter)
_RightHandSideLinesImpl(files)
ReadFile(self, file_item, mode='r')
isinstance(file_item, AffectedFile)
file_item.AbsoluteLocalPath()
file_item.startswith(self.change.RepositoryRoot()
IOError('Access outside the repository root is denied.')
gclient_utils.FileRead(file_item, mode)
CreateTemporaryFile(self, **kwargs)
RemoveTemporaryFiles()
tempfile.NamedTemporaryFile()
NamedTemporaryFile()
input_api.CreateTemporaryFile()
f.write('xyz')
f.close()
CreateTemporaryFile()
TypeError('CreateTemporaryFile()
self.tempfile.NamedTemporaryFile(delete=False, **kwargs)
self._named_temporary_files.append(temp_file.name)
tbr(self)
self.change.TBRsFromDescription()
RunTests(self, tests_mix, parallel=True)
isinstance(t, OutputApi.PresubmitResult)
msgs.append(t)
issubclass(t.message, _PresubmitResult)
tests.append(t)
len(tests)
msgs.extend(self._run_tests_pool.map_async(CallCommand, tests)
get(99999)
msgs.extend(map(CallCommand, tests)
ShutdownPool(self)
self._run_tests_pool.close()
self._run_tests_pool.join()
_DiffCache(object)
__init__(self, upstream=None)
GetDiff(self, path, local_root)
NotImplementedError()
GetOldContents(self, path, local_root)
NotImplementedError()
_GitDiffCache(_DiffCache)
__init__(self, upstream)
super(_GitDiffCache, self)
__init__(upstream=upstream)
GetDiff(self, path, local_root)
re.compile('^diff --git (?P<filename>.*)
unified_diff.splitlines(keep_line_endings)
file_marker.match(x)
match.group('filename')
x.startswith('diff --git')
PresubmitFailure('Unexpected diff line: %s' % x)
current_diff.append(x)
normpath(path)
join(diff)
diffs.items()
GetOldContents(self, path, local_root)
scm.GIT.GetOldContents(local_root, path, branch=self._upstream)
AffectedFile(object)
__init__(self, path, action, repository_root, diff_cache)
logging.debug('%s(%s)
LocalPath(self)
PresubmitLocalPath()
normpath(self._path)
AbsoluteLocalPath(self)
os.path.abspath(os.path.join(self._local_root, self.LocalPath()
Action(self)
IsTestableFile(self)
NotImplementedError()
IsTextFile(self)
self.IsTestableFile()
OldContents(self)
returns (LF or CR)
self._diff_cache.GetOldContents(self.LocalPath()
splitlines()
NewContents(self)