Fossil SCM
Add a new timeline format that puts the details in a separate table column from the check-in comment.
Commit
dbb7447372c1ea60d6f0274d9a2719eb987d0bde4c785c989ad25c6ba56775cc
Parent
4102f608461115f…
3 files changed
+9
+1
+10
-1
+9
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -317,10 +317,11 @@ | ||
| 317 | 317 | int iTableId = timeline_tableid(); |
| 318 | 318 | int bHashBeforeComment = 0; /* Show hash before the comment */ |
| 319 | 319 | int bHashAfterComment = 0; /* Show hash after the comment */ |
| 320 | 320 | int bHashInDetail = 0; /* Show the hash inside the detail section */ |
| 321 | 321 | int bShowDetail; /* Show the detail section */ |
| 322 | + int bSeparateDetail; /* Detail section in a separate column */ | |
| 322 | 323 | int eCommentFormat; /* value for timeline-comment-format */ |
| 323 | 324 | |
| 324 | 325 | login_check_credentials(); |
| 325 | 326 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 326 | 327 | style_header("File History"); |
| @@ -331,10 +332,11 @@ | ||
| 331 | 332 | baseCheckin = name_to_rid_www("ci"); |
| 332 | 333 | zPrevDate[0] = 0; |
| 333 | 334 | zFilename = PD("name",""); |
| 334 | 335 | eCommentFormat = db_get_int("timeline-comment-format", 0); |
| 335 | 336 | bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */ |
| 337 | + bSeparateDetail = (eCommentFormat & 8)!=0; | |
| 336 | 338 | switch( (eCommentFormat>>1)&3 ){ |
| 337 | 339 | case 1: bHashAfterComment = 1; break; |
| 338 | 340 | case 2: bHashInDetail = 1; break; |
| 339 | 341 | default: bHashBeforeComment = 1; break; |
| 340 | 342 | } |
| @@ -522,10 +524,17 @@ | ||
| 522 | 524 | @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span> |
| 523 | 525 | if( bHashAfterComment && zUuid ){ |
| 524 | 526 | hyperlink_to_uuid(zUuid); |
| 525 | 527 | } |
| 526 | 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 | + } | |
| 527 | 536 | cgi_printf("<span class='timelineDetail timelineCheckinDetail'>("); |
| 528 | 537 | if( zUuid && bHashInDetail ){ |
| 529 | 538 | @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a> |
| 530 | 539 | if( fShowId ){ |
| 531 | 540 | int srcId = delta_source_rid(frid); |
| 532 | 541 |
| --- 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 |
+1
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1454,10 +1454,11 @@ | ||
| 1454 | 1454 | "1", "[hash] comment", |
| 1455 | 1455 | "2", "comment [hash] (details)", |
| 1456 | 1456 | "3", "comment [hash]", |
| 1457 | 1457 | "4", "comment (details)", |
| 1458 | 1458 | "5", "comment-only", |
| 1459 | + "12","comment | details", | |
| 1459 | 1460 | }; |
| 1460 | 1461 | login_check_credentials(); |
| 1461 | 1462 | if( !g.perm.Setup ){ |
| 1462 | 1463 | login_needed(0); |
| 1463 | 1464 | return; |
| 1464 | 1465 |
| --- 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 @@ | ||
| 252 | 252 | int bCommentGitStyle = 0; /* Only show comments through first blank line */ |
| 253 | 253 | int bHashBeforeComment = 0; /* Show hash before the comment */ |
| 254 | 254 | int bHashAfterComment = 0; /* Show hash after the comment */ |
| 255 | 255 | int bHashInDetail = 0; /* Show the hash inside the detail section */ |
| 256 | 256 | int bShowDetail; /* Show the detail section */ |
| 257 | + int bSeparateDetail; /* Detail in a separate column */ | |
| 257 | 258 | int eCommentFormat; /* value for timeline-comment-format */ |
| 258 | 259 | const char *zDateFmt; |
| 259 | 260 | int iTableId = timeline_tableid(); |
| 260 | 261 | |
| 261 | 262 | if( fossil_strcmp(g.zIpAddr, "127.0.0.1")==0 && db_open_local(0) ){ |
| @@ -264,11 +265,12 @@ | ||
| 264 | 265 | zPrevDate[0] = 0; |
| 265 | 266 | mxWikiLen = db_get_int("timeline-max-comment", 0); |
| 266 | 267 | dateFormat = db_get_int("timeline-date-format", 0); |
| 267 | 268 | bCommentGitStyle = db_get_int("timeline-truncate-at-blank", 0); |
| 268 | 269 | 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 */ | |
| 270 | 272 | switch( (eCommentFormat>>1)&3 ){ |
| 271 | 273 | case 1: bHashAfterComment = 1; break; |
| 272 | 274 | case 2: bHashInDetail = 1; break; |
| 273 | 275 | default: bHashBeforeComment = 1; break; |
| 274 | 276 | } |
| @@ -536,10 +538,17 @@ | ||
| 536 | 538 | |
| 537 | 539 | /* Generate extra information and hyperlinks to follow the comment. |
| 538 | 540 | ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)" |
| 539 | 541 | */ |
| 540 | 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 | + } | |
| 541 | 550 | if( zType[0]=='c' ){ |
| 542 | 551 | cgi_printf("<span class='timelineDetail timelineCheckinDetail'>("); |
| 543 | 552 | }else{ |
| 544 | 553 | cgi_printf("<span class='timelineDetail'>("); |
| 545 | 554 | } |
| 546 | 555 |
| --- 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 |