Fossil SCM
Draw arrows for cherrypick merges on the context graph. There is still no distinction between normal and cherrypick merges, though. Both arrows look alike.
Commit
a07f1688818331268964036d6c128f79f010ab96dd6c42577ecb44aeac876562
Parent
1c74e914e60cb02…
2 files changed
+6
-2
+20
-2
+6
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -279,12 +279,16 @@ | ||
| 279 | 279 | ); |
| 280 | 280 | } |
| 281 | 281 | } |
| 282 | 282 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 283 | 283 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 284 | - www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL, | |
| 285 | - 0, 0, rid, 0); | |
| 284 | + www_print_timeline(&q, | |
| 285 | + TIMELINE_DISJOINT | |
| 286 | + |TIMELINE_GRAPH | |
| 287 | + |TIMELINE_NOSCROLL | |
| 288 | + |TIMELINE_CHPICK, | |
| 289 | + 0, 0, rid, 0); | |
| 286 | 290 | db_finalize(&q); |
| 287 | 291 | } |
| 288 | 292 | |
| 289 | 293 | /* |
| 290 | 294 | ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid. |
| 291 | 295 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -279,12 +279,16 @@ | |
| 279 | ); |
| 280 | } |
| 281 | } |
| 282 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 283 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 284 | www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL, |
| 285 | 0, 0, rid, 0); |
| 286 | db_finalize(&q); |
| 287 | } |
| 288 | |
| 289 | /* |
| 290 | ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid. |
| 291 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -279,12 +279,16 @@ | |
| 279 | ); |
| 280 | } |
| 281 | } |
| 282 | blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC"); |
| 283 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 284 | www_print_timeline(&q, |
| 285 | TIMELINE_DISJOINT |
| 286 | |TIMELINE_GRAPH |
| 287 | |TIMELINE_NOSCROLL |
| 288 | |TIMELINE_CHPICK, |
| 289 | 0, 0, rid, 0); |
| 290 | db_finalize(&q); |
| 291 | } |
| 292 | |
| 293 | /* |
| 294 | ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid. |
| 295 |
+20
-2
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -91,12 +91,12 @@ | ||
| 91 | 91 | |
| 92 | 92 | /* |
| 93 | 93 | ** Allowed flags for the tmFlags argument to www_print_timeline |
| 94 | 94 | */ |
| 95 | 95 | #if INTERFACE |
| 96 | -#define TIMELINE_ARTID 0x000001 /* Show artifact IDs on non-check-in lines */ | |
| 97 | -#define TIMELINE_LEAFONLY 0x000002 /* Show "Leaf" but not "Merge", "Fork" etc */ | |
| 96 | +#define TIMELINE_ARTID 0x000001 /* Show artifact IDs on non-check-in lines*/ | |
| 97 | +#define TIMELINE_LEAFONLY 0x000002 /* Show "Leaf" but not "Merge", "Fork" etc*/ | |
| 98 | 98 | #define TIMELINE_BRIEF 0x000004 /* Combine adjacent elements of same obj */ |
| 99 | 99 | #define TIMELINE_GRAPH 0x000008 /* Compute a graph */ |
| 100 | 100 | #define TIMELINE_DISJOINT 0x000010 /* Elements are not contiguous */ |
| 101 | 101 | #define TIMELINE_FCHANGES 0x000020 /* Detail file changes */ |
| 102 | 102 | #define TIMELINE_BRCOLOR 0x000040 /* Background color by branch name */ |
| @@ -111,10 +111,11 @@ | ||
| 111 | 111 | #define TIMELINE_COLUMNAR 0x008000 /* Use the "columns" view style */ |
| 112 | 112 | #define TIMELINE_CLASSIC 0x010000 /* Use the "classic" view style */ |
| 113 | 113 | #define TIMELINE_VIEWS 0x01f000 /* Mask for all of the view styles */ |
| 114 | 114 | #define TIMELINE_NOSCROLL 0x100000 /* Don't scroll to the selection */ |
| 115 | 115 | #define TIMELINE_FILEDIFF 0x200000 /* Show File differences, not ckin diffs */ |
| 116 | +#define TIMELINE_CHPICK 0x400000 /* Show cherrypick merges */ | |
| 116 | 117 | #endif |
| 117 | 118 | |
| 118 | 119 | /* |
| 119 | 120 | ** Hash a string and use the hash to determine a background color. |
| 120 | 121 | */ |
| @@ -290,10 +291,15 @@ | ||
| 290 | 291 | } |
| 291 | 292 | db_static_prepare(&qbranch, |
| 292 | 293 | "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid", |
| 293 | 294 | TAG_BRANCH |
| 294 | 295 | ); |
| 296 | + if( (tmFlags & TIMELINE_CHPICK)!=0 | |
| 297 | + && !db_table_exists("repository","cherrypick") | |
| 298 | + ){ | |
| 299 | + tmFlags &= ~TIMELINE_CHPICK; | |
| 300 | + } | |
| 295 | 301 | |
| 296 | 302 | @ <table id="timelineTable%d(iTableId)" class="timelineTable"> |
| 297 | 303 | blob_zero(&comment); |
| 298 | 304 | while( db_step(pQuery)==SQLITE_ROW ){ |
| 299 | 305 | int rid = db_column_int(pQuery, 0); |
| @@ -435,10 +441,22 @@ | ||
| 435 | 441 | db_bind_int(&qparent, ":rid", rid); |
| 436 | 442 | while( db_step(&qparent)==SQLITE_ROW && nParent<count(aParent) ){ |
| 437 | 443 | aParent[nParent++] = db_column_int(&qparent, 0); |
| 438 | 444 | } |
| 439 | 445 | db_reset(&qparent); |
| 446 | + if( (tmFlags & TIMELINE_CHPICK)!=0 && nParent>0 ){ | |
| 447 | + static Stmt qcherrypick; | |
| 448 | + db_static_prepare(&qcherrypick, | |
| 449 | + "SELECT parentid FROM cherrypick" | |
| 450 | + " WHERE childid=:rid AND parentid NOT IN phantom" | |
| 451 | + ); | |
| 452 | + db_bind_int(&qcherrypick, ":rid", rid); | |
| 453 | + while( db_step(&qcherrypick)==SQLITE_ROW && nParent<count(aParent) ){ | |
| 454 | + aParent[nParent++] = db_column_int(&qcherrypick, 0); | |
| 455 | + } | |
| 456 | + db_reset(&qcherrypick); | |
| 457 | + } | |
| 440 | 458 | gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr, |
| 441 | 459 | zUuid, isLeaf); |
| 442 | 460 | db_reset(&qbranch); |
| 443 | 461 | @ <div id="m%d(gidx)" class="tl-nodemark"></div> |
| 444 | 462 | }else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){ |
| 445 | 463 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -91,12 +91,12 @@ | |
| 91 | |
| 92 | /* |
| 93 | ** Allowed flags for the tmFlags argument to www_print_timeline |
| 94 | */ |
| 95 | #if INTERFACE |
| 96 | #define TIMELINE_ARTID 0x000001 /* Show artifact IDs on non-check-in lines */ |
| 97 | #define TIMELINE_LEAFONLY 0x000002 /* Show "Leaf" but not "Merge", "Fork" etc */ |
| 98 | #define TIMELINE_BRIEF 0x000004 /* Combine adjacent elements of same obj */ |
| 99 | #define TIMELINE_GRAPH 0x000008 /* Compute a graph */ |
| 100 | #define TIMELINE_DISJOINT 0x000010 /* Elements are not contiguous */ |
| 101 | #define TIMELINE_FCHANGES 0x000020 /* Detail file changes */ |
| 102 | #define TIMELINE_BRCOLOR 0x000040 /* Background color by branch name */ |
| @@ -111,10 +111,11 @@ | |
| 111 | #define TIMELINE_COLUMNAR 0x008000 /* Use the "columns" view style */ |
| 112 | #define TIMELINE_CLASSIC 0x010000 /* Use the "classic" view style */ |
| 113 | #define TIMELINE_VIEWS 0x01f000 /* Mask for all of the view styles */ |
| 114 | #define TIMELINE_NOSCROLL 0x100000 /* Don't scroll to the selection */ |
| 115 | #define TIMELINE_FILEDIFF 0x200000 /* Show File differences, not ckin diffs */ |
| 116 | #endif |
| 117 | |
| 118 | /* |
| 119 | ** Hash a string and use the hash to determine a background color. |
| 120 | */ |
| @@ -290,10 +291,15 @@ | |
| 290 | } |
| 291 | db_static_prepare(&qbranch, |
| 292 | "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid", |
| 293 | TAG_BRANCH |
| 294 | ); |
| 295 | |
| 296 | @ <table id="timelineTable%d(iTableId)" class="timelineTable"> |
| 297 | blob_zero(&comment); |
| 298 | while( db_step(pQuery)==SQLITE_ROW ){ |
| 299 | int rid = db_column_int(pQuery, 0); |
| @@ -435,10 +441,22 @@ | |
| 435 | db_bind_int(&qparent, ":rid", rid); |
| 436 | while( db_step(&qparent)==SQLITE_ROW && nParent<count(aParent) ){ |
| 437 | aParent[nParent++] = db_column_int(&qparent, 0); |
| 438 | } |
| 439 | db_reset(&qparent); |
| 440 | gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr, |
| 441 | zUuid, isLeaf); |
| 442 | db_reset(&qbranch); |
| 443 | @ <div id="m%d(gidx)" class="tl-nodemark"></div> |
| 444 | }else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){ |
| 445 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -91,12 +91,12 @@ | |
| 91 | |
| 92 | /* |
| 93 | ** Allowed flags for the tmFlags argument to www_print_timeline |
| 94 | */ |
| 95 | #if INTERFACE |
| 96 | #define TIMELINE_ARTID 0x000001 /* Show artifact IDs on non-check-in lines*/ |
| 97 | #define TIMELINE_LEAFONLY 0x000002 /* Show "Leaf" but not "Merge", "Fork" etc*/ |
| 98 | #define TIMELINE_BRIEF 0x000004 /* Combine adjacent elements of same obj */ |
| 99 | #define TIMELINE_GRAPH 0x000008 /* Compute a graph */ |
| 100 | #define TIMELINE_DISJOINT 0x000010 /* Elements are not contiguous */ |
| 101 | #define TIMELINE_FCHANGES 0x000020 /* Detail file changes */ |
| 102 | #define TIMELINE_BRCOLOR 0x000040 /* Background color by branch name */ |
| @@ -111,10 +111,11 @@ | |
| 111 | #define TIMELINE_COLUMNAR 0x008000 /* Use the "columns" view style */ |
| 112 | #define TIMELINE_CLASSIC 0x010000 /* Use the "classic" view style */ |
| 113 | #define TIMELINE_VIEWS 0x01f000 /* Mask for all of the view styles */ |
| 114 | #define TIMELINE_NOSCROLL 0x100000 /* Don't scroll to the selection */ |
| 115 | #define TIMELINE_FILEDIFF 0x200000 /* Show File differences, not ckin diffs */ |
| 116 | #define TIMELINE_CHPICK 0x400000 /* Show cherrypick merges */ |
| 117 | #endif |
| 118 | |
| 119 | /* |
| 120 | ** Hash a string and use the hash to determine a background color. |
| 121 | */ |
| @@ -290,10 +291,15 @@ | |
| 291 | } |
| 292 | db_static_prepare(&qbranch, |
| 293 | "SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid", |
| 294 | TAG_BRANCH |
| 295 | ); |
| 296 | if( (tmFlags & TIMELINE_CHPICK)!=0 |
| 297 | && !db_table_exists("repository","cherrypick") |
| 298 | ){ |
| 299 | tmFlags &= ~TIMELINE_CHPICK; |
| 300 | } |
| 301 | |
| 302 | @ <table id="timelineTable%d(iTableId)" class="timelineTable"> |
| 303 | blob_zero(&comment); |
| 304 | while( db_step(pQuery)==SQLITE_ROW ){ |
| 305 | int rid = db_column_int(pQuery, 0); |
| @@ -435,10 +441,22 @@ | |
| 441 | db_bind_int(&qparent, ":rid", rid); |
| 442 | while( db_step(&qparent)==SQLITE_ROW && nParent<count(aParent) ){ |
| 443 | aParent[nParent++] = db_column_int(&qparent, 0); |
| 444 | } |
| 445 | db_reset(&qparent); |
| 446 | if( (tmFlags & TIMELINE_CHPICK)!=0 && nParent>0 ){ |
| 447 | static Stmt qcherrypick; |
| 448 | db_static_prepare(&qcherrypick, |
| 449 | "SELECT parentid FROM cherrypick" |
| 450 | " WHERE childid=:rid AND parentid NOT IN phantom" |
| 451 | ); |
| 452 | db_bind_int(&qcherrypick, ":rid", rid); |
| 453 | while( db_step(&qcherrypick)==SQLITE_ROW && nParent<count(aParent) ){ |
| 454 | aParent[nParent++] = db_column_int(&qcherrypick, 0); |
| 455 | } |
| 456 | db_reset(&qcherrypick); |
| 457 | } |
| 458 | gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr, |
| 459 | zUuid, isLeaf); |
| 460 | db_reset(&qbranch); |
| 461 | @ <div id="m%d(gidx)" class="tl-nodemark"></div> |
| 462 | }else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){ |
| 463 |