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.

drh 2013-01-18 00:55 trunk
Commit 6bb63a736493d0dbb718a33707cad210d052f53b
1 file changed +1 -2
+1 -2
--- src/stat.c
+++ src/stat.c
@@ -94,11 +94,11 @@
9494
a = t/fsize;
9595
@ %d(a):%d(b)
9696
@ </td></tr>
9797
}
9898
@ <tr><th>Number&nbsp;Of&nbsp;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*/");
100100
@ %d(n)
101101
@ </td></tr>
102102
@ <tr><th>Number&nbsp;Of&nbsp;Files:</th><td>
103103
n = db_int(0, "SELECT count(*) FROM filename /*scan*/");
104104
@ %d(n)
@@ -118,11 +118,10 @@
118118
n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
119119
" + 0.99");
120120
@ %d(n) days or approximately %.2f(n/365.24) years.
121121
@ </td></tr>
122122
@ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
123
- @ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
124123
@ <tr><th>Fossil&nbsp;Version:</th><td>
125124
@ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
126125
@ (%h(COMPILER_NAME))
127126
@ </td></tr>
128127
@ <tr><th>SQLite&nbsp;Version:</th><td>%.19s(SQLITE_SOURCE_ID)
129128
--- 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&nbsp;Of&nbsp;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&nbsp;Of&nbsp;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&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
123 @ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
124 @ <tr><th>Fossil&nbsp;Version:</th><td>
125 @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
126 @ (%h(COMPILER_NAME))
127 @ </td></tr>
128 @ <tr><th>SQLite&nbsp;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&nbsp;Of&nbsp;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&nbsp;Of&nbsp;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&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
 
123 @ <tr><th>Fossil&nbsp;Version:</th><td>
124 @ %h(RELEASE_VERSION) %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
125 @ (%h(COMPILER_NAME))
126 @ </td></tr>
127 @ <tr><th>SQLite&nbsp;Version:</th><td>%.19s(SQLITE_SOURCE_ID)
128

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button