Fossil SCM
Enhancements to the /timewarps page.
Commit
c9b0b7cacb1432e4881a6d2b9a01d6739dbc2cd0
Parent
1059aae93c23041…
2 files changed
+1
-3
+29
-15
+1
-3
| --- src/sitemap.c | ||
| +++ src/sitemap.c | ||
| @@ -115,10 +115,11 @@ | ||
| 115 | 115 | if( g.perm.Admin ){ |
| 116 | 116 | @ <li>%z(href("%R/urllist"))List of URLs used to access |
| 117 | 117 | @ this repository</a></li> |
| 118 | 118 | } |
| 119 | 119 | @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li> |
| 120 | + @ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li> | |
| 120 | 121 | @ </ul> |
| 121 | 122 | @ </li> |
| 122 | 123 | } |
| 123 | 124 | @ <li>On-line Documentation |
| 124 | 125 | @ <ul> |
| @@ -137,13 +138,10 @@ | ||
| 137 | 138 | @ <li>Test Pages |
| 138 | 139 | @ <ul> |
| 139 | 140 | if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){ |
| 140 | 141 | @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li> |
| 141 | 142 | } |
| 142 | - if( g.perm.Read && g.perm.Hyperlink ){ | |
| 143 | - @ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li> | |
| 144 | - } | |
| 145 | 143 | if( g.perm.Read ){ |
| 146 | 144 | @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li> |
| 147 | 145 | } |
| 148 | 146 | @ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic |
| 149 | 147 | @ colors assigned to branch names</a> |
| 150 | 148 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -115,10 +115,11 @@ | |
| 115 | if( g.perm.Admin ){ |
| 116 | @ <li>%z(href("%R/urllist"))List of URLs used to access |
| 117 | @ this repository</a></li> |
| 118 | } |
| 119 | @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li> |
| 120 | @ </ul> |
| 121 | @ </li> |
| 122 | } |
| 123 | @ <li>On-line Documentation |
| 124 | @ <ul> |
| @@ -137,13 +138,10 @@ | |
| 137 | @ <li>Test Pages |
| 138 | @ <ul> |
| 139 | if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){ |
| 140 | @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li> |
| 141 | } |
| 142 | if( g.perm.Read && g.perm.Hyperlink ){ |
| 143 | @ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li> |
| 144 | } |
| 145 | if( g.perm.Read ){ |
| 146 | @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li> |
| 147 | } |
| 148 | @ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic |
| 149 | @ colors assigned to branch names</a> |
| 150 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -115,10 +115,11 @@ | |
| 115 | if( g.perm.Admin ){ |
| 116 | @ <li>%z(href("%R/urllist"))List of URLs used to access |
| 117 | @ this repository</a></li> |
| 118 | } |
| 119 | @ <li>%z(href("%R/bloblist"))List of Artifacts</a></li> |
| 120 | @ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li> |
| 121 | @ </ul> |
| 122 | @ </li> |
| 123 | } |
| 124 | @ <li>On-line Documentation |
| 125 | @ <ul> |
| @@ -137,13 +138,10 @@ | |
| 138 | @ <li>Test Pages |
| 139 | @ <ul> |
| 140 | if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){ |
| 141 | @ <li>%z(href("%R/test_env"))CGI Environment Test</a></li> |
| 142 | } |
| 143 | if( g.perm.Read ){ |
| 144 | @ <li>%z(href("%R/test-rename-list"))List of file renames</a></li> |
| 145 | } |
| 146 | @ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic |
| 147 | @ colors assigned to branch names</a> |
| 148 |
+29
-15
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2227,35 +2227,49 @@ | ||
| 2227 | 2227 | return; |
| 2228 | 2228 | } |
| 2229 | 2229 | style_header("Instances of timewarp"); |
| 2230 | 2230 | db_prepare(&q, |
| 2231 | 2231 | "SELECT blob.uuid, " |
| 2232 | - " (SELECT date(mtime) FROM event WHERE objid=c.cid)," | |
| 2233 | - " EXISTS(SELECT 1 FROM event a, event b" | |
| 2234 | - " WHERE a.objid=p.cid AND b.objid=c.cid" | |
| 2235 | - " AND a.mtime>b.mtime)" | |
| 2236 | - " FROM plink p, plink c, blob" | |
| 2232 | + " date(ce.mtime)," | |
| 2233 | + " pe.mtime>ce.mtime," | |
| 2234 | + " coalesce(ce.euser,ce.user)" | |
| 2235 | + " FROM plink p, plink c, blob, event pe, event ce" | |
| 2237 | 2236 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 2238 | 2237 | " AND blob.rid=c.cid" |
| 2238 | + " AND pe.objid=p.cid" | |
| 2239 | + " AND ce.objid=c.cid" | |
| 2239 | 2240 | " ORDER BY 2 DESC" |
| 2240 | 2241 | ); |
| 2241 | 2242 | while( db_step(&q)==SQLITE_ROW ){ |
| 2242 | - const char *zUuid = db_column_text(&q, 0); | |
| 2243 | + const char *zCkin = db_column_text(&q, 0); | |
| 2243 | 2244 | const char *zDate = db_column_text(&q, 1); |
| 2245 | + const char *zStatus = db_column_int(&q,2) ? "Open" | |
| 2246 | + : "Resolved by editing date"; | |
| 2247 | + const char *zUser = db_column_text(&q, 3); | |
| 2248 | + char *zHref = href("%R/timeline?c=%S", zCkin); | |
| 2244 | 2249 | if( cnt==0 ){ |
| 2245 | - @ <ul> | |
| 2246 | - } | |
| 2247 | - cnt++; | |
| 2248 | - @ <li> | |
| 2249 | - @ <a href="%R/timeline?c=%!S(zUuid)&unhide">%s(zDate) %S(zUuid)</a> | |
| 2250 | - if( db_column_int(&q,2)==0 ){ | |
| 2251 | - @ <i>(Resolved by editing the date)</i> | |
| 2252 | - } | |
| 2250 | + @ <div class="brlist"><table id="timewarptable"> | |
| 2251 | + @ <thead><tr> | |
| 2252 | + @ <th>Check-in</th> | |
| 2253 | + @ <th>Date</th> | |
| 2254 | + @ <th>User</th> | |
| 2255 | + @ <th>Status</th> | |
| 2256 | + @ </tr></thead><tbody> | |
| 2257 | + } | |
| 2258 | + @ <tr> | |
| 2259 | + @ <td>%s(zHref)%S(zCkin)</a></td> | |
| 2260 | + @ <td>%s(zHref)%s(zDate)</a></td> | |
| 2261 | + @ <td>%h(zUser)</td> | |
| 2262 | + @ <td>%s(zStatus)</td> | |
| 2263 | + @ </tr> | |
| 2264 | + fossil_free(zHref); | |
| 2265 | + cnt++; | |
| 2253 | 2266 | } |
| 2254 | 2267 | db_finalize(&q); |
| 2255 | 2268 | if( cnt==0 ){ |
| 2256 | 2269 | @ <p>No timewarps in this repository</p> |
| 2257 | 2270 | }else{ |
| 2258 | - @ </ul> | |
| 2271 | + @ </tbody></table></div> | |
| 2272 | + output_table_sorting_javascript("timewarptable","tttt",2); | |
| 2259 | 2273 | } |
| 2260 | 2274 | style_footer(); |
| 2261 | 2275 | } |
| 2262 | 2276 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2227,35 +2227,49 @@ | |
| 2227 | return; |
| 2228 | } |
| 2229 | style_header("Instances of timewarp"); |
| 2230 | db_prepare(&q, |
| 2231 | "SELECT blob.uuid, " |
| 2232 | " (SELECT date(mtime) FROM event WHERE objid=c.cid)," |
| 2233 | " EXISTS(SELECT 1 FROM event a, event b" |
| 2234 | " WHERE a.objid=p.cid AND b.objid=c.cid" |
| 2235 | " AND a.mtime>b.mtime)" |
| 2236 | " FROM plink p, plink c, blob" |
| 2237 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 2238 | " AND blob.rid=c.cid" |
| 2239 | " ORDER BY 2 DESC" |
| 2240 | ); |
| 2241 | while( db_step(&q)==SQLITE_ROW ){ |
| 2242 | const char *zUuid = db_column_text(&q, 0); |
| 2243 | const char *zDate = db_column_text(&q, 1); |
| 2244 | if( cnt==0 ){ |
| 2245 | @ <ul> |
| 2246 | } |
| 2247 | cnt++; |
| 2248 | @ <li> |
| 2249 | @ <a href="%R/timeline?c=%!S(zUuid)&unhide">%s(zDate) %S(zUuid)</a> |
| 2250 | if( db_column_int(&q,2)==0 ){ |
| 2251 | @ <i>(Resolved by editing the date)</i> |
| 2252 | } |
| 2253 | } |
| 2254 | db_finalize(&q); |
| 2255 | if( cnt==0 ){ |
| 2256 | @ <p>No timewarps in this repository</p> |
| 2257 | }else{ |
| 2258 | @ </ul> |
| 2259 | } |
| 2260 | style_footer(); |
| 2261 | } |
| 2262 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -2227,35 +2227,49 @@ | |
| 2227 | return; |
| 2228 | } |
| 2229 | style_header("Instances of timewarp"); |
| 2230 | db_prepare(&q, |
| 2231 | "SELECT blob.uuid, " |
| 2232 | " date(ce.mtime)," |
| 2233 | " pe.mtime>ce.mtime," |
| 2234 | " coalesce(ce.euser,ce.user)" |
| 2235 | " FROM plink p, plink c, blob, event pe, event ce" |
| 2236 | " WHERE p.cid=c.pid AND p.mtime>c.mtime" |
| 2237 | " AND blob.rid=c.cid" |
| 2238 | " AND pe.objid=p.cid" |
| 2239 | " AND ce.objid=c.cid" |
| 2240 | " ORDER BY 2 DESC" |
| 2241 | ); |
| 2242 | while( db_step(&q)==SQLITE_ROW ){ |
| 2243 | const char *zCkin = db_column_text(&q, 0); |
| 2244 | const char *zDate = db_column_text(&q, 1); |
| 2245 | const char *zStatus = db_column_int(&q,2) ? "Open" |
| 2246 | : "Resolved by editing date"; |
| 2247 | const char *zUser = db_column_text(&q, 3); |
| 2248 | char *zHref = href("%R/timeline?c=%S", zCkin); |
| 2249 | if( cnt==0 ){ |
| 2250 | @ <div class="brlist"><table id="timewarptable"> |
| 2251 | @ <thead><tr> |
| 2252 | @ <th>Check-in</th> |
| 2253 | @ <th>Date</th> |
| 2254 | @ <th>User</th> |
| 2255 | @ <th>Status</th> |
| 2256 | @ </tr></thead><tbody> |
| 2257 | } |
| 2258 | @ <tr> |
| 2259 | @ <td>%s(zHref)%S(zCkin)</a></td> |
| 2260 | @ <td>%s(zHref)%s(zDate)</a></td> |
| 2261 | @ <td>%h(zUser)</td> |
| 2262 | @ <td>%s(zStatus)</td> |
| 2263 | @ </tr> |
| 2264 | fossil_free(zHref); |
| 2265 | cnt++; |
| 2266 | } |
| 2267 | db_finalize(&q); |
| 2268 | if( cnt==0 ){ |
| 2269 | @ <p>No timewarps in this repository</p> |
| 2270 | }else{ |
| 2271 | @ </tbody></table></div> |
| 2272 | output_table_sorting_javascript("timewarptable","tttt",2); |
| 2273 | } |
| 2274 | style_footer(); |
| 2275 | } |
| 2276 |