MCPcopy Index your code
hub / github.com/nodejs/node / has_content_diff

Function has_content_diff

deps/v8/tools/compare_torque_output.py:39–58  ·  view source on GitHub ↗
(dcmp)

Source from the content-addressed store, hash-verified

37 return side_list
38
39 def has_content_diff(dcmp):
40 # Check that we do not have content differences in the common files
41 _, diffs, _ = filecmp.cmpfiles(
42 dcmp.left, dcmp.right,
43 dcmp.common_files, shallow=False)
44 if diffs:
45 write("Found content differences between %s and %s\n" %
46 (dcmp.left, dcmp.right))
47 for name in diffs:
48 write("File diff %s\n" % name)
49 left_file = os.path.join(dcmp.left, name)
50 right_file = os.path.join(dcmp.right, name)
51 with open(left_file) as f1, open(right_file) as f2:
52 diff = difflib.unified_diff(
53 f1.readlines(), f2.readlines(),
54 dcmp.left, dcmp.right)
55 for l in itertools.islice(diff, 100):
56 write(l)
57 write("\n\n")
58 return diffs
59
60 dcmp = filecmp.dircmp(folder1, folder2)
61 has_diffs = has_one_sided_diff(dcmp, dcmp.left, dcmp.left_only) \

Callers 1

Calls 3

writeFunction · 0.70
openFunction · 0.50
joinMethod · 0.45

Tested by

no test coverage detected