Diff
Not logged in

Differences From:

File src/manifest.c part of check-in [0afb5e8e39] - This version is able to clone the entire TCL repository in 12.5 minutes and to rebuild the cloned TCL repository in 2.5 minutes. There is still a lot of performance work to be done, but this is good enough for the time being. by drh on 2008-03-08 14:52:56. [view]

To:

File src/manifest.c part of check-in [243e02bfbd] - Improvements to cloning performance. by drh on 2008-05-18 15:51:05. [view]

@@ -755,15 +755,28 @@
   manifest_clear(&other);
 }
 
 /*
-** Scan record rid/pContent to see if it is a manifest.  If
-** it is a manifest, then populate the mlink, plink,
-** filename, and event tables with cross-reference information.
+** Scan artifact rid/pContent to see if it is a control artifact of
+** any key:
+**
+**      *  Manifest
+**      *  Control
+**      *  Wiki Page
+**      *  Ticket Change
+**      *  Cluster
+**
+** If the input is a control artifact, then make appropriate entries
+** in the auxiliary tables of the database in order to crosslink the
+** artifact.
+**
+** If global variable g.xlinkClusterOnly is true, then ignore all
+** control artifacts other than clusters.
 **
-** (Later:) Also check to see if pContent is a cluster.  If it
-** is a cluster then remove all referenced elements from the
-** unclustered table and create phantoms for any unknown elements.
+** Historical note:  This routine original processed manifests only.
+** Processing for other control artifacts was added later.  The name
+** of the routine, "manifest_crosslink", and the name of this source
+** file, is a legacy of its original use.
 */
 int manifest_crosslink(int rid, Blob *pContent){
   int i;
   Manifest m;
@@ -770,8 +783,12 @@
   Stmt q;
   int parentid = 0;
 
   if( manifest_parse(&m, pContent)==0 ){
+    return 0;
+  }
+  if( g.xlinkClusterOnly && m.type!=CFTYPE_CLUSTER ){
+    manifest_clear(&m);
     return 0;
   }
   db_begin_transaction();
   if( m.type==CFTYPE_MANIFEST ){