Fossil SCM
Show the number and total size of unversioned files on the /stat page. Add a link to /uvlist from /sitemap.
Commit
83c7571f2840122985a90f9de0ef1e68a5b61743
Parent
d78094932026b0c…
2 files changed
+3
+21
+3
| --- src/sitemap.c | ||
| +++ src/sitemap.c | ||
| @@ -101,10 +101,13 @@ | ||
| 101 | 101 | @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li> |
| 102 | 102 | @ <li>%z(href("%R/attachlist"))List of Attachments</a></li> |
| 103 | 103 | @ </ul> |
| 104 | 104 | @ </li> |
| 105 | 105 | } |
| 106 | + if( g.perm.Read ){ | |
| 107 | + @ <li>%z(href("%R/uvlist"))Unversioned Files</a> | |
| 108 | + } | |
| 106 | 109 | if( srchFlags ){ |
| 107 | 110 | @ <li>%z(href("%R/search"))Full-Text Search</a></li> |
| 108 | 111 | } |
| 109 | 112 | @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li> |
| 110 | 113 | if( g.perm.Read ){ |
| 111 | 114 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -101,10 +101,13 @@ | |
| 101 | @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li> |
| 102 | @ <li>%z(href("%R/attachlist"))List of Attachments</a></li> |
| 103 | @ </ul> |
| 104 | @ </li> |
| 105 | } |
| 106 | if( srchFlags ){ |
| 107 | @ <li>%z(href("%R/search"))Full-Text Search</a></li> |
| 108 | } |
| 109 | @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li> |
| 110 | if( g.perm.Read ){ |
| 111 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -101,10 +101,13 @@ | |
| 101 | @ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li> |
| 102 | @ <li>%z(href("%R/attachlist"))List of Attachments</a></li> |
| 103 | @ </ul> |
| 104 | @ </li> |
| 105 | } |
| 106 | if( g.perm.Read ){ |
| 107 | @ <li>%z(href("%R/uvlist"))Unversioned Files</a> |
| 108 | } |
| 109 | if( srchFlags ){ |
| 110 | @ <li>%z(href("%R/search"))Full-Text Search</a></li> |
| 111 | } |
| 112 | @ <li>%z(href("%R/login"))Login/Logout/Change Password</a></li> |
| 113 | if( g.perm.Read ){ |
| 114 |
+21
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -120,10 +120,31 @@ | ||
| 120 | 120 | b = 1; |
| 121 | 121 | } |
| 122 | 122 | a = t/fsize; |
| 123 | 123 | @ %d(a):%d(b) |
| 124 | 124 | @ </td></tr> |
| 125 | + } | |
| 126 | + if( db_table_exists("repository","unversioned") ){ | |
| 127 | + Stmt q; | |
| 128 | + char zStored[100]; | |
| 129 | + db_prepare(&q, | |
| 130 | + "SELECT count(*), sum(sz), sum(length(content))" | |
| 131 | + " FROM unversioned" | |
| 132 | + " WHERE length(hash)>1" | |
| 133 | + ); | |
| 134 | + if( db_step(&q)==SQLITE_ROW && (n = db_column_int(&q,0))>0 ){ | |
| 135 | + sqlite3_int64 iSz, iStored; | |
| 136 | + iSz = db_column_int64(&q,1); | |
| 137 | + iStored = db_column_int64(&q,2); | |
| 138 | + approxSizeName(sizeof(zBuf), zBuf, iSz); | |
| 139 | + approxSizeName(sizeof(zStored), zStored, iStored); | |
| 140 | + @ <tr><th>Unversioned Files:</th><td> | |
| 141 | + @ %z(href("%R/uvlist"))%d(n) files</a>, | |
| 142 | + @ total size %s(zBuf) uncompressed, %s(zStored) compressed | |
| 143 | + @ </td></tr> | |
| 144 | + } | |
| 145 | + db_finalize(&q); | |
| 125 | 146 | } |
| 126 | 147 | @ <tr><th>Number Of Check-ins:</th><td> |
| 127 | 148 | n = db_int(0, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"); |
| 128 | 149 | @ %d(n) |
| 129 | 150 | @ </td></tr> |
| 130 | 151 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -120,10 +120,31 @@ | |
| 120 | b = 1; |
| 121 | } |
| 122 | a = t/fsize; |
| 123 | @ %d(a):%d(b) |
| 124 | @ </td></tr> |
| 125 | } |
| 126 | @ <tr><th>Number Of Check-ins:</th><td> |
| 127 | n = db_int(0, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"); |
| 128 | @ %d(n) |
| 129 | @ </td></tr> |
| 130 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -120,10 +120,31 @@ | |
| 120 | b = 1; |
| 121 | } |
| 122 | a = t/fsize; |
| 123 | @ %d(a):%d(b) |
| 124 | @ </td></tr> |
| 125 | } |
| 126 | if( db_table_exists("repository","unversioned") ){ |
| 127 | Stmt q; |
| 128 | char zStored[100]; |
| 129 | db_prepare(&q, |
| 130 | "SELECT count(*), sum(sz), sum(length(content))" |
| 131 | " FROM unversioned" |
| 132 | " WHERE length(hash)>1" |
| 133 | ); |
| 134 | if( db_step(&q)==SQLITE_ROW && (n = db_column_int(&q,0))>0 ){ |
| 135 | sqlite3_int64 iSz, iStored; |
| 136 | iSz = db_column_int64(&q,1); |
| 137 | iStored = db_column_int64(&q,2); |
| 138 | approxSizeName(sizeof(zBuf), zBuf, iSz); |
| 139 | approxSizeName(sizeof(zStored), zStored, iStored); |
| 140 | @ <tr><th>Unversioned Files:</th><td> |
| 141 | @ %z(href("%R/uvlist"))%d(n) files</a>, |
| 142 | @ total size %s(zBuf) uncompressed, %s(zStored) compressed |
| 143 | @ </td></tr> |
| 144 | } |
| 145 | db_finalize(&q); |
| 146 | } |
| 147 | @ <tr><th>Number Of Check-ins:</th><td> |
| 148 | n = db_int(0, "SELECT count(*) FROM event WHERE type='ci' /*scan*/"); |
| 149 | @ %d(n) |
| 150 | @ </td></tr> |
| 151 |