Fossil SCM

Enhancements to the /timewarps page.

drh 2015-10-05 13:15 trunk merge
Commit c9b0b7cacb1432e4881a6d2b9a01d6739dbc2cd0
2 files changed +1 -3 +29 -15
+1 -3
--- src/sitemap.c
+++ src/sitemap.c
@@ -115,10 +115,11 @@
115115
if( g.perm.Admin ){
116116
@ <li>%z(href("%R/urllist"))List of URLs used to access
117117
@ this repository</a></li>
118118
}
119119
@ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
120
+ @ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li>
120121
@ </ul>
121122
@ </li>
122123
}
123124
@ <li>On-line Documentation
124125
@ <ul>
@@ -137,13 +138,10 @@
137138
@ <li>Test Pages
138139
@ <ul>
139140
if( g.perm.Admin || db_get_boolean("test_env_enable",0) ){
140141
@ <li>%z(href("%R/test_env"))CGI Environment Test</a></li>
141142
}
142
- if( g.perm.Read && g.perm.Hyperlink ){
143
- @ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li>
144
- }
145143
if( g.perm.Read ){
146144
@ <li>%z(href("%R/test-rename-list"))List of file renames</a></li>
147145
}
148146
@ <li>%z(href("%R/hash-color-test"))Page to experiment with the automatic
149147
@ colors assigned to branch names</a>
150148
--- 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 @@
22272227
return;
22282228
}
22292229
style_header("Instances of timewarp");
22302230
db_prepare(&q,
22312231
"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"
22372236
" WHERE p.cid=c.pid AND p.mtime>c.mtime"
22382237
" AND blob.rid=c.cid"
2238
+ " AND pe.objid=p.cid"
2239
+ " AND ce.objid=c.cid"
22392240
" ORDER BY 2 DESC"
22402241
);
22412242
while( db_step(&q)==SQLITE_ROW ){
2242
- const char *zUuid = db_column_text(&q, 0);
2243
+ const char *zCkin = db_column_text(&q, 0);
22432244
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);
22442249
if( cnt==0 ){
2245
- @ <ul>
2246
- }
2247
- cnt++;
2248
- @ <li>
2249
- @ <a href="%R/timeline?c=%!S(zUuid)&amp;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++;
22532266
}
22542267
db_finalize(&q);
22552268
if( cnt==0 ){
22562269
@ <p>No timewarps in this repository</p>
22572270
}else{
2258
- @ </ul>
2271
+ @ </tbody></table></div>
2272
+ output_table_sorting_javascript("timewarptable","tttt",2);
22592273
}
22602274
style_footer();
22612275
}
22622276
--- 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)&amp;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

Keyboard Shortcuts

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