Fossil

Check-in [8b3e3e00]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a problem in which normal merge arrows were often drawn as normal merge arrows.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8b3e3e007e5f359e02e57cfc6e71c9545f4145a964953ba043024724eedab608
User & Date: drh 2018-12-27 20:13:30.367
Context
2018-12-27
20:34
Fix non-C89 variable declarations. ... (check-in: 33f1c741 user: drh tags: trunk)
20:13
Fix a problem in which normal merge arrows were often drawn as normal merge arrows. ... (check-in: 8b3e3e00 user: drh tags: trunk)
19:55
Attempt to draw the entire length of a cherrypick merge line using a dashed line. ... (check-in: 236586d6 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.c.
47
48
49
50
51
52
53

54
55
56
57
58
59
60
  GraphRow *pPrev;            /* Previous row */

  int idx;                    /* Row index.  First is 1.  0 used for "none" */
  int idxTop;                 /* Direct descendent highest up on the graph */
  GraphRow *pChild;           /* Child immediately above this node */
  u8 isDup;                   /* True if this is duplicate of a prior entry */
  u8 isLeaf;                  /* True if this is a leaf node */

  u8 timeWarp;                /* Child is earlier in time */
  u8 bDescender;              /* True if riser from bottom of graph to here. */
  i8 iRail;                   /* Which rail this check-in appears on. 0-based.*/
  i8 mergeOut;                /* Merge out to this rail.  -1 if no merge-out */
  u8 mergeIn[GR_MAX_RAIL];    /* Merge in from non-zero rails */
  int aiRiser[GR_MAX_RAIL];   /* Risers from this node to a higher row. */
  int mergeUpto;              /* Draw the mergeOut rail up to this level */







>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  GraphRow *pPrev;            /* Previous row */

  int idx;                    /* Row index.  First is 1.  0 used for "none" */
  int idxTop;                 /* Direct descendent highest up on the graph */
  GraphRow *pChild;           /* Child immediately above this node */
  u8 isDup;                   /* True if this is duplicate of a prior entry */
  u8 isLeaf;                  /* True if this is a leaf node */
  u8 hasNormalOutMerge;       /* Is parent of at laest 1 non-cherrypick merge */
  u8 timeWarp;                /* Child is earlier in time */
  u8 bDescender;              /* True if riser from bottom of graph to here. */
  i8 iRail;                   /* Which rail this check-in appears on. 0-based.*/
  i8 mergeOut;                /* Merge out to this rail.  -1 if no merge-out */
  u8 mergeIn[GR_MAX_RAIL];    /* Merge in from non-zero rails */
  int aiRiser[GR_MAX_RAIL];   /* Risers from this node to a higher row. */
  int mergeUpto;              /* Draw the mergeOut rail up to this level */
319
320
321
322
323
324
325



326
327
328
329
330
331
332
      mask = BIT(pParent->mergeOut);
      for(pLoop=pChild->pNext; pLoop && pLoop->rid!=pParent->rid;
           pLoop=pLoop->pNext){
        pLoop->railInUse |= mask;
      }
    }
  }



  pChild->mergeIn[pParent->mergeOut] = isCherrypick ? 2 : 1;
}

/*
** Compute the maximum rail number.
*/
static void find_max_rail(GraphContext *p){







>
>
>







320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
      mask = BIT(pParent->mergeOut);
      for(pLoop=pChild->pNext; pLoop && pLoop->rid!=pParent->rid;
           pLoop=pLoop->pNext){
        pLoop->railInUse |= mask;
      }
    }
  }
  if( !isCherrypick ){
    pParent->hasNormalOutMerge = 1;
  }
  pChild->mergeIn[pParent->mergeOut] = isCherrypick ? 2 : 1;
}

/*
** Compute the maximum rail number.
*/
static void find_max_rail(GraphContext *p){
Changes to src/timeline.c.
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
      if( pRow->mergeOut>=0 ){
        cgi_printf("\"mo\":%d,",      pRow->mergeOut);
        cgi_printf("\"mu\":%d,",      pRow->mergeUpto);
      }
      cgi_printf("\"u\":%d,",       pRow->aiRiser[pRow->iRail]);
      k = 0;
      if( pRow->isLeaf ) k |= 1;
      if( pRow->nCherrypick>=pRow->nParent-1 ) k |= 2;
      cgi_printf("\"f\":%d,",k);
      for(i=k=0; i<GR_MAX_RAIL; i++){
        if( i==pRow->iRail ) continue;
        if( pRow->aiRiser[i]>0 ){
          if( k==0 ){
            cgi_printf("\"au\":");
            cSep = '[';







|







904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
      if( pRow->mergeOut>=0 ){
        cgi_printf("\"mo\":%d,",      pRow->mergeOut);
        cgi_printf("\"mu\":%d,",      pRow->mergeUpto);
      }
      cgi_printf("\"u\":%d,",       pRow->aiRiser[pRow->iRail]);
      k = 0;
      if( pRow->isLeaf ) k |= 1;
      if( !pRow->hasNormalOutMerge ) k |= 2;
      cgi_printf("\"f\":%d,",k);
      for(i=k=0; i<GR_MAX_RAIL; i++){
        if( i==pRow->iRail ) continue;
        if( pRow->aiRiser[i]>0 ){
          if( k==0 ){
            cgi_printf("\"au\":");
            cSep = '[';