Diff
Not logged in

Differences From:

File src/timeline.c part of check-in [73c23a4279] - Add the ability to cancel existing tags from the web interface, on the "vedit" page. Disable the display of "Leaf" on the timeline for closed leaves. by drh on 2009-01-22 13:52:27. [view]

To:

File src/timeline.c part of check-in [cb31e90868] - Update the timeline so that it's use of "Leaf" conforms to the definition given in the documentation. by drh on 2009-01-23 22:20:01. [view]

@@ -173,23 +173,37 @@
     }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);
     }
@@ -254,11 +268,8 @@
     @   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')
@@ -272,9 +283,9 @@
     @  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;
 }