Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Draw arrows for cherrypick merges on the context graph. There is still no distinction between normal and cherrypick merges, though. Both arrows look alike. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
a07f1688818331268964036d6c128f79 |
| User & Date: | drh 2018-12-27 15:40:16.770 |
Context
|
2018-12-27
| ||
| 16:22 | Omit unused elements of the "rowinfo" JSON element used to generate a timeline graph. ... (check-in: c0a5083eda user: drh tags: trunk) | |
| 15:40 | Draw arrows for cherrypick merges on the context graph. There is still no distinction between normal and cherrypick merges, though. Both arrows look alike. ... (check-in: a07f168881 user: drh tags: trunk) | |
|
2018-12-26
| ||
| 23:38 | For checkins that are a cherrypick or that are cherrypicked, so the other side of the cherrypick merge in the "Context" section of the /info page. This enhancement requires a "fossil rebuild" in order to function. ... (check-in: 1c74e914e6 user: drh tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
277 278 279 280 281 282 283 |
" SELECT childid FROM cherrypick WHERE parentid=%d;",
rid, rid
);
}
}
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
db_prepare(&q, "%s", blob_sql_text(&sql));
| | > > > > | | 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
" SELECT childid FROM cherrypick WHERE parentid=%d;",
rid, rid
);
}
}
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
db_prepare(&q, "%s", blob_sql_text(&sql));
www_print_timeline(&q,
TIMELINE_DISJOINT
|TIMELINE_GRAPH
|TIMELINE_NOSCROLL
|TIMELINE_CHPICK,
0, 0, rid, 0);
db_finalize(&q);
}
/*
** Show a graph all wiki, tickets, and check-ins that refer to object zUuid.
**
** If zLabel is not NULL and the graph is not empty, then output zLabel as
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
89 90 91 92 93 94 95 | } } /* ** Allowed flags for the tmFlags argument to www_print_timeline */ #if INTERFACE | | | > | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
}
}
/*
** Allowed flags for the tmFlags argument to www_print_timeline
*/
#if INTERFACE
#define TIMELINE_ARTID 0x000001 /* Show artifact IDs on non-check-in lines*/
#define TIMELINE_LEAFONLY 0x000002 /* Show "Leaf" but not "Merge", "Fork" etc*/
#define TIMELINE_BRIEF 0x000004 /* Combine adjacent elements of same obj */
#define TIMELINE_GRAPH 0x000008 /* Compute a graph */
#define TIMELINE_DISJOINT 0x000010 /* Elements are not contiguous */
#define TIMELINE_FCHANGES 0x000020 /* Detail file changes */
#define TIMELINE_BRCOLOR 0x000040 /* Background color by branch name */
#define TIMELINE_UCOLOR 0x000080 /* Background color by user */
#define TIMELINE_FRENAMES 0x000100 /* Detail only file name changes */
#define TIMELINE_UNHIDE 0x000200 /* Unhide check-ins with "hidden" tag */
#define TIMELINE_SHOWRID 0x000400 /* Show RID values in addition to UUIDs */
#define TIMELINE_BISECT 0x000800 /* Show supplimental bisect information */
#define TIMELINE_COMPACT 0x001000 /* Use the "compact" view style */
#define TIMELINE_VERBOSE 0x002000 /* Use the "detailed" view style */
#define TIMELINE_MODERN 0x004000 /* Use the "modern" view style */
#define TIMELINE_COLUMNAR 0x008000 /* Use the "columns" view style */
#define TIMELINE_CLASSIC 0x010000 /* Use the "classic" view style */
#define TIMELINE_VIEWS 0x01f000 /* Mask for all of the view styles */
#define TIMELINE_NOSCROLL 0x100000 /* Don't scroll to the selection */
#define TIMELINE_FILEDIFF 0x200000 /* Show File differences, not ckin diffs */
#define TIMELINE_CHPICK 0x400000 /* Show cherrypick merges */
#endif
/*
** Hash a string and use the hash to determine a background color.
*/
char *hash_color(const char *z){
int i; /* Loop counter */
|
| ︙ | ︙ | |||
288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
if( tmFlags & TIMELINE_GRAPH ){
pGraph = graph_init();
}
db_static_prepare(&qbranch,
"SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
TAG_BRANCH
);
@ <table id="timelineTable%d(iTableId)" class="timelineTable">
blob_zero(&comment);
while( db_step(pQuery)==SQLITE_ROW ){
int rid = db_column_int(pQuery, 0);
const char *zUuid = db_column_text(pQuery, 1);
int isLeaf = db_column_int(pQuery, 5);
| > > > > > | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
if( tmFlags & TIMELINE_GRAPH ){
pGraph = graph_init();
}
db_static_prepare(&qbranch,
"SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
TAG_BRANCH
);
if( (tmFlags & TIMELINE_CHPICK)!=0
&& !db_table_exists("repository","cherrypick")
){
tmFlags &= ~TIMELINE_CHPICK;
}
@ <table id="timelineTable%d(iTableId)" class="timelineTable">
blob_zero(&comment);
while( db_step(pQuery)==SQLITE_ROW ){
int rid = db_column_int(pQuery, 0);
const char *zUuid = db_column_text(pQuery, 1);
int isLeaf = db_column_int(pQuery, 5);
|
| ︙ | ︙ | |||
433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
" ORDER BY isprim DESC /*sort*/"
);
db_bind_int(&qparent, ":rid", rid);
while( db_step(&qparent)==SQLITE_ROW && nParent<count(aParent) ){
aParent[nParent++] = db_column_int(&qparent, 0);
}
db_reset(&qparent);
gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr,
zUuid, isLeaf);
db_reset(&qbranch);
@ <div id="m%d(gidx)" class="tl-nodemark"></div>
}else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){
/* For technotes, make a graph node with nParent==(-1). This will
** not actually draw anything on the graph, but it will set the
| > > > > > > > > > > > > | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 |
" ORDER BY isprim DESC /*sort*/"
);
db_bind_int(&qparent, ":rid", rid);
while( db_step(&qparent)==SQLITE_ROW && nParent<count(aParent) ){
aParent[nParent++] = db_column_int(&qparent, 0);
}
db_reset(&qparent);
if( (tmFlags & TIMELINE_CHPICK)!=0 && nParent>0 ){
static Stmt qcherrypick;
db_static_prepare(&qcherrypick,
"SELECT parentid FROM cherrypick"
" WHERE childid=:rid AND parentid NOT IN phantom"
);
db_bind_int(&qcherrypick, ":rid", rid);
while( db_step(&qcherrypick)==SQLITE_ROW && nParent<count(aParent) ){
aParent[nParent++] = db_column_int(&qcherrypick, 0);
}
db_reset(&qcherrypick);
}
gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr,
zUuid, isLeaf);
db_reset(&qbranch);
@ <div id="m%d(gidx)" class="tl-nodemark"></div>
}else if( zType[0]=='e' && pGraph && zBgClr && zBgClr[0] ){
/* For technotes, make a graph node with nParent==(-1). This will
** not actually draw anything on the graph, but it will set the
|
| ︙ | ︙ |