Page MenuHomeFreeBSD

.hooks: add hook to check validity of new MOVED lines
ClosedPublic

Authored by tcberner on Apr 24 2022, 11:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 30 2024, 7:01 PM
Unknown Object (File)
Sep 21 2024, 5:05 AM
Unknown Object (File)
Sep 18 2024, 2:51 AM
Unknown Object (File)
Sep 7 2024, 7:41 AM
Unknown Object (File)
Aug 22 2024, 1:53 PM
Unknown Object (File)
Aug 2 2024, 11:50 AM
Unknown Object (File)
Jun 25 2024, 6:52 PM
Unknown Object (File)
Jun 16 2024, 2:22 PM
Subscribers

Details

Summary

This adds a hook to quickly check newly added/modified lines in MOVED -- it is a less
complete check than MOVED.awk, but runs a lot quicker.

Example:

> git diff --cached MOVED
diff --git a/MOVED b/MOVED
index e12c693bd6ca..04c4a0ccde13 100644
--- a/MOVED
+++ b/MOVED
@@ -17136,3 +17136,9 @@ devel/ros-rosinstall||2022-04-20|Has expired: Upstream has archived the project
 devel/py-aiorpcX-legacy|devel/py-aiorpcX|2022-04-20|Has expired: Legacy port is no longer required, please use devel/py-aiorpcX instead
 net/kalarmcal|deskutils/kalarm|2022-04-21|Packages were merged
 math/py-gmpy2-devel|math/py-gmpy2|2022-04-22|No more need for the -devel port, py-gmpy2 is at latest
+category/port|category/port|2022-04-23|Test
+category/port|category/port|2022-04-23|
+category/port|category/port|2022-4-23|Test
+category/port||2022-04-23|Test
+|category/port|2022-04-23|Test
+category/port||category/port|2022-04-23|Test

> git commit -m "test"
[pre-commit] ERROR: MOVED lines:
category/port|category/port|2022-04-23|Test
category/port|category/port|2022-04-23|
category/port|category/port|2022-4-23|Test
category/port||2022-04-23|Test
|category/port|2022-04-23|Test
category/port||category/port|2022-04-23|Test
is/are invalid -- please run Tools/scripts/MOVEDlint.awk

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

oh, I just noticed that it seems not to work yet...

category/port|category/port|2022-04-23|Test

should be accepted

With the recent changes to MOVED by bapt, we can now rely on MOVEDlint.awk for this hook

[pre-commit] ERROR: MOVED contains errors.
                    Please apply the suggested changes:

17537: date going backwards from 2022-08-20 to 2022-08-13 from this line
17538: date going backwards from 2022-08-20 to 2022-08-13 to this line
This revision is now accepted and ready to land.Aug 23 2022, 1:04 PM