Fossil SCM

Add a new timeline format that puts the details in a separate table column from the check-in comment.

drh 2017-11-24 20:30 trunk
Commit dbb7447372c1ea60d6f0274d9a2719eb987d0bde4c785c989ad25c6ba56775cc
--- src/finfo.c
+++ src/finfo.c
@@ -317,10 +317,11 @@
317317
int iTableId = timeline_tableid();
318318
int bHashBeforeComment = 0; /* Show hash before the comment */
319319
int bHashAfterComment = 0; /* Show hash after the comment */
320320
int bHashInDetail = 0; /* Show the hash inside the detail section */
321321
int bShowDetail; /* Show the detail section */
322
+ int bSeparateDetail; /* Detail section in a separate column */
322323
int eCommentFormat; /* value for timeline-comment-format */
323324
324325
login_check_credentials();
325326
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
326327
style_header("File History");
@@ -331,10 +332,11 @@
331332
baseCheckin = name_to_rid_www("ci");
332333
zPrevDate[0] = 0;
333334
zFilename = PD("name","");
334335
eCommentFormat = db_get_int("timeline-comment-format", 0);
335336
bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
337
+ bSeparateDetail = (eCommentFormat & 8)!=0;
336338
switch( (eCommentFormat>>1)&3 ){
337339
case 1: bHashAfterComment = 1; break;
338340
case 2: bHashInDetail = 1; break;
339341
default: bHashBeforeComment = 1; break;
340342
}
@@ -522,10 +524,17 @@
522524
@ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
523525
if( bHashAfterComment && zUuid ){
524526
hyperlink_to_uuid(zUuid);
525527
}
526528
if( bShowDetail ){
529
+ if( bSeparateDetail ){
530
+ if( zBgClr && zBgClr[0] ){
531
+ @ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
532
+ }else{
533
+ @ <td class="timelineTableCell">
534
+ }
535
+ }
527536
cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
528537
if( zUuid && bHashInDetail ){
529538
@ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
530539
if( fShowId ){
531540
int srcId = delta_source_rid(frid);
532541
--- src/finfo.c
+++ src/finfo.c
@@ -317,10 +317,11 @@
317 int iTableId = timeline_tableid();
318 int bHashBeforeComment = 0; /* Show hash before the comment */
319 int bHashAfterComment = 0; /* Show hash after the comment */
320 int bHashInDetail = 0; /* Show the hash inside the detail section */
321 int bShowDetail; /* Show the detail section */
 
322 int eCommentFormat; /* value for timeline-comment-format */
323
324 login_check_credentials();
325 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
326 style_header("File History");
@@ -331,10 +332,11 @@
331 baseCheckin = name_to_rid_www("ci");
332 zPrevDate[0] = 0;
333 zFilename = PD("name","");
334 eCommentFormat = db_get_int("timeline-comment-format", 0);
335 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
 
336 switch( (eCommentFormat>>1)&3 ){
337 case 1: bHashAfterComment = 1; break;
338 case 2: bHashInDetail = 1; break;
339 default: bHashBeforeComment = 1; break;
340 }
@@ -522,10 +524,17 @@
522 @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
523 if( bHashAfterComment && zUuid ){
524 hyperlink_to_uuid(zUuid);
525 }
526 if( bShowDetail ){
 
 
 
 
 
 
 
527 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
528 if( zUuid && bHashInDetail ){
529 @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
530 if( fShowId ){
531 int srcId = delta_source_rid(frid);
532
--- src/finfo.c
+++ src/finfo.c
@@ -317,10 +317,11 @@
317 int iTableId = timeline_tableid();
318 int bHashBeforeComment = 0; /* Show hash before the comment */
319 int bHashAfterComment = 0; /* Show hash after the comment */
320 int bHashInDetail = 0; /* Show the hash inside the detail section */
321 int bShowDetail; /* Show the detail section */
322 int bSeparateDetail; /* Detail section in a separate column */
323 int eCommentFormat; /* value for timeline-comment-format */
324
325 login_check_credentials();
326 if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
327 style_header("File History");
@@ -331,10 +332,11 @@
332 baseCheckin = name_to_rid_www("ci");
333 zPrevDate[0] = 0;
334 zFilename = PD("name","");
335 eCommentFormat = db_get_int("timeline-comment-format", 0);
336 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
337 bSeparateDetail = (eCommentFormat & 8)!=0;
338 switch( (eCommentFormat>>1)&3 ){
339 case 1: bHashAfterComment = 1; break;
340 case 2: bHashInDetail = 1; break;
341 default: bHashBeforeComment = 1; break;
342 }
@@ -522,10 +524,17 @@
524 @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
525 if( bHashAfterComment && zUuid ){
526 hyperlink_to_uuid(zUuid);
527 }
528 if( bShowDetail ){
529 if( bSeparateDetail ){
530 if( zBgClr && zBgClr[0] ){
531 @ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
532 }else{
533 @ <td class="timelineTableCell">
534 }
535 }
536 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
537 if( zUuid && bHashInDetail ){
538 @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
539 if( fShowId ){
540 int srcId = delta_source_rid(frid);
541
--- src/setup.c
+++ src/setup.c
@@ -1454,10 +1454,11 @@
14541454
"1", "[hash] comment",
14551455
"2", "comment [hash] (details)",
14561456
"3", "comment [hash]",
14571457
"4", "comment (details)",
14581458
"5", "comment-only",
1459
+ "12","comment | details",
14591460
};
14601461
login_check_credentials();
14611462
if( !g.perm.Setup ){
14621463
login_needed(0);
14631464
return;
14641465
--- src/setup.c
+++ src/setup.c
@@ -1454,10 +1454,11 @@
1454 "1", "[hash] comment",
1455 "2", "comment [hash] (details)",
1456 "3", "comment [hash]",
1457 "4", "comment (details)",
1458 "5", "comment-only",
 
1459 };
1460 login_check_credentials();
1461 if( !g.perm.Setup ){
1462 login_needed(0);
1463 return;
1464
--- src/setup.c
+++ src/setup.c
@@ -1454,10 +1454,11 @@
1454 "1", "[hash] comment",
1455 "2", "comment [hash] (details)",
1456 "3", "comment [hash]",
1457 "4", "comment (details)",
1458 "5", "comment-only",
1459 "12","comment | details",
1460 };
1461 login_check_credentials();
1462 if( !g.perm.Setup ){
1463 login_needed(0);
1464 return;
1465
+10 -1
--- src/timeline.c
+++ src/timeline.c
@@ -252,10 +252,11 @@
252252
int bCommentGitStyle = 0; /* Only show comments through first blank line */
253253
int bHashBeforeComment = 0; /* Show hash before the comment */
254254
int bHashAfterComment = 0; /* Show hash after the comment */
255255
int bHashInDetail = 0; /* Show the hash inside the detail section */
256256
int bShowDetail; /* Show the detail section */
257
+ int bSeparateDetail; /* Detail in a separate column */
257258
int eCommentFormat; /* value for timeline-comment-format */
258259
const char *zDateFmt;
259260
int iTableId = timeline_tableid();
260261
261262
if( fossil_strcmp(g.zIpAddr, "127.0.0.1")==0 && db_open_local(0) ){
@@ -264,11 +265,12 @@
264265
zPrevDate[0] = 0;
265266
mxWikiLen = db_get_int("timeline-max-comment", 0);
266267
dateFormat = db_get_int("timeline-date-format", 0);
267268
bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
268269
eCommentFormat = db_get_int("timeline-comment-format", 0);
269
- bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
270
+ bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
271
+ bSeparateDetail = (eCommentFormat & 8)!=0; /* Bit 3 turns on the detail column */
270272
switch( (eCommentFormat>>1)&3 ){
271273
case 1: bHashAfterComment = 1; break;
272274
case 2: bHashInDetail = 1; break;
273275
default: bHashBeforeComment = 1; break;
274276
}
@@ -536,10 +538,17 @@
536538
537539
/* Generate extra information and hyperlinks to follow the comment.
538540
** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
539541
*/
540542
if( bShowDetail ){
543
+ if( bSeparateDetail ){
544
+ if( zBgClr && zBgClr[0] && rid!=selectedRid ){
545
+ @ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
546
+ }else{
547
+ @ <td class="timelineTableCell">
548
+ }
549
+ }
541550
if( zType[0]=='c' ){
542551
cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
543552
}else{
544553
cgi_printf("<span class='timelineDetail'>(");
545554
}
546555
--- src/timeline.c
+++ src/timeline.c
@@ -252,10 +252,11 @@
252 int bCommentGitStyle = 0; /* Only show comments through first blank line */
253 int bHashBeforeComment = 0; /* Show hash before the comment */
254 int bHashAfterComment = 0; /* Show hash after the comment */
255 int bHashInDetail = 0; /* Show the hash inside the detail section */
256 int bShowDetail; /* Show the detail section */
 
257 int eCommentFormat; /* value for timeline-comment-format */
258 const char *zDateFmt;
259 int iTableId = timeline_tableid();
260
261 if( fossil_strcmp(g.zIpAddr, "127.0.0.1")==0 && db_open_local(0) ){
@@ -264,11 +265,12 @@
264 zPrevDate[0] = 0;
265 mxWikiLen = db_get_int("timeline-max-comment", 0);
266 dateFormat = db_get_int("timeline-date-format", 0);
267 bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
268 eCommentFormat = db_get_int("timeline-comment-format", 0);
269 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
 
270 switch( (eCommentFormat>>1)&3 ){
271 case 1: bHashAfterComment = 1; break;
272 case 2: bHashInDetail = 1; break;
273 default: bHashBeforeComment = 1; break;
274 }
@@ -536,10 +538,17 @@
536
537 /* Generate extra information and hyperlinks to follow the comment.
538 ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
539 */
540 if( bShowDetail ){
 
 
 
 
 
 
 
541 if( zType[0]=='c' ){
542 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
543 }else{
544 cgi_printf("<span class='timelineDetail'>(");
545 }
546
--- src/timeline.c
+++ src/timeline.c
@@ -252,10 +252,11 @@
252 int bCommentGitStyle = 0; /* Only show comments through first blank line */
253 int bHashBeforeComment = 0; /* Show hash before the comment */
254 int bHashAfterComment = 0; /* Show hash after the comment */
255 int bHashInDetail = 0; /* Show the hash inside the detail section */
256 int bShowDetail; /* Show the detail section */
257 int bSeparateDetail; /* Detail in a separate column */
258 int eCommentFormat; /* value for timeline-comment-format */
259 const char *zDateFmt;
260 int iTableId = timeline_tableid();
261
262 if( fossil_strcmp(g.zIpAddr, "127.0.0.1")==0 && db_open_local(0) ){
@@ -264,11 +265,12 @@
265 zPrevDate[0] = 0;
266 mxWikiLen = db_get_int("timeline-max-comment", 0);
267 dateFormat = db_get_int("timeline-date-format", 0);
268 bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0);
269 eCommentFormat = db_get_int("timeline-comment-format", 0);
270 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
271 bSeparateDetail = (eCommentFormat & 8)!=0; /* Bit 3 turns on the detail column */
272 switch( (eCommentFormat>>1)&3 ){
273 case 1: bHashAfterComment = 1; break;
274 case 2: bHashInDetail = 1; break;
275 default: bHashBeforeComment = 1; break;
276 }
@@ -536,10 +538,17 @@
538
539 /* Generate extra information and hyperlinks to follow the comment.
540 ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
541 */
542 if( bShowDetail ){
543 if( bSeparateDetail ){
544 if( zBgClr && zBgClr[0] && rid!=selectedRid ){
545 @ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
546 }else{
547 @ <td class="timelineTableCell">
548 }
549 }
550 if( zType[0]=='c' ){
551 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
552 }else{
553 cgi_printf("<span class='timelineDetail'>(");
554 }
555

Keyboard Shortcuts

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