Check-in [69feea6f3b]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | NEWS-file generation |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
69feea6f3b1813d66c089193c6eee162 |
User & Date: | mario 2021-10-11 21:44:47 |
Context
2021-10-11
| ||
22:28 | Fix syntax error check-in: a9885fc25f user: mario tags: trunk | |
21:44 | NEWS-file generation check-in: 69feea6f3b user: mario tags: trunk | |
2021-10-10
| ||
07:51 | tryβcatch check-in: db3a915212 user: mario tags: trunk | |
Changes
Added extroot/changelog.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #!/usr/bin/php-cgi -dcgi.force_redirect=0 <?php # encoding: utf-8 # api: cgi # type: output # category: vcs # title: changelog # description: Outputs a NEWS-style timeline # version: 0.2 # state: beta # depends: php:sqlite # config: - # # A variant of the hooks.th1 version, in PHP. # #-- database (== fossil repo) function db($sql="", $params=[]) { static $db; if (empty($db)) { $db = new PDO("sqlite::memory:"); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $db->query("ATTACH DATABASE '$_SERVER[FOSSIL_REPOSITORY]' AS 'repo'"); } if ($params) { $stmt = $db->prepare($sql); $stmt->execute($params); return $stmt->fetchAll(PDO::FETCH_ASSOC); } else { return $db->query($sql); } } #-- output header("Content-Type: text/plain"); $version="trunk"; print "$version (unreleased)\n"; $r = db(" SELECT event.mtime, tag.tagname, MAX(tag.tagid), DATE(event.mtime) AS d, event.comment AS comment FROM event LEFT JOIN tagxref ON event.objid=tagxref.rid LEFT JOIN tag ON tagxref.tagid=tag.tagid WHERE type='ci' GROUP BY objid ORDER BY event.mtime DESC LIMIT 750 "); foreach ($r as $row) { if (preg_match('/^sym-.*?(\d+\.\d+.*)$/', $row["tagname"]. $uu)) { $version = substr($uu[1], 3, 100); print "\n$version ($r[d])\n"; } $comment = trim(preg_replace("/\s+/", " ", $row["comment"])); print " * $comment\n"; } print "\n\n"; |