Fossil SCM
Fix the query on the /stat page that computes the number of check-ins. The old query omitted checkins (such as merges or null-checkins or branch creations) that did not add any new artifacts to the repository. Also remove the "server id" from the /stat report since that information is no longer used for anything.
Commit
6bb63a736493d0dbb718a33707cad210d052f53b
Parent
f97e1cf6662be46…
1 file changed
+1
-2
+1
-2
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -94,11 +94,11 @@ | ||
| 94 | 94 | a = t/fsize; |
| 95 | 95 | @ %d(a):%d(b) |
| 96 | 96 | @ </td></tr> |
| 97 | 97 | } |
| 98 | 98 | @ <tr><th>Number Of Check-ins:</th><td> |
| 99 | - n = db_int(0, "SELECT count(distinct mid) FROM mlink /*scan*/"); | |
| 99 | + n = db_int(0, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"); | |
| 100 | 100 | @ %d(n) |
| 101 | 101 | @ </td></tr> |
| 102 | 102 | @ <tr><th>Number Of Files:</th><td> |
| 103 | 103 | n = db_int(0, "SELECT count(*) FROM filename /*scan*/"); |
| 104 | 104 | @ %d(n) |
| @@ -118,11 +118,10 @@ | ||
| 118 | 118 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 119 | 119 | " + 0.99"); |
| 120 | 120 | @ %d(n) days or approximately %.2f(n/365.24) years. |
| 121 | 121 | @ </td></tr> |
| 122 | 122 | @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | - @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> | |
| 124 | 123 | @ <tr><th>Fossil Version:</th><td> |
| 125 | 124 | @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 126 | 125 | @ (%h(COMPILER_NAME)) |
| 127 | 126 | @ </td></tr> |
| 128 | 127 | @ <tr><th>SQLite Version:</th><td>%.19s(SQLITE_SOURCE_ID) |
| 129 | 128 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -94,11 +94,11 @@ | |
| 94 | a = t/fsize; |
| 95 | @ %d(a):%d(b) |
| 96 | @ </td></tr> |
| 97 | } |
| 98 | @ <tr><th>Number Of Check-ins:</th><td> |
| 99 | n = db_int(0, "SELECT count(distinct mid) FROM mlink /*scan*/"); |
| 100 | @ %d(n) |
| 101 | @ </td></tr> |
| 102 | @ <tr><th>Number Of Files:</th><td> |
| 103 | n = db_int(0, "SELECT count(*) FROM filename /*scan*/"); |
| 104 | @ %d(n) |
| @@ -118,11 +118,10 @@ | |
| 118 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 119 | " + 0.99"); |
| 120 | @ %d(n) days or approximately %.2f(n/365.24) years. |
| 121 | @ </td></tr> |
| 122 | @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> |
| 124 | @ <tr><th>Fossil Version:</th><td> |
| 125 | @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 126 | @ (%h(COMPILER_NAME)) |
| 127 | @ </td></tr> |
| 128 | @ <tr><th>SQLite Version:</th><td>%.19s(SQLITE_SOURCE_ID) |
| 129 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -94,11 +94,11 @@ | |
| 94 | a = t/fsize; |
| 95 | @ %d(a):%d(b) |
| 96 | @ </td></tr> |
| 97 | } |
| 98 | @ <tr><th>Number Of Check-ins:</th><td> |
| 99 | n = db_int(0, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"); |
| 100 | @ %d(n) |
| 101 | @ </td></tr> |
| 102 | @ <tr><th>Number Of Files:</th><td> |
| 103 | n = db_int(0, "SELECT count(*) FROM filename /*scan*/"); |
| 104 | @ %d(n) |
| @@ -118,11 +118,10 @@ | |
| 118 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 119 | " + 0.99"); |
| 120 | @ %d(n) days or approximately %.2f(n/365.24) years. |
| 121 | @ </td></tr> |
| 122 | @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 123 | @ <tr><th>Fossil Version:</th><td> |
| 124 | @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 125 | @ (%h(COMPILER_NAME)) |
| 126 | @ </td></tr> |
| 127 | @ <tr><th>SQLite Version:</th><td>%.19s(SQLITE_SOURCE_ID) |
| 128 |