Check-in [2fa4df1e47]
Not logged in
Overview

SHA1 Hash:2fa4df1e47f17f1c10a79d024a817f13a7d0bf6f
Date: 2009-01-21 18:59:11
User: drh
Comment:Add timeline links on the leaves page. Also on the leaves page, do not show Merge labels on check-ins. The second part is the fix for ticket d6bb26f436d8299f95d63f45fa51c92acdc91c5a.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/branch.c from [dc15e48baa] to [df727f7105].

@@ -230,11 +230,11 @@
     "   AND tag.tagname GLOB 'sym-*'",
     rid
   );
   while( db_step(&q)==SQLITE_ROW ){
     const char *zTagName = db_column_text(&q, 0);
-    @ [<a href="%s(g.zBaseURL)/timeline?t=%T(zTagName)">%h(zTagName)</a>]
+    @ <a href="%s(g.zBaseURL)/timeline?t=%T(zTagName)">[timeline]</a>
   }
   db_finalize(&q);
 }
 
 /*

Modified src/descendants.c from [97b96f70b0] to [20b63066bd].

@@ -250,10 +250,19 @@
   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){
+  @ <a href="%s(g.zBaseURL)/timeline?p=%d(rid)">[timeline]</a>
+}
+
+/*
 ** WEBPAGE:  leaves
 **
 ** Find leaves of all branches.
 */
 void leaves_page(void){
@@ -298,11 +307,11 @@
     "%s"
     "   AND blob.rid IN leaves"
     " ORDER BY event.mtime DESC",
     timeline_query_for_www()
   );
-  www_print_timeline(&q, 0, 0);
+  www_print_timeline(&q, TIMELINE_LEAFONLY, leaves_extra);
   db_finalize(&q);
   @ <br clear="both">
   @ <script>
   @ function xin(id){
   @ }

Modified src/timeline.c from [fed5b9a0d2] to [59fa308491].

@@ -98,11 +98,12 @@
 
 /*
 ** Allowed flags for the tmFlags argument to www_print_timeline
 */
 #if INTERFACE
-#define TIMELINE_ARTID  0x0001   /* Show artifact IDs on non-check-in lines */
+#define TIMELINE_ARTID    0x0001  /* Show artifact IDs on non-check-in lines */
+#define TIMELINE_LEAFONLY 0x0002  /* Show "Leaf", but not "Merge", "Fork" etc */
 #endif
 
 /*
 ** Output a timeline in the web format given a query.  The query
 ** should return these columns:
@@ -170,18 +171,20 @@
     }else{
       @ <td valign="top" align="left">
     }
     if( zType[0]=='c' ){
       hyperlink_to_uuid_with_mouseover(zUuid, "xin", "xout", rid);
-      if( nParent>1 ){
-        @ <b>Merge</b>
-      }
-      if( nPChild>1 ){
-        if( count_nonbranch_children(rid)>1 ){
-          @ <b>Fork</b>
-        }else{
-          @ <b>Branch</b>
+      if( (tmFlags & TIMELINE_LEAFONLY)==0 ){
+        if( nParent>1 ){
+          @ <b>Merge</b>
+        }
+        if( nPChild>1 ){
+          if( count_nonbranch_children(rid)>1 ){
+            @ <b>Fork</b>
+          }else{
+            @ <b>Branch</b>
+          }
         }
       }
       if( isLeaf ){
         @ <b>Leaf</b>
       }