Limit diff to ~10 lines

Also include content of added files.
This commit is contained in:
Brett T. Warden
2024-04-15 17:13:34 -07:00
parent 16ee88cb20
commit 239d8cd618
+5 -2
View File
@@ -446,5 +446,8 @@ class Content():
autogenerated_src.extract(os.path.join(self.base_path, 'autogenerated-tmp'))
# Move the autogenerated source to a non-version-named directory for consistent diffs
call(f"mv autogenerated-tmp/{autogenerated_src.prefix} autogenerated", check=True, cwd=self.base_path)
call("diff -u -r ../autogenerated ./",
logfile="archive.diff", check=False, cwd=os.path.join(self.base_path, main_src.prefix))
call("diff -u -r --unidirectional-new-file ../autogenerated ./",
logfile="archive.diff.in", check=False, cwd=os.path.join(self.base_path, main_src.prefix))
call("grep -A14 -E '^(diff|Only in)' archive.diff.in",
logfile="archive.diff", check=False, cwd=os.getcwd())
call("rm archive.diff.in", check=False, cwd=os.getcwd())