Fossil

Check-in [b6e66cdd]
Login

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

Overview
Comment:Remove extraneous hyperlinks from the Tags and Branches timelines since the "tag:" hyperlinks now cover that functionality.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1:b6e66cdd08f5513951aa6ef4a076c785cf2d820d
User & Date: drh 2011-01-28 21:52:30
Original Comment: Remove extraneous hyperlinks from the Tags and Branches timelines since the "tag:" hyperlinks now cover that functionality.
Context
2011-02-02
01:09
After a few days of internal use for testing, merge the changes for the new LEAF meta-data table into the trunk. NB: "fossil all rebuild" is required when updating through this change. check-in: 5ac4e151 user: drh tags: trunk
2011-01-28
21:52
Remove extraneous hyperlinks from the Tags and Branches timelines since the "tag:" hyperlinks now cover that functionality. Closed-Leaf check-in: b6e66cdd user: drh tags: experimental
20:56
Add a new meta-data table named LEAF that holds a precomputed set of all leaves in the checkin DAG. Use this precomputed table rather than trying to compute the LEAFs on the fly, as a performance enhancement for repositories with many checkins. A rebuild is required. check-in: 69f43fc0 user: drh tags: experimental
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/descendants.c.

274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
...
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_str(&sql));
  blob_reset(&sql);
  print_timeline(&q, 2000);
  db_finalize(&q);
}

/*
** This routine is called while for each check-in that is rendered by
** the "leaves" page.  Add some additional hyperlink to show the 
** ancestors of the leaf.
*/
static void leaves_extra(int rid){
  if( g.okHistory ){
    @ <a href="%s(g.zTop)/timeline?p=%d(rid)">[timeline]</a>
  }
}

/*
** WEBPAGE:  leaves
**
** Find leaves of all branches.
*/
void leaves_page(void){
  Blob sql;
................................................................................
  if( showClosed ){
    blob_appendf(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
  }else if( !showAll ){
    blob_appendf(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_str(&sql));
  blob_reset(&sql);
  www_print_timeline(&q, TIMELINE_LEAFONLY, 0, 0, leaves_extra);
  db_finalize(&q);
  @ <br />
  @ <script  type="text/JavaScript">
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }
  @ </script>
  style_footer();
}







<
<
<
<
<
<
<
<
<
<
<







 







|










274
275
276
277
278
279
280











281
282
283
284
285
286
287
...
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_str(&sql));
  blob_reset(&sql);
  print_timeline(&q, 2000);
  db_finalize(&q);
}












/*
** WEBPAGE:  leaves
**
** Find leaves of all branches.
*/
void leaves_page(void){
  Blob sql;
................................................................................
  if( showClosed ){
    blob_appendf(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
  }else if( !showAll ){
    blob_appendf(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
  }
  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_str(&sql));
  blob_reset(&sql);
  www_print_timeline(&q, TIMELINE_LEAFONLY, 0, 0, 0);
  db_finalize(&q);
  @ <br />
  @ <script  type="text/JavaScript">
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }
  @ </script>
  style_footer();
}

Changes to src/tag.c.

537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
...
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
    }
  }
  @ </ul>
  db_finalize(&q);
  style_footer();
}

/*
** Draw the names of all tags added to check-in rid.  Only tags
** that are directly applied to rid are named.  Propagated tags
** are omitted.
*/
static void tagtimeline_extra(int rid){
  Stmt q;
  db_prepare(&q, 
    "SELECT substr(tagname,5) FROM tagxref, tag"
    " WHERE tagxref.rid=%d"
    "   AND tagxref.tagid=tag.tagid"
    "   AND tagxref.tagtype>0 AND tagxref.srcid>0"
    "   AND tag.tagname GLOB 'sym-*'",
    rid
  );
  while( db_step(&q)==SQLITE_ROW ){
    const char *zTagName = db_column_text(&q, 0);
    if( g.okHistory ){
      @ <a class="tagLink" href="%s(g.zTop)/timeline?t=%T(zTagName)">
      @ [%h(zTagName)]</a>
    }else{
      @ <span class="tagDsp">[%h(zTagName)]</span>
    }
  }
  db_finalize(&q);
}

/*
** WEBPAGE: /tagtimeline
*/
void tagtimeline_page(void){
  Stmt q;

  login_check_credentials();
................................................................................
    "%s AND blob.rid IN (SELECT rid FROM tagxref"
    "                     WHERE tagtype=1 AND srcid>0"
    "                       AND tagid IN (SELECT tagid FROM tag "
    "                                      WHERE tagname GLOB 'sym-*'))"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www()
  );
  www_print_timeline(&q, 0, 0, 0, tagtimeline_extra);
  db_finalize(&q);
  @ <br />
  @ <script  type="text/JavaScript">
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }
  @ </script>
  style_footer();
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|










537
538
539
540
541
542
543



























544
545
546
547
548
549
550
...
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
    }
  }
  @ </ul>
  db_finalize(&q);
  style_footer();
}




























/*
** WEBPAGE: /tagtimeline
*/
void tagtimeline_page(void){
  Stmt q;

  login_check_credentials();
................................................................................
    "%s AND blob.rid IN (SELECT rid FROM tagxref"
    "                     WHERE tagtype=1 AND srcid>0"
    "                       AND tagid IN (SELECT tagid FROM tag "
    "                                      WHERE tagname GLOB 'sym-*'))"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www()
  );
  www_print_timeline(&q, 0, 0, 0, 0);
  db_finalize(&q);
  @ <br />
  @ <script  type="text/JavaScript">
  @ function xin(id){
  @ }
  @ function xout(id){
  @ }
  @ </script>
  style_footer();
}