Changes On Branch kkinnell-exp
Not logged in

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

Changes In Branch kkinnell-exp Excluding Merge-Ins

This is equivalent to a diff from f8f8baf945 to 51868cb12f

2009-01-30
21:18
Changed update docs, ** ADDED A _SPECIAL_ (but MUTYPE_BLOCK) wikitag <annotation> to put html comments in wikimarkup Leaf check-in: 51868cb12f user: kkennell tags: kkinnell-exp
2009-01-29
23:04
Merge in kkinnell's documentation updates. check-in: 24c045f373 user: drh tags: trunk
19:11
Add link to branching page. check-in: f8f8baf945 user: kejoki tags: trunk
2009-01-23
21:24
First draft of the "branching" document. check-in: 2e275c1420 user: drh tags: trunk

Changes to src/wikiformat.c.

     1      1   /*
     2         -** Copyright (c) 2007 D. Richard Hipp
            2  +** Copyright (c) 2007, 2009 D. Richard Hipp
     3      3   **
     4      4   ** This program is free software; you can redistribute it and/or
     5      5   ** modify it under the terms of the GNU General Public
     6      6   ** License version 2 as published by the Free Software Foundation.
     7      7   **
     8      8   ** This program is distributed in the hope that it will be useful,
     9      9   ** but WITHOUT ANY WARRANTY; without even the implied warranty of
................................................................................
   154    154   ** and in numerical sequence.  The first markup type must be zero.
   155    155   ** The value for MARKUP_XYZ must correspond to the <xyz> entry 
   156    156   ** in aAllowedMarkup[].
   157    157   */
   158    158   #define MARKUP_INVALID           0
   159    159   #define MARKUP_A                 1
   160    160   #define MARKUP_ADDRESS           2
   161         -#define MARKUP_B                 3
   162         -#define MARKUP_BIG               4
   163         -#define MARKUP_BLOCKQUOTE        5
   164         -#define MARKUP_BR                6
   165         -#define MARKUP_CENTER            7
   166         -#define MARKUP_CITE              8
   167         -#define MARKUP_CODE              9
   168         -#define MARKUP_DD               10
   169         -#define MARKUP_DFN              11
   170         -#define MARKUP_DIV              12
   171         -#define MARKUP_DL               13
   172         -#define MARKUP_DT               14
   173         -#define MARKUP_EM               15
   174         -#define MARKUP_FONT             16
   175         -#define MARKUP_H1               17
   176         -#define MARKUP_H2               18
   177         -#define MARKUP_H3               19
   178         -#define MARKUP_H4               20
   179         -#define MARKUP_H5               21
   180         -#define MARKUP_H6               22
   181         -#define MARKUP_HR               23
   182         -#define MARKUP_I                24
   183         -#define MARKUP_IMG              25
   184         -#define MARKUP_KBD              26
   185         -#define MARKUP_LI               27
   186         -#define MARKUP_NOBR             28
   187         -#define MARKUP_NOWIKI           29
   188         -#define MARKUP_OL               30
   189         -#define MARKUP_P                31
   190         -#define MARKUP_PRE              32
   191         -#define MARKUP_S                33
   192         -#define MARKUP_SAMP             34
   193         -#define MARKUP_SMALL            35
   194         -#define MARKUP_STRIKE           36
   195         -#define MARKUP_STRONG           37
   196         -#define MARKUP_SUB              38
   197         -#define MARKUP_SUP              39
   198         -#define MARKUP_TABLE            40
   199         -#define MARKUP_TD               41
   200         -#define MARKUP_TH               42
   201         -#define MARKUP_TR               43
   202         -#define MARKUP_TT               44
   203         -#define MARKUP_U                45
   204         -#define MARKUP_UL               46
   205         -#define MARKUP_VAR              47
   206         -#define MARKUP_VERBATIM         48
          161  +#define MARKUP_ANNOTATION        3
          162  +#define MARKUP_B                 4
          163  +#define MARKUP_BIG               5
          164  +#define MARKUP_BLOCKQUOTE        6
          165  +#define MARKUP_BR                7
          166  +#define MARKUP_CENTER            8
          167  +#define MARKUP_CITE              9
          168  +#define MARKUP_CODE             10
          169  +#define MARKUP_DD               11
          170  +#define MARKUP_DFN              12
          171  +#define MARKUP_DIV              13
          172  +#define MARKUP_DL               14
          173  +#define MARKUP_DT               15
          174  +#define MARKUP_EM               16
          175  +#define MARKUP_FONT             17
          176  +#define MARKUP_H1               18
          177  +#define MARKUP_H2               19
          178  +#define MARKUP_H3               20
          179  +#define MARKUP_H4               21
          180  +#define MARKUP_H5               22
          181  +#define MARKUP_H6               23
          182  +#define MARKUP_HR               24
          183  +#define MARKUP_I                25
          184  +#define MARKUP_IMG              26
          185  +#define MARKUP_KBD              27
          186  +#define MARKUP_LI               28
          187  +#define MARKUP_NOBR             29
          188  +#define MARKUP_NOWIKI           30
          189  +#define MARKUP_OL               31
          190  +#define MARKUP_P                32
          191  +#define MARKUP_PRE              33
          192  +#define MARKUP_S                34
          193  +#define MARKUP_SAMP             35
          194  +#define MARKUP_SMALL            36
          195  +#define MARKUP_STRIKE           37
          196  +#define MARKUP_STRONG           38
          197  +#define MARKUP_SUB              39
          198  +#define MARKUP_SUP              40
          199  +#define MARKUP_TABLE            41
          200  +#define MARKUP_TD               42
          201  +#define MARKUP_TH               43
          202  +#define MARKUP_TR               44
          203  +#define MARKUP_TT               45
          204  +#define MARKUP_U                46
          205  +#define MARKUP_UL               47
          206  +#define MARKUP_VAR              48
          207  +#define MARKUP_VERBATIM         49
   207    208   
   208    209   /*
   209    210   ** The various markup is divided into the following types:
   210    211   */
   211    212   #define MUTYPE_SINGLE      0x0001   /* <img>, <br>, or <hr> */
   212    213   #define MUTYPE_BLOCK       0x0002   /* Forms a new paragraph. ex: <p>, <h2> */
   213    214   #define MUTYPE_FONT        0x0004   /* Font changes. ex: <b>, <font>, <sub> */
   214    215   #define MUTYPE_LIST        0x0010   /* Lists.  <ol>, <ul>, or <dl> */
   215    216   #define MUTYPE_LI          0x0020   /* List items.  <li>, <dd>, <dt> */
   216    217   #define MUTYPE_TABLE       0x0040   /* <table> */
   217    218   #define MUTYPE_TR          0x0080   /* <tr> */
   218    219   #define MUTYPE_TD          0x0100   /* <td> or <th> */
   219         -#define MUTYPE_SPECIAL     0x0200   /* <nowiki> or <verbatim> */
          220  +#define MUTYPE_SPECIAL     0x0200   /* <annotation>, <nowiki> or <verbatim> */
   220    221   #define MUTYPE_HYPERLINK   0x0400   /* <a> */
   221    222   
   222    223   /*
   223    224   ** These markup types must have an end tag.
   224    225   */
   225    226   #define MUTYPE_STACK  (MUTYPE_BLOCK | MUTYPE_FONT | MUTYPE_LIST | MUTYPE_TABLE)
   226    227   
................................................................................
   235    236     short int iType;         /* The MUTYPE_* code */
   236    237     int allowedAttr;         /* Allowed attributes on this markup */
   237    238   } aMarkup[] = {
   238    239    { 0,               MARKUP_INVALID,      0,                    0  },
   239    240    { "a",             MARKUP_A,            MUTYPE_HYPERLINK,
   240    241                       AMSK_HREF|AMSK_NAME },
   241    242    { "address",       MARKUP_ADDRESS,      MUTYPE_BLOCK,         0  },
          243  + { "annotation",    MARKUP_ANNOTATION,   MUTYPE_BLOCK,         0  },
   242    244    { "b",             MARKUP_B,            MUTYPE_FONT,          0  },
   243    245    { "big",           MARKUP_BIG,          MUTYPE_FONT,          0  },
   244    246    { "blockquote",    MARKUP_BLOCKQUOTE,   MUTYPE_BLOCK,         0  },
   245    247    { "br",            MARKUP_BR,           MUTYPE_SINGLE,        AMSK_CLEAR  },
   246    248    { "center",        MARKUP_CENTER,       MUTYPE_BLOCK,         0  },
   247    249    { "cite",          MARKUP_CITE,         MUTYPE_FONT,          0  },
   248    250    { "code",          MARKUP_CODE,         MUTYPE_FONT,          0  },
................................................................................
  1138   1140           blob_append(p->pOut, z, n);
  1139   1141           break;
  1140   1142         }
  1141   1143         case TOKEN_MARKUP: {
  1142   1144           const char *zId;
  1143   1145           int iDiv;
  1144   1146           parseMarkup(&markup, z);
         1147  +
         1148  +        /* Annotation markup turns into HTML comment */
         1149  +        if( markup.iCode==MARKUP_ANNOTATION && markup.endTag ){
         1150  +	  blob_append(p->pOut, "-->", 3);
         1151  +	  break;
         1152  +	}
  1145   1153   
  1146   1154           /* Markup of the form </div id=ID> where there is a matching
  1147   1155           ** ID somewhere on the stack.  Exit the verbatim if were are in
  1148   1156           ** it.  Pop the stack up to the matching <div>.  Discard the 
  1149   1157           ** </div>
  1150   1158           */
  1151   1159           if( markup.iCode==MARKUP_DIV && markup.endTag &&
................................................................................
  1164   1172               p->state &= ~ALLOW_WIKI;
  1165   1173             }
  1166   1174             assert( p->nStack==iDiv+1 );
  1167   1175             p->nStack--;
  1168   1176           }else
  1169   1177   
  1170   1178           /* If within <verbatim id=ID> ignore everything other than
  1171         -        ** </verbatim id=ID> and the </dev id=ID2> above.
         1179  +        ** </verbatim id=ID> and the </div id=ID2> above.
  1172   1180           */           
  1173   1181           if( p->inVerbatim ){
  1174   1182             if( endVerbatim(p, &markup) ){
  1175   1183               p->inVerbatim = 0;
  1176   1184               p->state = p->preVerbState;
  1177   1185               blob_append(p->pOut, "</pre>", 6);
  1178   1186             }else{
................................................................................
  1237   1245             }
  1238   1246             p->inVerbatim = 1;
  1239   1247             p->preVerbState = p->state;
  1240   1248             p->state &= ~ALLOW_WIKI;
  1241   1249             blob_append(p->pOut, "<pre class='verbatim'>",-1);
  1242   1250             p->wantAutoParagraph = 0;
  1243   1251           }else
         1252  +
         1253  +	/* Annotation markup starts an HTML comment */
         1254  +	if( markup.iCode==MARKUP_ANNOTATION ){
         1255  +	  p->wantAutoParagraph = 0;
         1256  +	  blob_append(p->pOut, "<!-- ", 5);
         1257  +	}else
         1258  +
  1244   1259           if( markup.iType==MUTYPE_LI ){
  1245   1260             if( backupToType(p, MUTYPE_LIST)==0 ){
  1246   1261               pushStack(p, MARKUP_UL);
  1247   1262               blob_append(p->pOut, "<ul>", 4);
  1248   1263             }
  1249   1264             pushStack(p, MARKUP_LI);
  1250   1265             renderMarkup(p->pOut, &markup);

Changes to www/cmd_sync.wiki.

    15     15   If you have cloned a repository you will automatically sync with the
    16     16   original if you [./cmd_commit.wiki | commit] changes to your local
    17     17   version <em>unless</em> you customize your configuration.
    18     18   
    19     19   See also: [./cmd_pull.wiki | fossil pull],
    20     20   [./cmd_push.wiki | fossil push],
    21     21   [./cmd_setting.wiki | fossil setting],
           22  +[./branching.wiki | <i>branching, merging, forking and tagging</i>],
    22     23   [./reference.wiki | Reference]

Changes to www/cmd_update.wiki.

     1      1   <h2>update</h2>
     2      2   
     3         -What do you do if you have changes out on a repository and
     4         -you want them merged with your checkout?
     5         -
     6         -You use the <code>update</code> command.
     7         -
     8         -<b>fossil</b> can [./about_checkout.wiki | overwrite] any
     9         -changes you've made to your checkout, or it can
    10         -[./about_merge.wiki | merge] whatever changes have occurred
    11         -in the repo into your checkout.
            3  +<u>Updating</u> a repository is the process of applying to it changes
            4  +made by external entities.  Contrast this with [./cmd_commit.wiki |
            5  +commit]ing a locally made change; updating is a bit like "committing"
            6  +external changes to the local repo.
    12      7   
    13      8   Update <em>merges</em> changes from the repository into your checkout.
            9  +That means that it won't have any effect unless there <i>are</i>
           10  +changes in the repository.  The only way the checkout can affect
           11  +the repo (this is the local repo we're talking about) is if you
           12  +do a [./cmd_commit.wiki | <code>ci</code>].  So, <code>update</code>
           13  +only really makes sense if you have
           14  +[./cmd_pull.wiki | <code>pull</code>]ed changes from the master repository
           15  +into the local repository.
    14     16   
    15         -<b>fossil</b> uses a simple conflict resolution strategy for merges:
    16         -the latest change wins.
           17  +<annotation>
           18  +  Note :
           19  +  really really need a quick overview of the pull-update-edit-commit-push
           20  +  workflow, and the shortcuts for that, and re-emphasize the role of autosync
           21  +  in changing the basic nature of the workflow
           22  +</annotation>
    17     23   
    18     24   Local intranet <code>[./cmd_commit.wiki | commit]</code>s
    19     25   (by someone else)
    20     26   or Net <code>[./cmd_pull.wiki | pull]</code>s from a server
    21         -will usually require a <code>fossil&nbsp;update</code> afterward.
           27  +will usually require a <code>fossil&nbsp;update</code> afterward,
           28  +because they are likely not to be done in
           29  +[./cmd_settings.wiki#autosync | autosync]
           30  +mode.
    22     31   
    23     32   Local commits are likely to be made with
    24     33   [./cmd_settings.wiki#autosync | automatic syncing]
    25     34   set to "on", however, so if you don't use <b>fossil</b> for Net-wide
    26     35   projects you may never have to use <code>update</code>.
    27     36   
    28     37   See also: [./cmd_pull.wiki | fossil pull],
    29     38   [./cmd_commit.wiki | fossil commit],
    30     39   [./cmd_settings.wiki#autosync | fossil setting] (autosync),
    31         -[./about_checkout.wiki | <i>checkouts</i>],
    32         -[./about_merge.wiki | <i>merging</i>],
           40  +[./branching.wiki | <i>branching, merging, forking and tagging</i>],
    33     41   [./reference.wiki | Reference]

Changes to www/reference.wiki.

   109    109         <tr>
   110    110   	<td><a href="#commit">commit</a></td>
   111    111   	<td><a href="#info">info</a></td>
   112    112   	<td><a href="#reconstruct">reconstruct</a></td>
   113    113           <td><a href="#tag">tag</a></td>
   114    114         </tr>
   115    115       </table><nowiki><pre>
   116         -This is fossil version [b12a031557] 2008-12-26 17:41:09 UTC
          116  +This is fossil version [f8f8baf945] 2009-01-29 19:11:52 UTC
   117    117   </pre>
   118    118   <b>What follows</b> is a survey of what you get if you type<code>
   119    119   fossil&nbsp;help&nbsp;<i>command</i> </code>for all of the
   120    120   commands listed above.  There are links to individual pages for each
   121    121   of them; pages with content (commands marked with a '*' are done) go
   122    122   into the reason for a command in a bit more depth than the program help.
   123    123   <pre>