Check-in [cb31e90868]
Not logged in
Overview

SHA1 Hash:cb31e908681bce686566953fc0745cca15555c02
Date: 2009-01-23 22:20:01
User: drh
Comment:Update the timeline so that it's use of "Leaf" conforms to the definition given in the documentation.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/timeline.c from [16fff7bd26] to [467593ff4a].

@@ -172,25 +172,39 @@
       @ <td valign="top" align="left" bgcolor="%h(zBgClr)">
     }else{
       @ <td valign="top" align="left">
     }
     if( zType[0]=='c' ){
+      const char *azTag[5];
+      int nTag = 0;
       hyperlink_to_uuid_with_mouseover(zUuid, "xin", "xout", rid);
       if( (tmFlags & TIMELINE_LEAFONLY)==0 ){
         if( nParent>1 ){
-          @ <b>Merge</b>
+          azTag[nTag++] = "Merge";
         }
         if( nPChild>1 ){
           if( count_nonbranch_children(rid)>1 ){
-            @ <b>Fork</b>
+            azTag[nTag++] = "Fork";
           }else{
-            @ <b>Branch</b>
+            azTag[nTag++] = "Branch-Point";
           }
         }
       }
       if( isLeaf ){
-        @ <b>Leaf</b>
+        if( db_exists("SELECT 1 FROM tagxref"
+                      " WHERE rid=%d AND tagid=%d AND tagtype>0",
+                      rid, TAG_CLOSED) ){
+          azTag[nTag++] = "Closed-Leaf";
+        }else{
+          azTag[nTag++] = "Leaf";
+        }
+      }
+      if( nTag>0 ){
+        int i;
+        for(i=0; i<nTag; i++){
+          @ <b>%s(azTag[i])%s(i==nTag-1?"":",")</b>
+        }
       }
     }else if( (tmFlags & TIMELINE_ARTID)!=0 ){
       hyperlink_to_uuid(zUuid);
     }
     db_column_blob(pQuery, 3, &comment);
@@ -253,13 +267,10 @@
     @   datetime(event.mtime,'localtime') AS timestamp,
     @   coalesce(ecomment, comment),
     @   coalesce(euser, user),
     @   (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim=1),
     @   (SELECT count(*) FROM plink WHERE cid=blob.rid),
-    @   NOT EXISTS(SELECT 1 FROM tagxref
-    @               WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)
-    @   AND
     @   NOT EXISTS(SELECT 1 FROM plink
     @               WHERE pid=blob.rid
     @                AND coalesce((SELECT value FROM tagxref
     @                              WHERE tagid=%d AND rid=plink.pid), 'trunk')
     @                  = coalesce((SELECT value FROM tagxref
@@ -271,11 +282,11 @@
     @       AND tagxref.rid=blob.rid AND tagxref.tagtype>0)
     @  FROM event JOIN blob
     @ WHERE blob.rid=event.objid
   ;
   if( zBase==0 ){
-    zBase = mprintf(zBaseSql, TAG_CLOSED, TAG_BRANCH, TAG_BRANCH);
+    zBase = mprintf(zBaseSql, TAG_BRANCH, TAG_BRANCH);
   }
   return zBase;
 }
 
 /*