Fossil SCM
Print server-id after cloning and in /stat page. Only print Project-ID in /stat page if there is one.
Commit
11ba4bd6cf0cb9c2116e3adcb47460930ccd44bd
Parent
cfb8d6604f8a159…
2 files changed
+1
+6
-1
+1
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -195,10 +195,11 @@ | ||
| 195 | 195 | } |
| 196 | 196 | db_begin_transaction(); |
| 197 | 197 | fossil_print("Rebuilding repository meta-data...\n"); |
| 198 | 198 | rebuild_db(0, 1, 0); |
| 199 | 199 | fossil_print("project-id: %s\n", db_get("project-code", 0)); |
| 200 | + fossil_print("server-id: %s\n", db_get("server-code", 0)); | |
| 200 | 201 | zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
| 201 | 202 | fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword); |
| 202 | 203 | db_end_transaction(0); |
| 203 | 204 | } |
| 204 | 205 | |
| 205 | 206 |
| --- 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 @@ | ||
| 49 | 49 | int n, m; |
| 50 | 50 | int szMax, szAvg; |
| 51 | 51 | const char *zDb; |
| 52 | 52 | int brief; |
| 53 | 53 | char zBuf[100]; |
| 54 | + const char *p; | |
| 54 | 55 | |
| 55 | 56 | login_check_credentials(); |
| 56 | 57 | if( !g.perm.Read ){ login_needed(); return; } |
| 57 | 58 | brief = P("brief")!=0; |
| 58 | 59 | style_header("Repository Statistics"); |
| @@ -120,11 +121,15 @@ | ||
| 120 | 121 | @ <tr><th>Duration Of Project:</th><td> |
| 121 | 122 | n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" |
| 122 | 123 | " + 0.99"); |
| 123 | 124 | @ %d(n) days or approximately %.2f(n/365.2425) years. |
| 124 | 125 | @ </td></tr> |
| 125 | - @ <tr><th>Project ID:</th><td>%h(db_get("project-code",""))</td></tr> | |
| 126 | + p = db_get("project-code", 0); | |
| 127 | + if( p ){ | |
| 128 | + @ <tr><th>Project ID:</th><td>%h(p)</td></tr> | |
| 129 | + } | |
| 130 | + @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> | |
| 126 | 131 | @ <tr><th>Fossil Version:</th><td> |
| 127 | 132 | @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 128 | 133 | @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)] |
| 129 | 134 | @ </td></tr> |
| 130 | 135 | @ <tr><th>SQLite Version:</th><td>%.19s(sqlite3_sourceid()) |
| 131 | 136 |
| --- 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 Of 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 ID:</th><td>%h(db_get("project-code",""))</td></tr> |
| 126 | @ <tr><th>Fossil 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 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 Of 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 ID:</th><td>%h(p)</td></tr> |
| 129 | } |
| 130 | @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> |
| 131 | @ <tr><th>Fossil 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 Version:</th><td>%.19s(sqlite3_sourceid()) |
| 136 |