Fossil SCM

Print server-id after cloning and in /stat page. Only print Project-ID in /stat page if there is one.

jan.nijtmans 2014-06-27 12:35 trunk
Commit 11ba4bd6cf0cb9c2116e3adcb47460930ccd44bd
2 files changed +1 +6 -1
--- src/clone.c
+++ src/clone.c
@@ -195,10 +195,11 @@
195195
}
196196
db_begin_transaction();
197197
fossil_print("Rebuilding repository meta-data...\n");
198198
rebuild_db(0, 1, 0);
199199
fossil_print("project-id: %s\n", db_get("project-code", 0));
200
+ fossil_print("server-id: %s\n", db_get("server-code", 0));
200201
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
201202
fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
202203
db_end_transaction(0);
203204
}
204205
205206
--- src/clone.c
+++ src/clone.c
@@ -195,10 +195,11 @@
195 }
196 db_begin_transaction();
197 fossil_print("Rebuilding repository meta-data...\n");
198 rebuild_db(0, 1, 0);
199 fossil_print("project-id: %s\n", db_get("project-code", 0));
 
200 zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
201 fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
202 db_end_transaction(0);
203 }
204
205
--- src/clone.c
+++ src/clone.c
@@ -195,10 +195,11 @@
195 }
196 db_begin_transaction();
197 fossil_print("Rebuilding repository meta-data...\n");
198 rebuild_db(0, 1, 0);
199 fossil_print("project-id: %s\n", db_get("project-code", 0));
200 fossil_print("server-id: %s\n", db_get("server-code", 0));
201 zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
202 fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
203 db_end_transaction(0);
204 }
205
206
+6 -1
--- src/stat.c
+++ src/stat.c
@@ -49,10 +49,11 @@
4949
int n, m;
5050
int szMax, szAvg;
5151
const char *zDb;
5252
int brief;
5353
char zBuf[100];
54
+ const char *p;
5455
5556
login_check_credentials();
5657
if( !g.perm.Read ){ login_needed(); return; }
5758
brief = P("brief")!=0;
5859
style_header("Repository Statistics");
@@ -120,11 +121,15 @@
120121
@ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
121122
n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
122123
" + 0.99");
123124
@ %d(n) days or approximately %.2f(n/365.2425) years.
124125
@ </td></tr>
125
- @ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
126
+ p = db_get("project-code", 0);
127
+ if( p ){
128
+ @ <tr><th>Project&nbsp;ID:</th><td>%h(p)</td></tr>
129
+ }
130
+ @ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
126131
@ <tr><th>Fossil&nbsp;Version:</th><td>
127132
@ %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
128133
@ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)]
129134
@ </td></tr>
130135
@ <tr><th>SQLite&nbsp;Version:</th><td>%.19s(sqlite3_sourceid())
131136
--- src/stat.c
+++ src/stat.c
@@ -49,10 +49,11 @@
49 int n, m;
50 int szMax, szAvg;
51 const char *zDb;
52 int brief;
53 char zBuf[100];
 
54
55 login_check_credentials();
56 if( !g.perm.Read ){ login_needed(); return; }
57 brief = P("brief")!=0;
58 style_header("Repository Statistics");
@@ -120,11 +121,15 @@
120 @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
121 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
122 " + 0.99");
123 @ %d(n) days or approximately %.2f(n/365.2425) years.
124 @ </td></tr>
125 @ <tr><th>Project&nbsp;ID:</th><td>%h(db_get("project-code",""))</td></tr>
 
 
 
 
126 @ <tr><th>Fossil&nbsp;Version:</th><td>
127 @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
128 @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)]
129 @ </td></tr>
130 @ <tr><th>SQLite&nbsp;Version:</th><td>%.19s(sqlite3_sourceid())
131
--- src/stat.c
+++ src/stat.c
@@ -49,10 +49,11 @@
49 int n, m;
50 int szMax, szAvg;
51 const char *zDb;
52 int brief;
53 char zBuf[100];
54 const char *p;
55
56 login_check_credentials();
57 if( !g.perm.Read ){ login_needed(); return; }
58 brief = P("brief")!=0;
59 style_header("Repository Statistics");
@@ -120,11 +121,15 @@
121 @ <tr><th>Duration&nbsp;Of&nbsp;Project:</th><td>
122 n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)"
123 " + 0.99");
124 @ %d(n) days or approximately %.2f(n/365.2425) years.
125 @ </td></tr>
126 p = db_get("project-code", 0);
127 if( p ){
128 @ <tr><th>Project&nbsp;ID:</th><td>%h(p)</td></tr>
129 }
130 @ <tr><th>Server&nbsp;ID:</th><td>%h(db_get("server-code",""))</td></tr>
131 @ <tr><th>Fossil&nbsp;Version:</th><td>
132 @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION)
133 @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)]
134 @ </td></tr>
135 @ <tr><th>SQLite&nbsp;Version:</th><td>%.19s(sqlite3_sourceid())
136

Keyboard Shortcuts

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