Not logged in
Check-in [88d503e15b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add "server-id" printout to "fossil dbstat". Only print project-id if there is one.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:88d503e15bc30ded6ff51a69aca5eb8cec1a7805
User & Date: jan.nijtmans 2014-06-27 15:32:36
Context
2014-06-27
23:19
Fix a possible NULL pointer dereference in the "fusefs" implementation. Leaf check-in: 2e51be8ec2 user: drh tags: trunk
15:32
Add "server-id" printout to "fossil dbstat". Only print project-id if there is one. check-in: 88d503e15b user: jan.nijtmans tags: trunk
12:35
Print server-id after cloning and in /stat page. Only print Project-ID in /stat page if there is one. check-in: 11ba4bd6cf user: jan.nijtmans tags: trunk
Changes

Changes to src/stat.c.

166
167
168
169
170
171
172


173
174
175
176
177
178
179
...
222
223
224
225
226
227
228


229


230
231
232
233
234
235
236
  i64 t, fsize;
  int n, m;
  int szMax, szAvg;
  const char *zDb;
  int brief;
  char zBuf[100];
  const int colWidth = -19 /* printf alignment/width for left column */;


  brief = find_option("brief", "b",0)!=0;
  db_find_and_open_repository(0,0);
  fsize = file_size(g.zRepositoryName);
  bigSizeName(sizeof(zBuf), zBuf, fsize);
  fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf );
  if( !brief ){
    n = db_int(0, "SELECT count(*) FROM blob");
................................................................................
    n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'");
    fossil_print("%*s%d\n", colWidth, "tagchanges:", n);
  }
  n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
                " + 0.99");
  fossil_print("%*s%d days or approximately %.2f years.\n",
               colWidth, "project-age:", n, n/365.2425);


  fossil_print("%*s%s\n", colWidth, "project-id:", db_get("project-code",""));


  fossil_print("%*s%s %s [%s] (%s)\n",
               colWidth, "fossil-version:",
               MANIFEST_DATE, MANIFEST_VERSION, RELEASE_VERSION,
               COMPILER_NAME);
  fossil_print("%*s%.19s [%.10s] (%s)\n",
               colWidth, "sqlite-version:",
               sqlite3_sourceid(), &sqlite3_sourceid()[20],







>
>







 







>
>
|
>
>







166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
...
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
  i64 t, fsize;
  int n, m;
  int szMax, szAvg;
  const char *zDb;
  int brief;
  char zBuf[100];
  const int colWidth = -19 /* printf alignment/width for left column */;
  const char *p;

  brief = find_option("brief", "b",0)!=0;
  db_find_and_open_repository(0,0);
  fsize = file_size(g.zRepositoryName);
  bigSizeName(sizeof(zBuf), zBuf, fsize);
  fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf );
  if( !brief ){
    n = db_int(0, "SELECT count(*) FROM blob");
................................................................................
    n = db_int(0, "SELECT COUNT(*) FROM event WHERE type='g'");
    fossil_print("%*s%d\n", colWidth, "tagchanges:", n);
  }
  n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
                " + 0.99");
  fossil_print("%*s%d days or approximately %.2f years.\n",
               colWidth, "project-age:", n, n/365.2425);
  p = db_get("project-code", 0);
  if( p ){
    fossil_print("%*s%s\n", colWidth, "project-id:", p);
  }
  fossil_print("%*s%s\n", colWidth, "server-id:", db_get("server-code", 0));
  fossil_print("%*s%s %s [%s] (%s)\n",
               colWidth, "fossil-version:",
               MANIFEST_DATE, MANIFEST_VERSION, RELEASE_VERSION,
               COMPILER_NAME);
  fossil_print("%*s%.19s [%.10s] (%s)\n",
               colWidth, "sqlite-version:",
               sqlite3_sourceid(), &sqlite3_sourceid()[20],