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)
Sun, Apr 21, 9:24 PM
Unknown Object (File)
Sun, Apr 21, 9:19 PM
Unknown Object (File)
Sun, Apr 21, 9:19 PM
Unknown Object (File)
Sun, Apr 21, 9:15 PM
Unknown Object (File)
Sat, Apr 20, 6:08 AM
Unknown Object (File)
Wed, Apr 17, 1:58 PM
Unknown Object (File)
Wed, Apr 17, 1:28 AM
Unknown Object (File)
Feb 20 2024, 4:24 AM
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