[Git][NTPsec/ntpsec][master] Fix the link checker, and an error found by it.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Dec 24 17:05:35 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
5656a345 by Eric S. Raymond at 2016-12-24T12:04:59-05:00
Fix the link checker, and an error found by it.

- - - - -


2 changed files:

- devel/linkcheck
- docs/includes/ntpq-body.txt


Changes:

=====================================
devel/linkcheck
=====================================
--- a/devel/linkcheck
+++ b/devel/linkcheck
@@ -30,7 +30,12 @@ def tabulate(path):
                 continue
         if line.startswith("include::"):
             filestem = line.strip()[9:][:-2]
-            iostack.append((linecount, open(os.path.join(prefix, filestem))))
+            dirname = ""
+            if iostack:
+                includer = iostack[-1][1].name
+                dirname = os.path.dirname(includer[len(prefix):])
+            newpath = os.path.join(prefix, dirname, filestem)
+            iostack.append((linecount, open(newpath)))
             continue
         # Ordinary processing 
         # This is the tricky part. Because we're reference-checking the


=====================================
docs/includes/ntpq-body.txt
=====================================
--- a/docs/includes/ntpq-body.txt
+++ b/docs/includes/ntpq-body.txt
@@ -541,7 +541,7 @@ The command ":config" is no longer accepted; use "config" instead.
 
 == Known Limitations ==
 
-include::mrufail.txt
+include::mrufail.txt[]
 
 You may be able to retrieve partial data in very high-traffic
 conditions by using the 'direct' option.



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5656a345eb02389037ae4af09d89fe7a68f303e8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161224/28ba43c3/attachment.html>


More information about the vc mailing list