Fossil

Check-in [d7d335a6]
Login

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

Overview
Comment:Merge latest trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | symlinks
Files: files | file ages | folders
SHA1:d7d335a6920257d00ed6605309ac9838dd044519
User & Date: dmitry 2011-02-07 17:51:49
Context
2011-02-07
17:57
Fix issue introduced by previous fix. check-in: 9fbc052c user: dmitry tags: symlinks
17:51
Merge latest trunk. check-in: d7d335a6 user: dmitry tags: symlinks
17:50
Fix segmentation fault in historical_version_of_file() when file has no permissions in manifest. check-in: 8e4e30fb user: dmitry tags: symlinks
14:35
Fix documentation typos. check-in: 49cbf5e5 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/branch.c.

   203    203       char *zCurrent = 0;
   204    204   
   205    205       if( g.localOpen ){
   206    206         vid = db_lget_int("checkout", 0);
   207    207         zCurrent = db_text(0, "SELECT value FROM tagxref"
   208    208                               " WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH);
   209    209       }
   210         -    compute_leaves(0, 1);
   211    210       db_prepare(&q,
   212    211         "SELECT DISTINCT value FROM tagxref"
   213         -      " WHERE tagid=%d AND value NOT NULL AND rid IN leaves"
          212  +      " WHERE tagid=%d AND value NOT NULL"
          213  +      "   AND rid IN leaf"
          214  +      "   AND NOT %z"
   214    215         " ORDER BY value /*sort*/",
   215         -      TAG_BRANCH
          216  +      TAG_BRANCH, leaf_is_closed_sql("tagxref.rid")
   216    217       );
   217    218       while( db_step(&q)==SQLITE_ROW ){
   218    219         const char *zBr = db_column_text(&q, 0);
   219    220         int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0;
   220    221         printf("%s%s\n", (isCur ? "* " : "  "), zBr);
   221    222       }
   222    223       db_finalize(&q);
................................................................................
   243    244     style_submenu_element("Timeline", "Timeline", "brtimeline");
   244    245     if( showClosed ){
   245    246       style_submenu_element("Open","Open","brlist");
   246    247     }else{
   247    248       style_submenu_element("Closed","Closed","brlist?closed");
   248    249     }
   249    250     login_anonymous_available();
   250         -  compute_leaves(0, 1);
   251    251     style_sidebox_begin("Nomenclature:", "33%");
   252    252     @ <ol>
   253    253     @ <li> An <div class="sideboxDescribed"><a href="brlist">
   254    254     @ open branch</a></div> is a branch that has one or
   255    255     @ more <a href="leaves">open leaves.</a>
   256    256     @ The presence of open leaves presumably means
   257    257     @ that the branch is still being extended with new check-ins.</li>
................................................................................
   261    261     @ closed leaves</a></div>.
   262    262     @ Closed branches are fixed and do not change (unless they are first
   263    263     @ reopened)</li>
   264    264     @ </ol>
   265    265     style_sidebox_end();
   266    266   
   267    267     cnt = 0;
   268         -  if( !showClosed ){
   269         -    db_prepare(&q,
   270         -      "SELECT DISTINCT value FROM tagxref"
   271         -      " WHERE tagid=%d AND value NOT NULL"
   272         -      "   AND rid IN leaves"
   273         -      " ORDER BY value /*sort*/",
   274         -      TAG_BRANCH
   275         -    );
   276         -  }else{
   277         -    db_prepare(&q,
   278         -      "SELECT value FROM tagxref"
   279         -      " WHERE tagid=%d AND value NOT NULL"
   280         -      " EXCEPT "
   281         -      "SELECT value FROM tagxref"
   282         -      " WHERE tagid=%d AND value NOT NULL"
   283         -      "   AND rid IN leaves"
   284         -      " ORDER BY value /*sort*/",
   285         -      TAG_BRANCH, TAG_BRANCH
   286         -    );
   287         -  }
          268  +  db_prepare(&q,
          269  +    "SELECT DISTINCT value FROM tagxref"
          270  +    " WHERE tagid=%d AND value NOT NULL"
          271  +    "   AND rid IN leaf"
          272  +    "   AND %s %z"
          273  +    " ORDER BY value /*sort*/",
          274  +    TAG_BRANCH, showClosed ? "" : "NOT", leaf_is_closed_sql("tagxref.rid")
          275  +  );
   288    276     while( db_step(&q)==SQLITE_ROW ){
   289    277       const char *zBr = db_column_text(&q, 0);
   290    278       if( cnt==0 ){
   291    279         if( showClosed ){
   292    280           @ <h2>Closed Branches:</h2>
   293    281         }else{
   294    282           @ <h2>Open Branches:</h2>

Changes to src/db.c.

   121    121   void db_end_transaction(int rollbackFlag){
   122    122     if( g.db==0 ) return;
   123    123     if( nBegin<=0 ) return;
   124    124     if( rollbackFlag ) doRollback = 1;
   125    125     nBegin--;
   126    126     if( nBegin==0 ){
   127    127       int i;
          128  +    if( doRollback==0 ) leaf_do_pending_checks();
   128    129       for(i=0; doRollback==0 && i<nCommitHook; i++){
   129    130         doRollback |= aHook[i].xHook();
   130    131       }
   131    132       while( pAllStmt ){
   132    133         db_finalize(pAllStmt);
   133    134       }
   134    135       db_multi_exec(doRollback ? "ROLLBACK" : "COMMIT");

Changes to src/descendants.c.

    23     23   #include <assert.h>
    24     24   
    25     25   
    26     26   /*
    27     27   ** Create a temporary table named "leaves" if it does not
    28     28   ** already exist.  Load this table with the RID of all
    29     29   ** check-ins that are leaves which are decended from
    30         -** check-in iBase.  If iBase==0, find all leaves within the
    31         -** entire check-in hierarchy.
           30  +** check-in iBase.
    32     31   **
    33     32   ** A "leaf" is a check-in that has no children in the same branch.
           33  +** There is a separate permanent table LEAF that contains all leaves
           34  +** in the tree.  This routine is used to compute a subset of that
           35  +** table consisting of leaves that are descended from a single checkin.
    34     36   **
    35     37   ** The closeMode flag determines behavior associated with the "closed"
    36     38   ** tag:
    37     39   **
    38     40   **    closeMode==0       Show all leaves regardless of the "closed" tag.
    39     41   **
    40     42   **    closeMode==1       Show only leaves without the "closed" tag.
................................................................................
    53     55     db_multi_exec(
    54     56       "CREATE TEMP TABLE IF NOT EXISTS leaves("
    55     57       "  rid INTEGER PRIMARY KEY"
    56     58       ");"
    57     59       "DELETE FROM leaves;"
    58     60     );
    59     61   
    60         -  /* We are checking all descendants of iBase.  If iBase==0, then
    61         -  ** use a short-cut to find all leaves anywhere in the hierarchy.
    62         -  */
    63         -  if( iBase<=0 ){
    64         -    db_multi_exec(
    65         -      "INSERT OR IGNORE INTO leaves"
    66         -      "  SELECT cid FROM plink"
    67         -      "  EXCEPT"
    68         -      "  SELECT pid FROM plink"
    69         -      "   WHERE coalesce((SELECT value FROM tagxref"
    70         -                         " WHERE tagid=%d AND rid=plink.pid),'trunk')"
    71         -           " == coalesce((SELECT value FROM tagxref"
    72         -                         " WHERE tagid=%d AND rid=plink.cid),'trunk');",
    73         -      TAG_BRANCH, TAG_BRANCH
    74         -    );
    75         -  }else{
           62  +  if( iBase>0 ){
    76     63       Bag seen;     /* Descendants seen */
    77     64       Bag pending;  /* Unpropagated descendants */
    78     65       Stmt q1;      /* Query to find children of a check-in */
    79     66       Stmt isBr;    /* Query to check to see if a check-in starts a new branch */
    80     67       Stmt ins;     /* INSERT statement for a new record */
    81     68   
    82     69       /* Initialize the bags. */
................................................................................
   260    247   ** COMMAND:  leaves
   261    248   **
   262    249   ** Usage: %fossil leaves ?--all? ?--closed?
   263    250   **
   264    251   ** Find leaves of all branches.  By default show only open leaves.
   265    252   ** The --all flag causes all leaves (closed and open) to be shown.
   266    253   ** The --closed flag shows only closed leaves.
          254  +**
          255  +** The --recompute flag causes the content of the "leaf" table in the
          256  +** repository database to be recomputed.
   267    257   */
   268    258   void leaves_cmd(void){
   269    259     Stmt q;
          260  +  Blob sql;
   270    261     int showAll = find_option("all", 0, 0)!=0;
   271    262     int showClosed = find_option("closed", 0, 0)!=0;
          263  +  int recomputeFlag = find_option("recompute",0,0)!=0;
   272    264   
   273    265     db_must_be_within_tree();
   274         -  compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
   275         -  db_prepare(&q,
   276         -    "%s"
   277         -    "   AND blob.rid IN leaves"
   278         -    " ORDER BY event.mtime DESC",
   279         -    timeline_query_for_tty()
   280         -  );
          266  +  if( recomputeFlag ) leaf_rebuild();
          267  +  blob_zero(&sql);
          268  +  blob_append(&sql, timeline_query_for_tty(), -1);
          269  +  blob_appendf(&sql, " AND blob.rid IN leaf");
          270  +  if( showClosed ){
          271  +    blob_appendf(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
          272  +  }else if( !showAll ){
          273  +    blob_appendf(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
          274  +  }
          275  +  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_str(&sql));
          276  +  blob_reset(&sql);
   281    277     print_timeline(&q, 2000);
   282    278     db_finalize(&q);
   283    279   }
   284    280   
   285         -/*
   286         -** This routine is called while for each check-in that is rendered by
   287         -** the "leaves" page.  Add some additional hyperlink to show the 
   288         -** ancestors of the leaf.
   289         -*/
   290         -static void leaves_extra(int rid){
   291         -  if( g.okHistory ){
   292         -    @ <a href="%s(g.zTop)/timeline?p=%d(rid)">[timeline]</a>
   293         -  }
   294         -}
   295         -
   296    281   /*
   297    282   ** WEBPAGE:  leaves
   298    283   **
   299    284   ** Find leaves of all branches.
   300    285   */
   301    286   void leaves_page(void){
          287  +  Blob sql;
   302    288     Stmt q;
   303    289     int showAll = P("all")!=0;
   304    290     int showClosed = P("closed")!=0;
   305    291   
   306    292     login_check_credentials();
   307    293     if( !g.okRead ){ login_needed(); return; }
   308    294   
................................................................................
   313    299       style_submenu_element("Closed", "Closed", "leaves?closed");
   314    300     }
   315    301     if( showClosed || showAll ){
   316    302       style_submenu_element("Open", "Open", "leaves");
   317    303     }
   318    304     style_header("Leaves");
   319    305     login_anonymous_available();
   320         -  compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1);
   321    306     style_sidebox_begin("Nomenclature:", "33%");
   322    307     @ <ol>
   323    308     @ <li> A <div class="sideboxDescribed">leaf</div>
   324    309     @ is a check-in with no descendants in the same branch.</li>
   325    310     @ <li> An <div class="sideboxDescribed">open leaf</div>
   326    311     @ is a leaf that does not have a "closed" tag
   327    312     @ and is thus assumed to still be in use.</li>
................................................................................
   334    319     if( showAll ){
   335    320       @ <h1>All leaves, both open and closed:</h1>
   336    321     }else if( showClosed ){
   337    322       @ <h1>Closed leaves:</h1>
   338    323     }else{
   339    324       @ <h1>Open leaves:</h1>
   340    325     }
   341         -  db_prepare(&q,
   342         -    "%s"
   343         -    "   AND blob.rid IN leaves"
   344         -    " ORDER BY event.mtime DESC",
   345         -    timeline_query_for_www()
   346         -  );
   347         -  www_print_timeline(&q, TIMELINE_LEAFONLY, 0, 0, leaves_extra);
          326  +  blob_zero(&sql);
          327  +  blob_append(&sql, timeline_query_for_www(), -1);
          328  +  blob_appendf(&sql, " AND blob.rid IN leaf");
          329  +  if( showClosed ){
          330  +    blob_appendf(&sql," AND %z", leaf_is_closed_sql("blob.rid"));
          331  +  }else if( !showAll ){
          332  +    blob_appendf(&sql," AND NOT %z", leaf_is_closed_sql("blob.rid"));
          333  +  }
          334  +  db_prepare(&q, "%s ORDER BY event.mtime DESC", blob_str(&sql));
          335  +  blob_reset(&sql);
          336  +  www_print_timeline(&q, TIMELINE_LEAFONLY, 0, 0, 0);
   348    337     db_finalize(&q);
   349    338     @ <br />
   350    339     @ <script  type="text/JavaScript">
   351    340     @ function xin(id){
   352    341     @ }
   353    342     @ function xout(id){
   354    343     @ }
   355    344     @ </script>
   356    345     style_footer();
   357    346   }

Changes to src/diffcmd.c.

    68     68         }
    69     69         zName2 = zName;
    70     70       }
    71     71   
    72     72       /* Compute and output the differences */
    73     73       blob_zero(&out);
    74     74       text_diff(pFile1, &file2, &out, 5, ignoreEolWs);
    75         -    printf("--- %s\n+++ %s\n", zName, zName2);
    76         -    printf("%s\n", blob_str(&out));
           75  +    if( blob_size(&out) ){
           76  +      printf("--- %s\n+++ %s\n", zName, zName2);
           77  +      printf("%s\n", blob_str(&out));
           78  +    }
    77     79   
    78     80       /* Release memory resources */
    79     81       blob_reset(&file2);
    80     82       blob_reset(&out);
    81     83     }else{
    82     84       int cnt = 0;
    83     85       Blob nameFile1;    /* Name of temporary file to old pFile1 content */

Changes to src/graph.c.

    19     19   */
    20     20   #include "config.h"
    21     21   #include "graph.h"
    22     22   #include <assert.h>
    23     23   
    24     24   #if INTERFACE
    25     25   
    26         -#define GR_MAX_PARENT 10      /* Max number of parents for any one node */
    27     26   #define GR_MAX_RAIL   32      /* Max number of "rails" to display */
    28     27   
    29     28   /* The graph appears vertically beside a timeline.  Each row in the
    30     29   ** timeline corresponds to a row in the graph.  GraphRow.idx is 0 for
    31     30   ** the top-most row and increases moving down.  Hence (in the absence of
    32     31   ** time skew) parents have a larger index than their children.
    33     32   */
    34     33   struct GraphRow {
    35     34     int rid;                    /* The rid for the check-in */
    36     35     i8 nParent;                 /* Number of parents */
    37         -  int aParent[GR_MAX_PARENT]; /* Array of parents.  0 element is primary .*/
           36  +  int *aParent;               /* Array of parents.  0 element is primary .*/
    38     37     char *zBranch;              /* Branch name */
    39     38     char *zBgClr;               /* Background Color */
    40     39   
    41     40     GraphRow *pNext;            /* Next row down in the list of all rows */
    42     41     GraphRow *pPrev;            /* Previous row */
    43     42     
    44     43     int idx;                    /* Row index.  First is 1.  0 used for "none" */
................................................................................
   165    164     int rid,             /* RID for the check-in */
   166    165     int nParent,         /* Number of parents */
   167    166     int *aParent,        /* Array of parents */
   168    167     const char *zBranch, /* Branch for this check-in */
   169    168     const char *zBgClr   /* Background color. NULL or "" for white. */
   170    169   ){
   171    170     GraphRow *pRow;
          171  +  int nByte;
   172    172   
   173    173     if( p->nErr ) return 0;
   174         -  if( nParent>GR_MAX_PARENT ){ p->nErr++; return 0; }
   175         -  pRow = (GraphRow*)safeMalloc( sizeof(GraphRow) );
          174  +  nByte = sizeof(GraphRow);
          175  +  nByte += sizeof(pRow->aParent[0])*nParent;
          176  +  pRow = (GraphRow*)safeMalloc( nByte );
          177  +  pRow->aParent = (int*)&pRow[1];
   176    178     pRow->rid = rid;
   177    179     pRow->nParent = nParent;
   178    180     pRow->zBranch = persistBranchName(p, zBranch);
   179    181     if( zBgClr==0 || zBgClr[0]==0 ) zBgClr = "white";
   180    182     pRow->zBgClr = persistBranchName(p, zBgClr);
   181    183     memcpy(pRow->aParent, aParent, sizeof(aParent[0])*nParent);
   182    184     if( p->pFirst==0 ){

Added src/leaf.c.

            1  +/*
            2  +** Copyright (c) 2011 D. Richard Hipp
            3  +**
            4  +** This program is free software; you can redistribute it and/or
            5  +** modify it under the terms of the Simplified BSD License (also
            6  +** known as the "2-Clause License" or "FreeBSD License".)
            7  +
            8  +** This program is distributed in the hope that it will be useful,
            9  +** but without any warranty; without even the implied warranty of
           10  +** merchantability or fitness for a particular purpose.
           11  +**
           12  +** Author contact information:
           13  +**   drh@hwaci.com
           14  +**   http://www.hwaci.com/drh/
           15  +**
           16  +*******************************************************************************
           17  +**
           18  +** This file contains code used to manage the "leaf" table of the
           19  +** repository.
           20  +**
           21  +** The LEAF table contains the rids for all leaves in the checkin DAG.
           22  +** A leaf is a checkin that has no children in the same branch.
           23  +*/
           24  +#include "config.h"
           25  +#include "leaf.h"
           26  +#include <assert.h>
           27  +
           28  +
           29  +/*
           30  +** Recompute the entire LEAF table.  
           31  +**
           32  +** This can be expensive (5 seconds or so) for a really large repository.
           33  +** So it is only done for things like a rebuild.
           34  +*/
           35  +void leaf_rebuild(void){
           36  +  db_multi_exec(
           37  +    "DELETE FROM leaf;"
           38  +    "INSERT OR IGNORE INTO leaf"
           39  +    "  SELECT cid FROM plink"
           40  +    "  EXCEPT"
           41  +    "  SELECT pid FROM plink"
           42  +    "   WHERE coalesce((SELECT value FROM tagxref"
           43  +                       " WHERE tagid=%d AND rid=plink.pid),'trunk')"
           44  +         " == coalesce((SELECT value FROM tagxref"
           45  +                       " WHERE tagid=%d AND rid=plink.cid),'trunk');",
           46  +    TAG_BRANCH, TAG_BRANCH
           47  +  );
           48  +}
           49  +
           50  +/*
           51  +** A bag of checkins whose leaf status needs to be checked.
           52  +*/
           53  +static Bag needToCheck;
           54  +
           55  +/*
           56  +** Check to see if checkin "rid" is a leaf and either add it to the LEAF
           57  +** table if it is, or remove it if it is not.
           58  +*/
           59  +void leaf_check(int rid){
           60  +  static Stmt checkIfLeaf;
           61  +  static Stmt addLeaf;
           62  +  static Stmt removeLeaf;
           63  +  int rc;
           64  +
           65  +  db_static_prepare(&checkIfLeaf,
           66  +    "SELECT 1 FROM plink"
           67  +    " WHERE pid=:rid"
           68  +    "   AND coalesce((SELECT value FROM tagxref"
           69  +                    " WHERE tagid=%d AND rid=:rid),'trunk')"
           70  +       " == coalesce((SELECT value FROM tagxref"
           71  +                    " WHERE tagid=%d AND rid=plink.cid),'trunk');",
           72  +    TAG_BRANCH, TAG_BRANCH
           73  +  );
           74  +  db_bind_int(&checkIfLeaf, ":rid", rid);
           75  +  rc = db_step(&checkIfLeaf);
           76  +  db_reset(&checkIfLeaf);
           77  +  if( rc==SQLITE_ROW ){
           78  +    db_static_prepare(&removeLeaf, "DELETE FROM leaf WHERE rid=:rid");
           79  +    db_bind_int(&removeLeaf, ":rid", rid);
           80  +    db_step(&removeLeaf);
           81  +    db_reset(&removeLeaf);
           82  +  }else{
           83  +    db_static_prepare(&addLeaf, "INSERT OR IGNORE INTO leaf VALUES(:rid)");
           84  +    db_bind_int(&addLeaf, ":rid", rid);
           85  +    db_step(&addLeaf);
           86  +    db_reset(&addLeaf);
           87  +  }
           88  +}
           89  +
           90  +/*
           91  +** Return an SQL expression (stored in memory obtained from fossil_malloc())
           92  +** that is true if the SQL variable named "zVar" contains the rid with
           93  +** a CLOSED tag.  In other words, return true if the leaf is closed.
           94  +**
           95  +** The result can be prefaced with a NOT operator to get all leaves that
           96  +** are open.
           97  +*/
           98  +char *leaf_is_closed_sql(const char *zVar){
           99  +  return mprintf(
          100  +    "EXISTS(SELECT 1 FROM tagxref AS tx"
          101  +           " WHERE tx.rid=%s"
          102  +             " AND tx.tagid=%d"
          103  +             " AND tx.tagtype>0)",
          104  +    zVar, TAG_CLOSED
          105  +  );
          106  +}
          107  +
          108  +/*
          109  +** Schedule a leaf check for "rid" and its parents.
          110  +*/
          111  +void leaf_eventually_check(int rid){
          112  +  static Stmt parentsOf;
          113  +
          114  +  db_static_prepare(&parentsOf, "SELECT pid FROM plink WHERE cid=:rid");
          115  +  db_bind_int(&parentsOf, ":rid", rid);
          116  +  bag_insert(&needToCheck, rid);
          117  +  while( db_step(&parentsOf)==SQLITE_ROW ){
          118  +    bag_insert(&needToCheck, db_column_int(&parentsOf, 0));
          119  +  }
          120  +  db_reset(&parentsOf);
          121  +}
          122  +
          123  +/*
          124  +** Do all pending leaf checks.
          125  +*/
          126  +void leaf_do_pending_checks(void){
          127  +  int rid;
          128  +  for(rid=bag_first(&needToCheck); rid; rid=bag_next(&needToCheck,rid)){
          129  +    leaf_check(rid);
          130  +  }
          131  +  bag_clear(&needToCheck);
          132  +}

Changes to src/main.mk.

    43     43     $(SRCDIR)/graph.c \
    44     44     $(SRCDIR)/http.c \
    45     45     $(SRCDIR)/http_socket.c \
    46     46     $(SRCDIR)/http_ssl.c \
    47     47     $(SRCDIR)/http_transport.c \
    48     48     $(SRCDIR)/import.c \
    49     49     $(SRCDIR)/info.c \
           50  +  $(SRCDIR)/leaf.c \
    50     51     $(SRCDIR)/login.c \
    51     52     $(SRCDIR)/main.c \
    52     53     $(SRCDIR)/manifest.c \
    53     54     $(SRCDIR)/md5.c \
    54     55     $(SRCDIR)/merge.c \
    55     56     $(SRCDIR)/merge3.c \
    56     57     $(SRCDIR)/name.c \
................................................................................
   122    123     $(OBJDIR)/graph_.c \
   123    124     $(OBJDIR)/http_.c \
   124    125     $(OBJDIR)/http_socket_.c \
   125    126     $(OBJDIR)/http_ssl_.c \
   126    127     $(OBJDIR)/http_transport_.c \
   127    128     $(OBJDIR)/import_.c \
   128    129     $(OBJDIR)/info_.c \
          130  +  $(OBJDIR)/leaf_.c \
   129    131     $(OBJDIR)/login_.c \
   130    132     $(OBJDIR)/main_.c \
   131    133     $(OBJDIR)/manifest_.c \
   132    134     $(OBJDIR)/md5_.c \
   133    135     $(OBJDIR)/merge_.c \
   134    136     $(OBJDIR)/merge3_.c \
   135    137     $(OBJDIR)/name_.c \
................................................................................
   201    203    $(OBJDIR)/graph.o \
   202    204    $(OBJDIR)/http.o \
   203    205    $(OBJDIR)/http_socket.o \
   204    206    $(OBJDIR)/http_ssl.o \
   205    207    $(OBJDIR)/http_transport.o \
   206    208    $(OBJDIR)/import.o \
   207    209    $(OBJDIR)/info.o \
          210  + $(OBJDIR)/leaf.o \
   208    211    $(OBJDIR)/login.o \
   209    212    $(OBJDIR)/main.o \
   210    213    $(OBJDIR)/manifest.o \
   211    214    $(OBJDIR)/md5.o \
   212    215    $(OBJDIR)/merge.o \
   213    216    $(OBJDIR)/merge3.o \
   214    217    $(OBJDIR)/name.o \
................................................................................
   293    296   clean:	
   294    297   	rm -rf $(OBJDIR)/* $(APPNAME)
   295    298   
   296    299   
   297    300   $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
   298    301   	$(OBJDIR)/mkindex $(TRANS_SRC) >$@
   299    302   $(OBJDIR)/headers:	$(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
   300         -	$(OBJDIR)/makeheaders  $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
          303  +	$(OBJDIR)/makeheaders  $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
   301    304   	touch $(OBJDIR)/headers
   302    305   $(OBJDIR)/headers: Makefile
   303    306   Makefile:
   304    307   $(OBJDIR)/add_.c:	$(SRCDIR)/add.c $(OBJDIR)/translate
   305    308   	$(OBJDIR)/translate $(SRCDIR)/add.c >$(OBJDIR)/add_.c
   306    309   
   307    310   $(OBJDIR)/add.o:	$(OBJDIR)/add_.c $(OBJDIR)/add.h  $(SRCDIR)/config.h
................................................................................
   549    552   $(OBJDIR)/info_.c:	$(SRCDIR)/info.c $(OBJDIR)/translate
   550    553   	$(OBJDIR)/translate $(SRCDIR)/info.c >$(OBJDIR)/info_.c
   551    554   
   552    555   $(OBJDIR)/info.o:	$(OBJDIR)/info_.c $(OBJDIR)/info.h  $(SRCDIR)/config.h
   553    556   	$(XTCC) -o $(OBJDIR)/info.o -c $(OBJDIR)/info_.c
   554    557   
   555    558   $(OBJDIR)/info.h:	$(OBJDIR)/headers
          559  +$(OBJDIR)/leaf_.c:	$(SRCDIR)/leaf.c $(OBJDIR)/translate
          560  +	$(OBJDIR)/translate $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
          561  +
          562  +$(OBJDIR)/leaf.o:	$(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h  $(SRCDIR)/config.h
          563  +	$(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
          564  +
          565  +$(OBJDIR)/leaf.h:	$(OBJDIR)/headers
   556    566   $(OBJDIR)/login_.c:	$(SRCDIR)/login.c $(OBJDIR)/translate
   557    567   	$(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c
   558    568   
   559    569   $(OBJDIR)/login.o:	$(OBJDIR)/login_.c $(OBJDIR)/login.h  $(SRCDIR)/config.h
   560    570   	$(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c
   561    571   
   562    572   $(OBJDIR)/login.h:	$(OBJDIR)/headers

Changes to src/makeheaders.html.

    41     41   <li><a href=makeheaders.html#H0014>3.8 Caveats</a>
    42     42   </ul>
    43     43   <li><a href=makeheaders.html#H0015>4.0 Using Makeheaders To Generate Documentation</a>
    44     44   
    45     45   <li><a href=makeheaders.html#H0016>5.0 Compiling The Makeheaders Program</a>
    46     46   
    47     47   <li><a href=makeheaders.html#H0017>6.0 Summary And Conclusion</a>
    48         -</ul><a name=H0002>
           48  +</ul><a name="H0002"></a>
    49     49   <h2>1.0 Background</h2>
    50     50   
    51     51   <p>
    52     52   A piece of C source code can be one of two things:
    53     53   a <em>declaration</em> or a <em>definition</em>.
    54     54   A declaration is source text that gives information to the
    55     55   compiler but doesn't directly result in any code being generated.
................................................................................
    96     96   The .c files contain ``<code>#include</code>'' preprocessor statements
    97     97   that cause the contents of .h files to be included as part of the
    98     98   source code when the .c file is compiled.
    99     99   In this way, the .h files define the interface to a subsystem and
   100    100   the .c files define how the subsystem is implemented.
   101    101   </p>
   102    102   
   103         -<a name=H0003>
          103  +<a name="H0003"></a>
   104    104   <h3>1.1 Problems With The Traditional Approach</h3>
   105    105   
   106    106   <p>
   107    107   As the art of computer programming continues to advance, and the size
   108    108   and complexity of programs continues to swell, the traditional C
   109    109   approach of placing declarations and definitions in separate files begins
   110    110   to present the programmer with logistics and
................................................................................
   150    150   In a program with complex, interwoven data structures, the correct
   151    151   declaration order can become very difficult to determine manually, 
   152    152   especially when the declarations involved are spread out over several
   153    153   files.
   154    154   </ol>
   155    155   </p>
   156    156   
   157         -<a name=H0004>
          157  +<a name="H0004"></a>
   158    158   <h3>1.2 The Makeheaders Solution</h3>
   159    159   
   160    160   <p>
   161    161   The makeheaders program is designed to ameliorate the problems associated
   162    162   with the traditional C programming model by automatically generating
   163    163   the interface information in the .h files from 
   164    164   interface information contained in other .h files and
................................................................................
   213    213   so that makeheaders will be run automatically whenever the project
   214    214   is rebuilt.
   215    215   And the burden of running makeheaders is light.
   216    216   It will easily process tens of thousands of lines of source
   217    217   code per second.
   218    218   </p>
   219    219   
   220         -<a name=H0005>
          220  +<a name="H0005"></a>
   221    221   <h2>2.0 Running The Makeheaders Program</h2>
   222    222   
   223    223   <p>
   224    224   The makeheaders program is very easy to run.
   225    225   If you have a collection of C source code and include files in the working
   226    226   directory, then you can run makeheaders to generate appropriate .h
   227    227   files using the following command:
................................................................................
   361    361   you can prepend a ``./'' to its name in order to get it
   362    362   accepted by the command line parser.
   363    363   Or, you can insert the special option ``--'' on the command
   364    364   line to cause all subsequent command line arguments to be treated as
   365    365   filenames even if their names beginn with ``-''.
   366    366   </p>
   367    367   
   368         -<a name=H0006>
          368  +<a name="H0006"></a>
   369    369   <h2>3.0 Preparing Source Files For Use With Makeheaders</h2>
   370    370   
   371    371   <p>
   372    372   Very little has to be done to prepare source files for use with
   373    373   makeheaders since makeheaders will read and understand ordinary
   374    374   C code.
   375    375   But it is important that you structure your files in a way that
   376    376   makes sense in the makeheaders context.
   377    377   This section will describe several typical uses of makeheaders.
   378    378   </p>
   379    379   
   380         -<a name=H0007>
          380  +<a name="H0007"></a>
   381    381   <h3>3.1 The Basic Setup</h3>
   382    382   
   383    383   <p>
   384    384   The simpliest way to use makeheaders is to put all definitions in
   385    385   one or more .c files and all structure and type declarations in
   386    386   separate .h files.
   387    387   The only restriction is that you should take care to chose basenames 
................................................................................
   472    472   those entered manually be the programmer and others generated automatically
   473    473   by a prior run of makeheaders.
   474    474   But that is not a problem.
   475    475   The makeheaders program will recognize and ignore any files it 
   476    476   has previously generated that show up on its input list.
   477    477   </p>
   478    478   
   479         -<a name=H0008>
          479  +<a name="H0008"></a>
   480    480   <h3>3.2 What Declarations Get Copied</h3>
   481    481   
   482    482   <p>
   483    483   The following list details all of the code constructs that makeheaders
   484    484   will extract and place in
   485    485   the automatically generated .h files:
   486    486   </p>
................................................................................
   575    575   As a final note, we observe that automatically generated declarations
   576    576   are ordered as required by the ANSI-C programming language.
   577    577   If the declaration of some structure ``X'' requires a prior
   578    578   declaration of another structure ``Y'', then Y will appear
   579    579   first in the generated headers.
   580    580   </p>
   581    581   
   582         -<a name=H0009>
          582  +<a name="H0009"></a>
   583    583   <h3>3.3 How To Avoid Having To Write Any Header Files</h3>
   584    584   
   585    585   <p>
   586    586   In my experience, large projects work better if all of the manually
   587    587   written code is placed in .c files and all .h files are generated
   588    588   automatically.
   589    589   This is slightly different for the traditional C method of placing
................................................................................
   642    642   ``#if INTERFACE'' regions of .c files.
   643    643   Makeheaders treats all declarations alike, no matter where they
   644    644   come from.
   645    645   You should also note that a single .c file can contain as many
   646    646   ``#if INTERFACE'' regions as desired.
   647    647   </p>
   648    648   
   649         -<a name=H0010>
          649  +<a name="H0010"></a>
   650    650   <h3>3.4 Designating Declarations For Export</h3>
   651    651   
   652    652   <p>
   653    653   In a large project, one will often construct a hierarchy of
   654    654   interfaces.
   655    655   For example, you may have a group of 20 or so files that form
   656    656   a library used in several other parts of the system.
................................................................................
   731    731   The ``#if EXPORT_INTERFACE'' mechanism can be used in either
   732    732   .c or .h files.
   733    733   (The ``#if INTERFACE'' can also be used in both .h and .c files, 
   734    734   but since it's use in a .h file would be redundant, we haven't mentioned
   735    735   it before.)
   736    736   </p>
   737    737   
   738         -<a name=H0011>
          738  +<a name="H0011"></a>
   739    739   <h3>3.5 Local declarations processed by makeheaders</h3>
   740    740   
   741    741   <p>
   742    742   Structure declarations and typedefs that appear in .c files are normally
   743    743   ignored by makeheaders.
   744    744   Such declarations are only intended for use by the source file in which
   745    745   they appear and so makeheaders doesn't need to copy them into any
................................................................................
   769    769   A ``LOCAL_INTERFACE'' block works very much like the
   770    770   ``INTERFACE'' and ``EXPORT_INTERFACE''
   771    771   blocks described above, except that makeheaders insures that the
   772    772   objects declared in a LOCAL_INTERFACE are only visible to the
   773    773   file containing the LOCAL_INTERFACE.
   774    774   </p>
   775    775   
   776         -<a name=H0012>
          776  +<a name="H0012"></a>
   777    777   <h3>3.6 Using Makeheaders With C++ Code</h3>
   778    778   
   779    779   <p>
   780    780   You can use makeheaders to generate header files for C++ code, in
   781    781   addition to C.
   782    782   Makeheaders will recognize and copy both ``class'' declarations
   783    783   and inline function definitions, and it knows not to try to generate
................................................................................
   868    868   
   869    869   <p>
   870    870   Makeheaders does not understand more recent
   871    871   C++ syntax such as templates and namespaces.
   872    872   Perhaps these issued will be addressed in future revisions.
   873    873   </p>
   874    874   
   875         -<a name=H0013>
          875  +<a name="H0013"></a>
   876    876   <h3>3.7 Conditional Compilation</h3>
   877    877   
   878    878   <p>
   879    879   The makeheaders program understands and tracks the conditional 
   880    880   compilation constructs in the source code files it scans.
   881    881   Hence, if the following code appears in a source file
   882    882   <pre>
................................................................................
   901    901   <pre>
   902    902     #if 0
   903    903     #endif
   904    904   </pre>
   905    905   and treats the enclosed text as a comment.
   906    906   </p>
   907    907   
   908         -<a name=H0014>
          908  +<a name="H0014"></a>
   909    909   <h3>3.8 Caveats</h3>
   910    910   
   911    911   <p>
   912    912   The makeheaders system is designed to be robust
   913    913   but it is possible for a devious programmer to fool the system,
   914    914   usually with unhelpful consequences.
   915    915   This subsection is a guide to helping you avoid trouble.
................................................................................
   971    971   For most projects the code constructs that makeheaders cannot
   972    972   handle are very rare.
   973    973   As long as you avoid excessive cleverness, makeheaders will
   974    974   probably be able to figure out what you want and will do the right
   975    975   thing.
   976    976   </p>
   977    977   
   978         -<a name=H0015>
          978  +<a name="H0015"></a>
   979    979   <h2>4.0 Using Makeheaders To Generate Documentation</h2>
   980    980   
   981    981   <p>
   982    982   Many people have observed the advantages of generating program
   983    983   documentation directly from the source code:
   984    984   <ul>
   985    985   <li> Less effort is involved.  It is easier to write a program than
................................................................................
  1035   1035   <li> The complete text of a declaration for the object.
  1036   1036   </ul>
  1037   1037   The exact output format will not be described here.
  1038   1038   It is simple to understand and parse and should be obvious to
  1039   1039   anyone who inspects some sample output.
  1040   1040   </p>
  1041   1041   
  1042         -<a name=H0016>
         1042  +<a name="H0016"></a>
  1043   1043   <h2>5.0 Compiling The Makeheaders Program</h2>
  1044   1044   
  1045   1045   <p>
  1046   1046   The source code for makeheaders is a single file of ANSI-C code,
  1047   1047   less than 3000 lines in length.
  1048   1048   The program makes only modest demands of the system and C library
  1049   1049   and should compile without alteration on most ANSI C compilers
  1050   1050   and on most operating systems.
  1051   1051   It is known to compile using several variations of GCC for Unix
  1052   1052   as well as Cygwin32 and MSVC 5.0 for Win32.
  1053   1053   </p>
  1054   1054   
  1055         -<a name=H0017>
         1055  +<a name="H0017"></a>
  1056   1056   <h2>6.0 Summary And Conclusion</h2>
  1057   1057   
  1058   1058   <p>
  1059   1059   The makeheaders program will automatically generate a minimal header file 
  1060   1060   for each of a set of C source and header files, and will
  1061   1061   generate a composite header file for the entire source file suite,
  1062   1062   for either internal or external use.

Changes to src/makemake.tcl.

    49     49     finfo
    50     50     graph
    51     51     http
    52     52     http_socket
    53     53     http_transport
    54     54     import
    55     55     info
           56  +  leaf
    56     57     login
    57     58     main
    58     59     manifest
    59     60     md5
    60     61     merge
    61     62     merge3
    62     63     name

Changes to src/schema.c.

    38     38   ** The content tables have a content version number which rarely
    39     39   ** changes.  The aux tables have an arbitrary version number (typically
    40     40   ** a date) which can change frequently.  When the content schema changes,
    41     41   ** we have to execute special procedures to update the schema.  When
    42     42   ** the aux schema changes, all we need to do is rebuild the database.
    43     43   */
    44     44   #define CONTENT_SCHEMA  "1"
    45         -#define AUX_SCHEMA      "2010-11-24"
           45  +#define AUX_SCHEMA      "2011-01-28"
    46     46   
    47     47   #endif /* INTERFACE */
    48     48   
    49     49   
    50     50   /*
    51     51   ** The schema for a repository database.  
    52     52   **
................................................................................
   187    187   @ -- Filenames
   188    188   @ --
   189    189   @ CREATE TABLE filename(
   190    190   @   fnid INTEGER PRIMARY KEY,    -- Filename ID
   191    191   @   name TEXT UNIQUE             -- Name of file page
   192    192   @ );
   193    193   @
   194         -@ -- Linkages between manifests, files created by that manifest, and
          194  +@ -- Linkages between checkins, files created by each checkin, and
   195    195   @ -- the names of those files.
   196    196   @ --
   197         -@ -- pid==0 if the file is added by check-in mid.
   198         -@ -- fid==0 if the file is removed by check-in mid.
          197  +@ -- pid==0 if the file is added by checkin mid.
          198  +@ -- fid==0 if the file is removed by checkin mid.
   199    199   @ --
   200    200   @ CREATE TABLE mlink(
   201    201   @   mid INTEGER REFERENCES blob,        -- Manifest ID where change occurs
   202    202   @   pid INTEGER REFERENCES blob,        -- File ID in parent manifest
   203    203   @   fid INTEGER REFERENCES blob,        -- Changed file ID in this manifest
   204    204   @   fnid INTEGER REFERENCES filename,   -- Name of the file
   205    205   @   pfnid INTEGER REFERENCES filename   -- Previous name. 0 if unchanged
   206    206   @ );
   207    207   @ CREATE INDEX mlink_i1 ON mlink(mid);
   208    208   @ CREATE INDEX mlink_i2 ON mlink(fnid);
   209    209   @ CREATE INDEX mlink_i3 ON mlink(fid);
   210    210   @ CREATE INDEX mlink_i4 ON mlink(pid);
   211    211   @
   212         -@ -- Parent/child linkages
          212  +@ -- Parent/child linkages between checkins
   213    213   @ --
   214    214   @ CREATE TABLE plink(
   215    215   @   pid INTEGER REFERENCES blob,    -- Parent manifest
   216    216   @   cid INTEGER REFERENCES blob,    -- Child manifest
   217    217   @   isprim BOOLEAN,                 -- pid is the primary parent of cid
   218    218   @   mtime DATETIME,                 -- the date/time stamp on cid
   219    219   @   UNIQUE(pid, cid)
   220    220   @ );
   221    221   @ CREATE INDEX plink_i2 ON plink(cid,pid);
          222  +@
          223  +@ -- A "leaf" checkin is a checkin that has no children in the same
          224  +@ -- branch.  The set of all leaves is easily computed with a join,
          225  +@ -- between the plink and tagxref tables, but it is a slower join for
          226  +@ -- very large repositories (repositories with 100,000 or more checkins)
          227  +@ -- and so it makes sense to precompute the set of leaves.  There is
          228  +@ -- one entry in the following table for each leaf.
          229  +@ --
          230  +@ CREATE TABLE leaf(rid INTEGER PRIMARY KEY);
   222    231   @
   223    232   @ -- Events used to generate a timeline
   224    233   @ --
   225    234   @ CREATE TABLE event(
   226    235   @   type TEXT,                      -- Type of event: 'ci', 'w', 'e', 't'
   227    236   @   mtime DATETIME,                 -- Date and time when the event occurs
   228    237   @   objid INTEGER PRIMARY KEY,      -- Associated record ID

Changes to src/tag.c.

    83     83           db_step(&ins);
    84     84           db_reset(&ins);
    85     85           if( tagid==TAG_BGCOLOR ){
    86     86             db_bind_int(&eventupdate, ":rid", cid);
    87     87             db_step(&eventupdate);
    88     88             db_reset(&eventupdate);
    89     89           }
           90  +        if( tagid==TAG_BRANCH ){
           91  +          leaf_eventually_check(cid);
           92  +        }
    90     93         }
    91     94       }
    92     95       db_reset(&s);
    93     96     }
    94     97     pqueue_clear(&queue);
    95     98     db_finalize(&ins);
    96     99     db_finalize(&s);
................................................................................
   172    175       "REPLACE INTO tagxref(tagid,tagtype,srcId,origid,value,mtime,rid)"
   173    176       " VALUES(%d,%d,%d,%d,%Q,:mtime,%d)",
   174    177       tagid, tagtype, srcId, rid, zValue, rid
   175    178     );
   176    179     db_bind_double(&s, ":mtime", mtime);
   177    180     db_step(&s);
   178    181     db_finalize(&s);
          182  +  if( tagid==TAG_BRANCH ) leaf_eventually_check(rid);
   179    183     if( tagtype==0 ){
   180    184       zValue = 0;
   181    185     }
   182    186     zCol = 0;
   183    187     switch( tagid ){
   184    188       case TAG_BGCOLOR: {
   185    189         zCol = "bgcolor";
................................................................................
   533    537       }
   534    538     }
   535    539     @ </ul>
   536    540     db_finalize(&q);
   537    541     style_footer();
   538    542   }
   539    543   
   540         -/*
   541         -** Draw the names of all tags added to check-in rid.  Only tags
   542         -** that are directly applied to rid are named.  Propagated tags
   543         -** are omitted.
   544         -*/
   545         -static void tagtimeline_extra(int rid){
   546         -  Stmt q;
   547         -  db_prepare(&q, 
   548         -    "SELECT substr(tagname,5) FROM tagxref, tag"
   549         -    " WHERE tagxref.rid=%d"
   550         -    "   AND tagxref.tagid=tag.tagid"
   551         -    "   AND tagxref.tagtype>0 AND tagxref.srcid>0"
   552         -    "   AND tag.tagname GLOB 'sym-*'",
   553         -    rid
   554         -  );
   555         -  while( db_step(&q)==SQLITE_ROW ){
   556         -    const char *zTagName = db_column_text(&q, 0);
   557         -    if( g.okHistory ){
   558         -      @ <a class="tagLink" href="%s(g.zTop)/timeline?t=%T(zTagName)">
   559         -      @ [%h(zTagName)]</a>
   560         -    }else{
   561         -      @ <span class="tagDsp">[%h(zTagName)]</span>
   562         -    }
   563         -  }
   564         -  db_finalize(&q);
   565         -}
   566         -
   567    544   /*
   568    545   ** WEBPAGE: /tagtimeline
   569    546   */
   570    547   void tagtimeline_page(void){
   571    548     Stmt q;
   572    549   
   573    550     login_check_credentials();
................................................................................
   581    558       "%s AND blob.rid IN (SELECT rid FROM tagxref"
   582    559       "                     WHERE tagtype=1 AND srcid>0"
   583    560       "                       AND tagid IN (SELECT tagid FROM tag "
   584    561       "                                      WHERE tagname GLOB 'sym-*'))"
   585    562       " ORDER BY event.mtime DESC",
   586    563       timeline_query_for_www()
   587    564     );
   588         -  www_print_timeline(&q, 0, 0, 0, tagtimeline_extra);
          565  +  www_print_timeline(&q, 0, 0, 0, 0);
   589    566     db_finalize(&q);
   590    567     @ <br />
   591    568     @ <script  type="text/JavaScript">
   592    569     @ function xin(id){
   593    570     @ }
   594    571     @ function xout(id){
   595    572     @ }
   596    573     @ </script>
   597    574     style_footer();
   598    575   }

Changes to src/timeline.c.

   636    636     static const char zBaseSql[] =
   637    637       @ SELECT
   638    638       @   blob.rid,
   639    639       @   uuid,
   640    640       @   datetime(event.mtime,'localtime') AS timestamp,
   641    641       @   coalesce(ecomment, comment),
   642    642       @   coalesce(euser, user),
   643         -    @   NOT EXISTS(SELECT 1 FROM plink
   644         -    @               WHERE pid=blob.rid
   645         -    @                AND coalesce((SELECT value FROM tagxref
   646         -    @                              WHERE tagid=%d AND rid=plink.pid), 'trunk')
   647         -    @                  = coalesce((SELECT value FROM tagxref
   648         -    @                              WHERE tagid=%d AND rid=plink.cid), 'trunk')),
          643  +    @   blob.rid IN leaf,
   649    644       @   bgcolor,
   650    645       @   event.type,
   651    646       @   (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref
   652    647       @     WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid
   653    648       @       AND tagxref.rid=blob.rid AND tagxref.tagtype>0),
   654    649       @   tagid,
   655    650       @   brief,

Changes to win/Makefile.dmc.

    20     20   I18N   =  -DFOSSIL_I18N=0
    21     21   
    22     22   CFLAGS = -o
    23     23   BCC    = $(DMDIR)\bin\dmc $(CFLAGS)
    24     24   TCC    = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(I18N) $(SSL) $(INCL)
    25     25   LIBS   = $(DMDIR)\extra\lib\ zlib wsock32
    26     26   
    27         -SRC   = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c 
           27  +SRC   = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c 
    28     28   
    29         -OBJ   = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O 
           29  +OBJ   = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O 
    30     30   
    31     31   
    32     32   RC=$(DMDIR)\bin\rcc
    33     33   RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
    34     34   
    35     35   APPNAME = $(OBJDIR)\fossil$(E)
    36     36   
................................................................................
    40     40   	cd $(OBJDIR) 
    41     41   	$(DMDIR)\bin\link @link
    42     42   
    43     43   $(OBJDIR)\fossil.res:	$B\win\fossil.rc
    44     44   	$(RC) $(RCFLAGS) -o$@ $**
    45     45   
    46     46   $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
    47         -	+echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip shell sqlcmd sqlite3 th th_lang > $@
           47  +	+echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info leaf login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip shell sqlcmd sqlite3 th th_lang > $@
    48     48   	+echo fossil >> $@
    49     49   	+echo fossil >> $@
    50     50   	+echo $(LIBS) >> $@
    51     51   	+echo. >> $@
    52     52   	+echo fossil >> $@
    53     53   
    54     54   translate$E: $(SRCDIR)\translate.c
................................................................................
   303    303   	+translate$E $** > $@
   304    304   
   305    305   $(OBJDIR)\info$O : info_.c info.h
   306    306   	$(TCC) -o$@ -c info_.c
   307    307   
   308    308   info_.c : $(SRCDIR)\info.c
   309    309   	+translate$E $** > $@
          310  +
          311  +$(OBJDIR)\leaf$O : leaf_.c leaf.h
          312  +	$(TCC) -o$@ -c leaf_.c
          313  +
          314  +leaf_.c : $(SRCDIR)\leaf.c
          315  +	+translate$E $** > $@
   310    316   
   311    317   $(OBJDIR)\login$O : login_.c login.h
   312    318   	$(TCC) -o$@ -c login_.c
   313    319   
   314    320   login_.c : $(SRCDIR)\login.c
   315    321   	+translate$E $** > $@
   316    322   
................................................................................
   551    557   $(OBJDIR)\zip$O : zip_.c zip.h
   552    558   	$(TCC) -o$@ -c zip_.c
   553    559   
   554    560   zip_.c : $(SRCDIR)\zip.c
   555    561   	+translate$E $** > $@
   556    562   
   557    563   headers: makeheaders$E page_index.h VERSION.h
   558         -	 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
          564  +	 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
   559    565   	@copy /Y nul: headers

Changes to win/Makefile.mingw.

   102    102     $(SRCDIR)/graph.c \
   103    103     $(SRCDIR)/http.c \
   104    104     $(SRCDIR)/http_socket.c \
   105    105     $(SRCDIR)/http_ssl.c \
   106    106     $(SRCDIR)/http_transport.c \
   107    107     $(SRCDIR)/import.c \
   108    108     $(SRCDIR)/info.c \
          109  +  $(SRCDIR)/leaf.c \
   109    110     $(SRCDIR)/login.c \
   110    111     $(SRCDIR)/main.c \
   111    112     $(SRCDIR)/manifest.c \
   112    113     $(SRCDIR)/md5.c \
   113    114     $(SRCDIR)/merge.c \
   114    115     $(SRCDIR)/merge3.c \
   115    116     $(SRCDIR)/name.c \
................................................................................
   181    182     $(OBJDIR)/graph_.c \
   182    183     $(OBJDIR)/http_.c \
   183    184     $(OBJDIR)/http_socket_.c \
   184    185     $(OBJDIR)/http_ssl_.c \
   185    186     $(OBJDIR)/http_transport_.c \
   186    187     $(OBJDIR)/import_.c \
   187    188     $(OBJDIR)/info_.c \
          189  +  $(OBJDIR)/leaf_.c \
   188    190     $(OBJDIR)/login_.c \
   189    191     $(OBJDIR)/main_.c \
   190    192     $(OBJDIR)/manifest_.c \
   191    193     $(OBJDIR)/md5_.c \
   192    194     $(OBJDIR)/merge_.c \
   193    195     $(OBJDIR)/merge3_.c \
   194    196     $(OBJDIR)/name_.c \
................................................................................
   260    262    $(OBJDIR)/graph.o \
   261    263    $(OBJDIR)/http.o \
   262    264    $(OBJDIR)/http_socket.o \
   263    265    $(OBJDIR)/http_ssl.o \
   264    266    $(OBJDIR)/http_transport.o \
   265    267    $(OBJDIR)/import.o \
   266    268    $(OBJDIR)/info.o \
          269  + $(OBJDIR)/leaf.o \
   267    270    $(OBJDIR)/login.o \
   268    271    $(OBJDIR)/main.o \
   269    272    $(OBJDIR)/manifest.o \
   270    273    $(OBJDIR)/md5.o \
   271    274    $(OBJDIR)/merge.o \
   272    275    $(OBJDIR)/merge3.o \
   273    276    $(OBJDIR)/name.o \
................................................................................
   361    364   clean:	
   362    365   	rm -rf $(OBJDIR) $(APPNAME)
   363    366   
   364    367   
   365    368   $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
   366    369   	$(MKINDEX) $(TRANS_SRC) >$@
   367    370   $(OBJDIR)/headers:	$(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
   368         -	$(MAKEHEADERS)  $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
          371  +	$(MAKEHEADERS)  $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
   369    372   	echo Done >$(OBJDIR)/headers
   370    373   
   371    374   $(OBJDIR)/headers: Makefile
   372    375   Makefile:
   373    376   $(OBJDIR)/add_.c:	$(SRCDIR)/add.c $(OBJDIR)/translate
   374    377   	$(TRANSLATE) $(SRCDIR)/add.c >$(OBJDIR)/add_.c
   375    378   
................................................................................
   618    621   $(OBJDIR)/info_.c:	$(SRCDIR)/info.c $(OBJDIR)/translate
   619    622   	$(TRANSLATE) $(SRCDIR)/info.c >$(OBJDIR)/info_.c
   620    623   
   621    624   $(OBJDIR)/info.o:	$(OBJDIR)/info_.c $(OBJDIR)/info.h  $(SRCDIR)/config.h
   622    625   	$(XTCC) -o $(OBJDIR)/info.o -c $(OBJDIR)/info_.c
   623    626   
   624    627   info.h:	$(OBJDIR)/headers
          628  +$(OBJDIR)/leaf_.c:	$(SRCDIR)/leaf.c $(OBJDIR)/translate
          629  +	$(TRANSLATE) $(SRCDIR)/leaf.c >$(OBJDIR)/leaf_.c
          630  +
          631  +$(OBJDIR)/leaf.o:	$(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h  $(SRCDIR)/config.h
          632  +	$(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
          633  +
          634  +leaf.h:	$(OBJDIR)/headers
   625    635   $(OBJDIR)/login_.c:	$(SRCDIR)/login.c $(OBJDIR)/translate
   626    636   	$(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c
   627    637   
   628    638   $(OBJDIR)/login.o:	$(OBJDIR)/login_.c $(OBJDIR)/login.h  $(SRCDIR)/config.h
   629    639   	$(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c
   630    640   
   631    641   login.h:	$(OBJDIR)/headers

Changes to win/Makefile.msc.

    33     33   
    34     34   CFLAGS = -nologo -MT -O2
    35     35   BCC    = $(CC) $(CFLAGS)
    36     36   TCC    = $(CC) -c $(CFLAGS) $(MSCDEF) $(I18N) $(SSL) $(INCL)
    37     37   LIBS   = $(ZLIB) ws2_32.lib $(SSLLIB)
    38     38   LIBDIR = -LIBPATH:$(MSCDIR)\extra\lib -LIBPATH:$(ZLIBDIR)
    39     39   
    40         -SRC   = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c 
           40  +SRC   = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c graph_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c leaf_.c login_.c main_.c manifest_.c md5_.c merge_.c merge3_.c name_.c pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.c style_.c sync_.c tag_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c update_.c url_.c user_.c verify_.c vfile_.c wiki_.c wikiformat_.c winhttp_.c xfer_.c zip_.c 
    41     41   
    42         -OBJ   = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O 
           42  +OBJ   = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\graph$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\leaf$O $(OBJDIR)\login$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\name$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\rebuild$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winhttp$O $(OBJDIR)\xfer$O $(OBJDIR)\zip$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O 
    43     43   
    44     44   
    45     45   APPNAME = $(OBJDIR)\fossil$(E)
    46     46   
    47     47   all: $(OBJDIR) $(APPNAME)
    48     48   
    49     49   $(APPNAME) : translate$E mkindex$E headers $(OBJ) $(OBJDIR)\linkopts
    50     50   	cd $(OBJDIR) 
    51     51   	link -LINK -OUT:$@ $(LIBDIR) @linkopts
    52     52   
    53     53   $(OBJDIR)\linkopts: $B\win\Makefile.msc
    54         -	echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
           54  +	echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo graph http http_socket http_ssl http_transport import info leaf login main manifest md5 merge merge3 name pivot popen pqueue printf rebuild report rss schema search setup sha1 shun skins sqlcmd stash stat style sync tag th_main timeline tkt tktsetup undo update url user verify vfile wiki wikiformat winhttp xfer zip sqlite3 th th_lang > $@
    55     55   	echo $(LIBS) >> $@
    56     56   
    57     57   
    58     58   
    59     59   
    60     60   $(OBJDIR):
    61     61   	@-mkdir $@
................................................................................
   307    307   	translate$E $** > $@
   308    308   
   309    309   $(OBJDIR)\info$O : info_.c info.h
   310    310   	$(TCC) /Fo$@ -c info_.c
   311    311   
   312    312   info_.c : $(SRCDIR)\info.c
   313    313   	translate$E $** > $@
          314  +
          315  +$(OBJDIR)\leaf$O : leaf_.c leaf.h
          316  +	$(TCC) /Fo$@ -c leaf_.c
          317  +
          318  +leaf_.c : $(SRCDIR)\leaf.c
          319  +	translate$E $** > $@
   314    320   
   315    321   $(OBJDIR)\login$O : login_.c login.h
   316    322   	$(TCC) /Fo$@ -c login_.c
   317    323   
   318    324   login_.c : $(SRCDIR)\login.c
   319    325   	translate$E $** > $@
   320    326   
................................................................................
   555    561   $(OBJDIR)\zip$O : zip_.c zip.h
   556    562   	$(TCC) /Fo$@ -c zip_.c
   557    563   
   558    564   zip_.c : $(SRCDIR)\zip.c
   559    565   	translate$E $** > $@
   560    566   
   561    567   headers: makeheaders$E page_index.h VERSION.h
   562         -	makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
          568  +	makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h leaf_.c:leaf.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h
   563    569   	@copy /Y nul: headers

Changes to www/checkin_names.wiki.

     1      1   <title>Check-in Names</title>
     2      2   
     3         -Many Fossil commands and [./webui.wiki | web-interface] URLs accept
     4         -check-in names as an argument.  For example, the "info" command
            3  +Many Fossil [/help|commands] and [./webui.wiki | web-interface] URLs accept
            4  +check-in names as an argument.  For example, the "[/help/info|info]" command
     5      5   accepts an optional check-in name to identify the specific checkout
     6      6   about which information is desired:
     7      7   
     8      8   <blockquote>
     9      9   <tt>fossil info</tt> <i>checkin-name</i>
    10     10   </blockquote>
    11     11   
................................................................................
   108    108   The space between the day and the year can optionally be 
   109    109   replaced by an uppercase <b>T</b> and the entire timestamp can
   110    110   optionally be followed by "<b>utc</b>".
   111    111   
   112    112   In its default configuration, Fossil interprets and displays all dates
   113    113   in Universal Coordinated Time (UTC).  This tends to work the best for
   114    114   distributed projects where participants are scattered around the globe.
   115         -But there is an open on the Admin/Timeline page of the web-interface to
          115  +But there is an option on the Admin/Timeline page of the web-interface to
   116    116   switch to local time.  The "<b>utc</b>" suffix on an timestamp check-in
   117    117   name is meaningless if Fossil is in the default mode of using UTC for
   118    118   everything, but if Fossil has been switched to localtime mode, then the
   119    119   "<b>utc</b>" suffix means to interpret that particular timestamp using 
   120    120   UTC instead localtime.
   121    121   
   122    122   As an example, consider the homepage for the Fossil website itself:

Changes to www/faq.tcl.

     7      7     set ::faq($::cnt) [list [string trim $question] [string trim $answer]]
     8      8     incr ::cnt
     9      9   }
    10     10   
    11     11   faq {
    12     12     What GUIs are available for fossil?
    13     13   } {
    14         -  The fossil executable comes with a web-based GUI built in.  Just run:
           14  +  The fossil executable comes with a [./webui.wiki | web-based GUI] built in.
           15  +  Just run:
    15     16   
    16     17     <blockquote>
    17         -  <b>fossil ui</b> <i>REPOSITORY-FILENAME</i>
           18  +  <b>fossil [/help/ui|ui]</b> <i>REPOSITORY-FILENAME</i>
    18     19     </blockquote>
    19     20   
    20     21     And your default web browser should pop up and automatically point to
    21     22     the fossil interface.  (Hint:  You can omit the <i>REPOSITORY-FILENAME</i>
    22     23     if you are within an open check-out.)
    23     24   }
    24     25   
................................................................................
    28     29     This is a big question - too big to answer in a FAQ.  Please
    29     30     read the <a href="branching.wiki">Branching, Forking, Merging,
    30     31     and Tagging</a> document.
    31     32   }
    32     33   
    33     34   
    34     35   faq {
    35         -  How do I create a new branch in fossil?
           36  +  How do I create a new branch?
    36     37   } {
    37     38     There are lots of ways:
    38     39   
    39         -  When you are checking in a new change using the <b>commit</b>
           40  +  When you are checking in a new change using the <b>[/help/commit|commit]</b>
    40     41     command, you can add the option  "--branch <i>BRANCH-NAME</i>" to
    41         -  make the change be the founding check-in for a new branch.  You can
           42  +  make the new check-in be the first check-in for a new branch.  You can
    42     43     also add the "--bgcolor <i>COLOR</i>" option to give the branch a
    43     44     specific background color on timelines.
    44     45   
    45         -  If you want to create a new branch whose founding check-in is the
           46  +  If you want to create a new branch whose initial content is the
    46     47     same as an existing check-in, use this command:
    47     48   
    48     49     <blockquote>
    49         -  <b>fossil branch new</b> <i>BRANCH-NAME BASIS</i>
           50  +  <b>fossil [/help/branch|branch] new</b> <i>BRANCH-NAME BASIS</i>
    50     51     </blockquote>
    51     52   
    52     53     The <i>BRANCH-NAME</i> argument is the name of the new branch and the
    53     54     <i>BASIS</i> argument is the name of the check-in that the branch splits
    54     55     off from.
    55     56   
    56     57     If you already have a fork in your check-in tree and you want to convert
    57     58     that fork to a branch, you can do this from the web interface.
    58     59     First locate the check-in that you want to be
    59         -  the founding check-in of your branch on the timeline and click on its
           60  +  the initial check-in of your branch on the timeline and click on its
    60     61     link so that you are on the <b>ci</b> page.  Then find the "<b>edit</b>"
    61     62     link (near the "Commands:" label) and click on that.  On the 
    62     63     "Edit Check-in" page, check the box beside "Branching:" and fill in 
    63     64     the name of your new branch to the right and press the "Apply Changes"
    64     65     button.
    65     66   }
           67  +
           68  +faq {
           69  +  How do I tag a check-in?
           70  +} {
           71  +  There are several ways:
           72  +
           73  +  When you are checking in a new change using the <b>[/help/commit|commit]</b>
           74  +  command, you can add a tag to that check-in using the
           75  +  "--tag <i>TAGNAME</i>" command-line option.
           76  +
           77  +  If you want add a tag to an existing check-in, you can use the
           78  +  <b>[/help/tag|tag]</b> command.  For example:
           79  +
           80  +  <blockquote>
           81  +  <b>fossil [/help/branch|tag] add</b> <i>TAGNAME</i> <i>CHECK-IN</i>
           82  +  </blockquote>
           83  +
           84  +  The CHECK-IN in the previous line can be any
           85  +  [./checkin_names.wiki | valid check-in name format].
           86  +
           87  +  You can also add (and remove) tags from a check-in using the
           88  +  [./webui.wiki | web interface].  First locate the check-in that you 
           89  +  what to tag on the tmline, then click on the link to go the detailed
           90  +  information page for that check-in.  Then find the "<b>edit</b>"
           91  +  link (near the "Commands:" label) and click on that.  There are
           92  +  controls on the edit page that allow new tags to be added and existing
           93  +  tags to be removed.
           94  +}  
    66     95   
    67     96   faq {
    68     97     How do I create a private branch that won't get pushed back to the
    69     98     main repository.
    70     99   } {
    71    100     Use the <b>--private</b> command-line option on the 
    72    101     <b>commit</b> command.  The result will be a check-in which exists on
................................................................................
    95    124   }
    96    125   
    97    126   faq {
    98    127     How do I make a clone of the fossil self-hosting repository?
    99    128   } {
   100    129     Any of the following commands should work:
   101    130     <blockquote><pre>
   102         -  fossil  clone  http://www.fossil-scm.org/  fossil.fossil<br>
   103         -  fossil  clone  http://www2.fossil-scm.org/  fossil.fossil<br>
   104         -  fossil  clone  http://www.hwaci.com/cgi-bin/fossil  fossil.fossil
          131  +  fossil [/help/clone|clone]  http://www.fossil-scm.org/  fossil.fossil<br>
          132  +  fossil [/help/clone|clone]  http://www2.fossil-scm.org/  fossil.fossil<br>
          133  +  fossil [/help/clone|clone]  http://www3.fossli-scm.org/site.cgi  fossil.fossil
   105    134     </pre></blockquote>
   106    135     Once you have the repository cloned, you can open a local check-out
   107    136     as follows:
   108    137     <blockquote><pre>
   109         -  mkdir src; cd src; fossil open ../fossil.fossil
          138  +  mkdir src; cd src; fossil [/help/open|open] ../fossil.fossil
   110    139     </pre></blockquote>
   111    140     Thereafter you should be able to keep your local check-out up to date
   112    141     with the latest code in the public repository by typing:
   113    142     <blockquote><pre>
   114         -  fossil update
          143  +  fossil [/help/update|update]
   115    144     </pre></blockquote>
   116    145   }
          146  +
          147  +faq {
          148  +  How do I import or export content from and to other version control systems?
          149  +} {
          150  +  Please see [./inout.wiki | Import And Export]
          151  +}
          152  +
          153  +
   117    154   
   118    155   #############################################################################
   119    156   # Code to actually generate the FAQ
   120    157   #
   121    158   puts "<title>Fossil FAQ</title>"
   122    159   puts "<h1 align=\"center\">Frequently Asked Questions</h1>\n"
   123    160   puts "<p>Note: See also <a href=\"qandc.wiki\">Questions and Criticisms</a>.\n"

Changes to www/faq.wiki.

     2      2   <h1 align="center">Frequently Asked Questions</h1>
     3      3   
     4      4   <p>Note: See also <a href="qandc.wiki">Questions and Criticisms</a>.
     5      5   
     6      6   <ol>
     7      7   <li><a href="#q1">What GUIs are available for fossil?</a></li>
     8      8   <li><a href="#q2">What is the difference between a "branch" and a "fork"?</a></li>
     9         -<li><a href="#q3">How do I create a new branch in fossil?</a></li>
    10         -<li><a href="#q4">How do I create a private branch that won't get pushed back to the
            9  +<li><a href="#q3">How do I create a new branch?</a></li>
           10  +<li><a href="#q4">How do I tag a check-in?</a></li>
           11  +<li><a href="#q5">How do I create a private branch that won't get pushed back to the
    11     12     main repository.</a></li>
    12         -<li><a href="#q5">How can I delete inappropriate content from my fossil repository?</a></li>
    13         -<li><a href="#q6">How do I make a clone of the fossil self-hosting repository?</a></li>
           13  +<li><a href="#q6">How can I delete inappropriate content from my fossil repository?</a></li>
           14  +<li><a href="#q7">How do I make a clone of the fossil self-hosting repository?</a></li>
           15  +<li><a href="#q8">How do I import or export content from and to other version control systems?</a></li>
    14     16   </ol>
    15     17   <hr>
    16     18   <a name="q1"></a>
    17     19   <p><b>(1) What GUIs are available for fossil?</b></p>
    18     20   
    19         -<blockquote>The fossil executable comes with a web-based GUI built in.  Just run:
           21  +<blockquote>The fossil executable comes with a [./webui.wiki | web-based GUI] built in.
           22  +Just run:
    20     23   
    21     24   <blockquote>
    22         -<b>fossil ui</b> <i>REPOSITORY-FILENAME</i>
           25  +<b>fossil [/help/ui|ui]</b> <i>REPOSITORY-FILENAME</i>
    23     26   </blockquote>
    24     27   
    25     28   And your default web browser should pop up and automatically point to
    26     29   the fossil interface.  (Hint:  You can omit the <i>REPOSITORY-FILENAME</i>
    27     30   if you are within an open check-out.)</blockquote></li>
    28     31   
    29     32   <a name="q2"></a>
................................................................................
    30     33   <p><b>(2) What is the difference between a "branch" and a "fork"?</b></p>
    31     34   
    32     35   <blockquote>This is a big question - too big to answer in a FAQ.  Please
    33     36   read the <a href="branching.wiki">Branching, Forking, Merging,
    34     37   and Tagging</a> document.</blockquote></li>
    35     38   
    36     39   <a name="q3"></a>
    37         -<p><b>(3) How do I create a new branch in fossil?</b></p>
           40  +<p><b>(3) How do I create a new branch?</b></p>
    38     41   
    39     42   <blockquote>There are lots of ways:
    40     43   
    41         -When you are checking in a new change using the <b>commit</b>
           44  +When you are checking in a new change using the <b>[/help/commit|commit]</b>
    42     45   command, you can add the option  "--branch <i>BRANCH-NAME</i>" to
    43         -make the change be the founding check-in for a new branch.  You can
           46  +make the new check-in be the first check-in for a new branch.  You can
    44     47   also add the "--bgcolor <i>COLOR</i>" option to give the branch a
    45     48   specific background color on timelines.
    46     49   
    47         -If you want to create a new branch whose founding check-in is the
           50  +If you want to create a new branch whose initial content is the
    48     51   same as an existing check-in, use this command:
    49     52   
    50     53   <blockquote>
    51         -<b>fossil branch new</b> <i>BRANCH-NAME BASIS</i>
           54  +<b>fossil [/help/branch|branch] new</b> <i>BRANCH-NAME BASIS</i>
    52     55   </blockquote>
    53     56   
    54     57   The <i>BRANCH-NAME</i> argument is the name of the new branch and the
    55     58   <i>BASIS</i> argument is the name of the check-in that the branch splits
    56     59   off from.
    57     60   
    58     61   If you already have a fork in your check-in tree and you want to convert
    59     62   that fork to a branch, you can do this from the web interface.
    60     63   First locate the check-in that you want to be
    61         -the founding check-in of your branch on the timeline and click on its
           64  +the initial check-in of your branch on the timeline and click on its
    62     65   link so that you are on the <b>ci</b> page.  Then find the "<b>edit</b>"
    63     66   link (near the "Commands:" label) and click on that.  On the 
    64     67   "Edit Check-in" page, check the box beside "Branching:" and fill in 
    65     68   the name of your new branch to the right and press the "Apply Changes"
    66     69   button.</blockquote></li>
    67     70   
    68     71   <a name="q4"></a>
    69         -<p><b>(4) How do I create a private branch that won't get pushed back to the
           72  +<p><b>(4) How do I tag a check-in?</b></p>
           73  +
           74  +<blockquote>There are several ways:
           75  +
           76  +When you are checking in a new change using the <b>[/help/commit|commit]</b>
           77  +command, you can add a tag to that check-in using the
           78  +"--tag <i>TAGNAME</i>" command-line option.
           79  +
           80  +If you want add a tag to an existing check-in, you can use the
           81  +<b>[/help/tag|tag]</b> command.  For example:
           82  +
           83  +<blockquote>
           84  +<b>fossil [/help/branch|tag] add</b> <i>TAGNAME</i> <i>CHECK-IN</i>
           85  +</blockquote>
           86  +
           87  +The CHECK-IN in the previous line can be any
           88  +[./checkin_names.wiki | valid check-in name format].
           89  +
           90  +You can also add (and remove) tags from a check-in using the
           91  +[./webui.wiki | web interface].  First locate the check-in that you 
           92  +what to tag on the tmline, then click on the link to go the detailed
           93  +information page for that check-in.  Then find the "<b>edit</b>"
           94  +link (near the "Commands:" label) and click on that.  There are
           95  +controls on the edit page that allow new tags to be added and existing
           96  +tags to be removed.</blockquote></li>
           97  +
           98  +<a name="q5"></a>
           99  +<p><b>(5) How do I create a private branch that won't get pushed back to the
    70    100     main repository.</b></p>
    71    101   
    72    102   <blockquote>Use the <b>--private</b> command-line option on the 
    73    103   <b>commit</b> command.  The result will be a check-in which exists on
    74    104   your local repository only and is never pushed to other repositories.  
    75         -All descendants of a private check-in are also private.
          105  +All descendents of a private check-in are also private.
    76    106   
    77    107   Unless you specify something different using the <b>--branch</b> and/or
    78    108   <b>--bgcolor</b> options, the new private check-in will be put on a branch
    79    109   named "private" with an orange background color.
    80    110   
    81    111   You can merge from the trunk into your private branch in order to keep
    82    112   your private branch in sync with the latest changes on the trunk.  Once
................................................................................
    84    114   then merge your private branch back into the trunk and push.  Only the
    85    115   final merge operation will appear in other repositories.  It will seem
    86    116   as if all the changes that occurred on your private branch occurred in
    87    117   a single check-in.
    88    118   Of course, you can also keep your branch private forever simply
    89    119   by not merging the changes in the private branch back into the trunk.</blockquote></li>
    90    120   
    91         -<a name="q5"></a>
    92         -<p><b>(5) How can I delete inappropriate content from my fossil repository?</b></p>
          121  +<a name="q6"></a>
          122  +<p><b>(6) How can I delete inappropriate content from my fossil repository?</b></p>
    93    123   
    94    124   <blockquote>See the article on [./shunning.wiki | "shunning"] for details.</blockquote></li>
    95    125   
    96         -<a name="q6"></a>
    97         -<p><b>(6) How do I make a clone of the fossil self-hosting repository?</b></p>
          126  +<a name="q7"></a>
          127  +<p><b>(7) How do I make a clone of the fossil self-hosting repository?</b></p>
    98    128   
    99    129   <blockquote>Any of the following commands should work:
   100    130   <blockquote><pre>
   101         -fossil  clone  http://www.fossil-scm.org/  fossil.fossil<br>
   102         -fossil  clone  http://www2.fossil-scm.org/  fossil.fossil<br>
   103         -fossil  clone  http://www.hwaci.com/cgi-bin/fossil  fossil.fossil
          131  +fossil [/help/clone|clone]  http://www.fossil-scm.org/  fossil.fossil<br>
          132  +fossil [/help/clone|clone]  http://www2.fossil-scm.org/  fossil.fossil<br>
          133  +fossil [/help/clone|clone]  http://www3.fossli-scm.org/site.cgi  fossil.fossil
   104    134   </pre></blockquote>
   105    135   Once you have the repository cloned, you can open a local check-out
   106    136   as follows:
   107    137   <blockquote><pre>
   108         -mkdir src; cd src; fossil open ../fossil.fossil
          138  +mkdir src; cd src; fossil [/help/open|open] ../fossil.fossil
   109    139   </pre></blockquote>
   110    140   Thereafter you should be able to keep your local check-out up to date
   111    141   with the latest code in the public repository by typing:
   112    142   <blockquote><pre>
   113         -fossil update
          143  +fossil [/help/update|update]
   114    144   </pre></blockquote></blockquote></li>
   115    145   
          146  +<a name="q8"></a>
          147  +<p><b>(8) How do I import or export content from and to other version control systems?</b></p>
          148  +
          149  +<blockquote>Please see [./inout.wiki | Import And Export]</blockquote></li>
          150  +
   116    151   </ol>

Changes to www/makefile.wiki.

    83     83   should understand that whenever "src.c" or "src.h" is used in the text
    84     84   that follows, we really mean all (79) other source files other than
    85     85   the exceptions described above.
    86     86   
    87     87   <h1>3.0 Automatically generated files</h1>
    88     88   
    89     89   The "VERSION.h" header file contains some C preprocessor macros that
    90         -identify the version of Fossil that is to be build.  The VERSION.h file
           90  +identify the version of Fossil that is to be build.  The VERSION.h file is
    91     91   generated automatically from information extracted from the "manifest"
    92     92   and "manifest.uuid" source files in the root directory of the source tree.
    93     93   (The "manifest" and "manifest.uuid" files are automatically generated and
    94     94   updated by Fossil itself.  See the [/help/setting | fossil set manifest]
    95     95   command for additional information.)
    96     96   
    97     97   Under unix, there is an AWK script that converts manifest and manifest.uuid
................................................................................
   110    110   in the root of the source tree are the first two arguments and the name of
   111    111   the generated VERSION.h file is the third and final argument.
   112    112   
   113    113   <h1>4.0 Preprocessing</h1>
   114    114   
   115    115   There are three preprocessors for the Fossil sources.  The mkindex
   116    116   and translate preprocessors can be run in any order.  The makeheaders
   117         -preprocessor has to be run after translate.
          117  +preprocessor must be run after translate.
   118    118   
   119    119   <h2>4.1 The mkindex preprocessor</h2>
   120    120   
   121    121   The mkindex program scans the "src.c" source files looking for special
   122    122   comments that identify routines that implement of various Fossil commands,
   123    123   web interface methods, and help text comments.  The mkindex program
   124    124   generates some C code that Fossil uses in order to dispatch commands and

Changes to www/webui.wiki.

     1      1   <title>The Fossil Web Interface</title>
     2         -<h2>Overview</h2>
     3      2   
     4         -One of the innovative features of fossil is its built-in web interface.
            3  +One of the innovative features of Fossil is its built-in web interface.
     5      4   This web interface provides everything you need to run a software
     6      5   development project:
     7      6   
     8      7     *  [./bugtheory.wiki | Ticketing and bug tracking]
     9      8     *  [./wikitheory.wiki | Wiki]
    10      9     *  [./embeddeddoc.wiki | On-line documentation]
    11     10     *  Status information
    12     11     *  Timelines
           12  +  *  Graphs of revision and branching history
           13  +  *  [./event.wiki | Blogs, News, and Announcements]
    13     14     *  File and version lists and differences
           15  +  *  Download historical versions as ZIP archives
    14     16     *  Historical change data
    15         -  *  Links to download historical versions as ZIP archives
           17  +  *  Add and remove tags on checkins
           18  +  *  Move checkins between branches
           19  +  *  Revise checkin comments
           20  +  *  Manage user credentials and access permissions
           21  +  *  And so forth...
    16     22   
    17         -You get all of this, and more, for free when you use fossil. 
           23  +You get all of this, and more, for free when you use Fossil. 
    18     24   There are no extra programs to install or setup.
    19     25   Everything you need is already pre-configured and built into the
    20         -self-contained, stand-alone fossil executable.
           26  +self-contained, stand-alone Fossil executable.
    21     27   
    22     28   As an example of how useful this web interface can be,
    23         -the entire [./index.wiki | fossil website] (except for the
    24         -[http://www.fossil-scm.org/download.html | precompiled binary download page]),
           29  +the entire [./index.wiki | Fossil website] (except for the
           30  +[http://www.fossil-scm.org/download.html | download page]),
    25     31   including the document you are now reading,
    26         -is rendered using the stock fossil web interface, with no enhancements,
           32  +is rendered using the Fossil web interface, with no enhancements,
    27     33   and little customization.
    28     34   
    29         -Note also that because fossil is a distributed system, you can run
           35  +<blockquote>
           36  +<b>Key point:</b> <i>The Fossil website is just a running instance
           37  +of Fossil!
           38  +</blockquote>
           39  +
           40  +Note also that because Fossil is a distributed system, you can run
    30     41   the web interface on your local machine while off network (for example,
    31     42   while on an airplane) including
    32     43   making changes to wiki pages and/or trouble ticket, then synchronize with your
    33         -co-workers after you reconnect.
           44  +co-workers after you reconnect.  When you clone a Fossil repository, you
           45  +don't just get the project source code, you get the entire project
           46  +management website.
    34     47   
    35     48   <h2>Drop-Dead Simple Startup</h2>
    36     49   
    37         -To start using the built-in fossil web interface on an existing fossil
           50  +To start using the built-in Fossil web interface on an existing Fossil
    38     51   repository, simply type this:
    39     52   
    40     53      <b>fossil ui existing-repository.fossil</b>
    41     54   
    42     55   Substitute the name of your repository, of course.
    43     56   The "ui" command will start a webserver running (it figures out an
    44     57   available TCP port to use on its own) and then automatically launches 
    45     58   your web browser to point at that server.  If you run the "ui" command
    46     59   from within an open check-out, you can omit the repository name:
    47     60   
    48     61     <b>fossil ui</b>
    49     62   
    50     63   The latter case is a very useful short-cut when you are working on a
    51         -fossil project and you want to quickly do some work with the web interface.
    52         -Notice that fossil automatically finds an unused TCP port to run the
           64  +Fossil project and you want to quickly do some work with the web interface.
           65  +Notice that Fossil automatically finds an unused TCP port to run the
    53     66   server own and automatically points your web browser to the correct
    54     67   URL.  So there is never any fumbling around trying to find an open
    55     68   port or to type arcane strings into your browser URL entry box.
    56     69   The interface just pops right up, ready to run.
    57     70   
    58         -The fossil web interface is also very easy to setup and run on a
           71  +The Fossil web interface is also very easy to setup and run on a
    59     72   network server, as either a CGI program or from inetd.  Details on how
    60     73   to do that are described further below.
    61     74   
    62     75   <h2>Things To Do Using The Web Interface</h2>
    63     76   
    64     77   You can view <b>timelines</b> of changes to the project.  The default
    65     78   "Timeline" link on the menu bar takes you to a page that shows the 20
    66         -most recent check-ins, wiki page edits, and ticket/bug-report changes.
           79  +most recent check-ins, wiki page edits, ticket/bug-report changes,
           80  +and/or blog entries.
    67     81   This gives a very useful snapshot of what has been happening lately on the
    68     82   project.  You can click to go further back in time, if needed.  Or
    69     83   follow hyperlinks to see details, including diffs and annotated diffs,
    70         -of individual check-ins, wiki page edits, or ticket changes.
           84  +of individual check-ins, wiki page edits, ticket changes, and
           85  +blog edits.
    71     86   
    72     87   You can view and edit <b>tickets and bug reports</b> by following the
    73     88   "Tickets" link on the menu bar.
    74     89   Fossil is backed by an SQL database, so users with appropriate permissions
    75     90   can write new ticket report formats based on SQL query statements.
    76     91   Fossil is careful to prevent ticket report formats from doing any mischief
    77     92   on the database (it only allows SELECT statements to run) and it restricts
................................................................................
    85    100   You can view and edit <b>wiki</b> by following the "Wiki" link on the
    86    101   menu bar.  Fossil uses simple and easy-to-remember
    87    102   [/wiki_rules | wiki formatting rules] so you won't have to spend a lot
    88    103   of time learning a new markup language.  And, as with tickets, all of
    89    104   your edits will automatically merge with those of your co-workers when
    90    105   your repository synchronizes.
    91    106   
    92         -You can view summary reports of <b>leaves and branches</b> in the
    93         -check-in graph by visiting the "Leaves" or "Branches" links on the
          107  +You can view summary reports of <b>branches</b> in the
          108  +check-in graph by visiting the "Branche" links on the
    94    109   menu bar.  From those pages you can follow hyperlinks to get additional
    95    110   details.  These screens allow you to easily keep track of what is going
    96    111   on with separate subteams within your project team.
    97    112   
    98    113   The "Files" link on the menu allows you to browse though the <b>file
    99    114   hierarchy</b> of the project and to view complete changes histories on
   100    115   individual files, with hyperlinks to the check-ins that made those
................................................................................
   115    130   for the entire page.  You can even change around the main menu.
   116    131   Timeline display preferences can be edited.  The page that is brought
   117    132   up as the "Home" page can be changed.  It is often useful to set the
   118    133   "Home" page to be a wiki page or an embedded document.
   119    134   
   120    135   <h2>Installing On A Network Server</h2>
   121    136   
   122         -When you create a new fossil project and after you have configured it
          137  +When you create a new Fossil project and after you have configured it
   123    138   like you want it using the web interface, you can make the project
   124    139   available to a distributed team by simply copying the single
   125    140   repository file up to a web server that supports CGI.  Just put the
   126    141   <b>sample-project.fossil</b> file in a directory where CGI scripts
   127    142   have both read and write permission on the file and the directory that
   128    143   contains the file, then add a CGI script that looks something like this:
   129    144   
   130    145     <verbatim>
   131    146     #!/usr/local/bin/fossil
   132    147     repository: /home/www/sample-project.fossil
   133    148     </verbatim>
   134    149   
   135    150   Adjust the script above so that the paths are correct for your system,
   136         -of course, and also make sure the fossil binary is installed on the server.
          151  +of course, and also make sure the Fossil binary is installed on the server.
   137    152   But that is <u>all</u> you have to do.  You now have everything you need to host
   138    153   a distributed software development project in less than five minutes using a 
   139    154   two-line CGI script.
   140    155   
   141    156   You don't have a CGI-capable web server running on your server machine?
   142         -Not a problem.  The fossil interface can also be launched via inetd or
   143         -xinetd.  An inetd configuration line sufficient to launch the fossil
          157  +Not a problem.  The Fossil interface can also be launched via inetd or
          158  +xinetd.  An inetd configuration line sufficient to launch the Fossil
   144    159   web interface looks like this:
   145    160   
   146    161     <verbatim>
   147    162     80 stream tcp nowait.1000 root /usr/local/bin/fossil \
   148    163     /usr/local/bin/fossil http /home/www/sample-project.fossil 
   149    164     </verbatim>
   150    165   
   151    166   As always, you'll want to adjust the pathnames to whatever is appropriate
   152    167   for your system.  The xinetd setup uses a different syntax but follows
   153    168   the same idea.