Fossil SCM

Changed days-per-year from 365.24 to 365.2425, which is (per Wikipedia) more correct over longer time periods (patch from J. van den Hoff). Removed serverId from /json/stat output, analog to commit [6bb63a7364].

stephan 2013-01-18 11:06 trunk
Commit 823d3ed6d38323d63568fe6f3116069aa53b0561
2 files changed +1 -3 +2 -2
+1 -3
--- src/json.c
+++ src/json.c
@@ -2085,15 +2085,13 @@
20852085
cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n));
20862086
}/*full*/
20872087
n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
20882088
" + 0.99");
20892089
cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
2090
- cson_object_set(jo, "ageYears", cson_value_new_double(n/365.24));
2090
+ cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
20912091
sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
20922092
SETBUF(jo, "projectCode");
2093
- sqlite3_snprintf(BufLen, zBuf, db_get("server-code",""));
2094
- SETBUF(jo, "serverCode");
20952093
cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME)));
20962094
20972095
jv2 = cson_value_new_object();
20982096
jo2 = cson_value_get_object(jv2);
20992097
cson_object_set(jo, "sqlite", jv2);
21002098
--- src/json.c
+++ src/json.c
@@ -2085,15 +2085,13 @@
2085 cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n));
2086 }/*full*/
2087 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
2088 " + 0.99");
2089 cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
2090 cson_object_set(jo, "ageYears", cson_value_new_double(n/365.24));
2091 sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
2092 SETBUF(jo, "projectCode");
2093 sqlite3_snprintf(BufLen, zBuf, db_get("server-code",""));
2094 SETBUF(jo, "serverCode");
2095 cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME)));
2096
2097 jv2 = cson_value_new_object();
2098 jo2 = cson_value_get_object(jv2);
2099 cson_object_set(jo, "sqlite", jv2);
2100
--- src/json.c
+++ src/json.c
@@ -2085,15 +2085,13 @@
2085 cson_object_set(jo, "ticketCount", cson_value_new_integer((cson_int_t)n));
2086 }/*full*/
2087 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
2088 " + 0.99");
2089 cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n));
2090 cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425));
2091 sqlite3_snprintf(BufLen, zBuf, db_get("project-code",""));
2092 SETBUF(jo, "projectCode");
 
 
2093 cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME)));
2094
2095 jv2 = cson_value_new_object();
2096 jo2 = cson_value_get_object(jv2);
2097 cson_object_set(jo, "sqlite", jv2);
2098
+2 -2
--- src/stat.c
+++ src/stat.c
@@ -115,11 +115,11 @@
115115
@ </td></tr>
116116
}
117117
@ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
118118
n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
119119
" + 0.99");
120
- @ %d(n) days or approximately %.2f(n/365.24) years.
120
+ @ %d(n) days or approximately %.2f(n/365.2425) years.
121121
@ </td></tr>
122122
@ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
123123
@ <tr><th>Fossil&nbsp;Version:</th><td>
124124
@ %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
125125
@ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)]
@@ -205,11 +205,11 @@
205205
fossil_print("%*s%d\n", colWidth, "tagchange-count:", n);
206206
}
207207
n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
208208
" + 0.99");
209209
fossil_print("%*s%d days or approximately %.2f years.\n",
210
- colWidth, "project-age:", n, n/365.24);
210
+ colWidth, "project-age:", n, n/365.2425);
211211
fossil_print("%*s%s\n", colWidth, "project-id:", db_get("project-code",""));
212212
fossil_print("%*s%s\n", colWidth, "server-id:", db_get("server-code",""));
213213
fossil_print("%*s%s %s %s (%s)\n",
214214
colWidth, "fossil-version:",
215215
RELEASE_VERSION, MANIFEST_DATE, MANIFEST_VERSION,
216216
--- src/stat.c
+++ src/stat.c
@@ -115,11 +115,11 @@
115 @ </td></tr>
116 }
117 @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
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(MANIFEST_DATE) %h(MANIFEST_VERSION)
125 @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)]
@@ -205,11 +205,11 @@
205 fossil_print("%*s%d\n", colWidth, "tagchange-count:", n);
206 }
207 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
208 " + 0.99");
209 fossil_print("%*s%d days or approximately %.2f years.\n",
210 colWidth, "project-age:", n, n/365.24);
211 fossil_print("%*s%s\n", colWidth, "project-id:", db_get("project-code",""));
212 fossil_print("%*s%s\n", colWidth, "server-id:", db_get("server-code",""));
213 fossil_print("%*s%s %s %s (%s)\n",
214 colWidth, "fossil-version:",
215 RELEASE_VERSION, MANIFEST_DATE, MANIFEST_VERSION,
216
--- src/stat.c
+++ src/stat.c
@@ -115,11 +115,11 @@
115 @ </td></tr>
116 }
117 @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
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.2425) 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(MANIFEST_DATE) %h(MANIFEST_VERSION)
125 @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)]
@@ -205,11 +205,11 @@
205 fossil_print("%*s%d\n", colWidth, "tagchange-count:", n);
206 }
207 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
208 " + 0.99");
209 fossil_print("%*s%d days or approximately %.2f years.\n",
210 colWidth, "project-age:", n, n/365.2425);
211 fossil_print("%*s%s\n", colWidth, "project-id:", db_get("project-code",""));
212 fossil_print("%*s%s\n", colWidth, "server-id:", db_get("server-code",""));
213 fossil_print("%*s%s %s %s (%s)\n",
214 colWidth, "fossil-version:",
215 RELEASE_VERSION, MANIFEST_DATE, MANIFEST_VERSION,
216

Keyboard Shortcuts

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