Fossil with Commonmark

Changes On Branch setup-textarea
Login

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

Changes In Branch setup-textarea Excluding Merge-Ins

This is equivalent to a diff from 60f669e937 to d6aa95d332

2014-02-17
19:48
[202edc2c1c]: Make 'th1-setup' a textarea in settings UI. check-in: 5447125d34 user: jan.nijtmans tags: trunk
15:20
Don't put th1-setup and tcl-setup fields twice on the same setup page. Closed-Leaf check-in: d6aa95d332 user: jan.nijtmans tags: setup-textarea
14:23
Now make th1-setup and tcl-setup a text-area without making the setting versionable. check-in: da7daf027e user: jan.nijtmans tags: setup-textarea
12:43
[202edc2c1c]: Make `th1-setup` a textarea in settings UI. Fixed by making it a versionable setting (just as "tcl-setup", for consistancy) and moving it to the second column of the setup page. Remark: Making "th1-setup" versionable is not a good idea: It would mean that any Web-page access must do an additional check for the presence of a versionable setting file. Therefore putting it aside. check-in: 28429acb2b user: jan.nijtmans tags: setup-textarea
11:07
Make sure that EVERY 'initial' checkin has an R-card, despite the "repo-cksum" setting. It is the only way to be able to distinguish Manifests from Control artifacts by looking at the presence of cards only. Otherwise, Fossil versions < 1.27 cannot handle that. check-in: 60f669e937 user: jan.nijtmans tags: trunk
09:51
Add option --empty to the "[/help?cmd=open | fossil open]" command. See: [https://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg14359.html] check-in: 640626fdbf user: jan.nijtmans tags: trunk

Changes to src/db.c.

1788
1789
1790
1791
1792
1793
1794
1795

1796
1797
1798
1799
1800
1801
1802
1788
1789
1790
1791
1792
1793
1794

1795
1796
1797
1798
1799
1800
1801
1802







-
+







    z = db_text(0, "SELECT value FROM config WHERE name=%Q", zName);
  }
  if( z==0 && g.zConfigDbName ){
    db_swap_connections();
    z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
    db_swap_connections();
  }
  if( ctrlSetting!=0 && ctrlSetting->versionable ){
  if( ctrlSetting!=0 && (ctrlSetting->width&SETUP_VERSIONABLE) ){
    /* This is a versionable setting, try and get the info from a
    ** checked out file */
    z = db_get_do_versionable(zName, z);
  }
  if( z==0 ){
    z = zDefault;
  }
2078
2079
2080
2081
2082
2083
2084
2085

2086
2087
2088
2089
2090
2091
2092
2078
2079
2080
2081
2082
2083
2084

2085
2086
2087
2088
2089
2090
2091
2092







-
+







  }
  if( db_step(&q)==SQLITE_ROW ){
    fossil_print("%-20s %-8s %s\n", ctrlSetting->name, db_column_text(&q, 0),
        db_column_text(&q, 1));
  }else{
    fossil_print("%-20s\n", ctrlSetting->name);
  }
  if( ctrlSetting->versionable && localOpen ){
  if( (ctrlSetting->width&SETUP_VERSIONABLE) && localOpen ){
    /* Check to see if this is overridden by a versionable settings file */
    Blob versionedPathname;
    blob_zero(&versionedPathname);
    blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
                 g.zLocalRoot, ctrlSetting->name);
    if( file_size(blob_str(&versionedPathname))>=0 ){
      fossil_print("  (overridden by contents of file .fossil-settings/%s)\n",
2103
2104
2105
2106
2107
2108
2109





2110
2111
2112
2113
2114


2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126








2127
2128

2129
2130

2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159




























2160
2161
2162


2163
2164
2165
2166
2167
2168





2169
2170
2171
2172
2173
2174
2175
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117


2118
2119
2120
2121
2122
2123








2124
2125
2126
2127
2128
2129
2130
2131
2132

2133
2134

2135
2136




























2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165


2166
2167
2168





2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180







+
+
+
+
+



-
-
+
+




-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+

-
+

-
+

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

-
-
+
+

-
-
-
-
-
+
+
+
+
+







** If var is 0, the settings name is used.
** width is the length for the edit field on the behavior page, 0
** is used for on/off checkboxes.
** The behaviour page doesn't use a special layout. It lists all
** set-commands and displays the 'set'-help as info.
*/
#if INTERFACE

#define SETUP_WIDTH           63
#define SETUP_TEXTAREA        64
#define SETUP_VERSIONABLE    128

struct stControlSettings {
  char const *name;     /* Name of the setting */
  char const *var;      /* Internal variable name used by db_set() */
  int width;            /* Width of display.  0 for boolean values */
  int versionable;      /* Is this setting versionable? */
  int width;            /* Width of display.  0 for boolean values.
                           possibly or'ed with above flags. */
  char const *def;      /* Default value */
};
#endif /* INTERFACE */
struct stControlSettings const ctrlSettings[] = {
  { "access-log",    0,                0, 0, "off"                 },
  { "allow-symlinks",0,                0, 1, "off"                 },
  { "auto-captcha",  "autocaptcha",    0, 0, "on"                  },
  { "auto-hyperlink",0,                0, 0, "on",                 },
  { "auto-shun",     0,                0, 0, "on"                  },
  { "autosync",      0,                0, 0, "on"                  },
  { "binary-glob",   0,               40, 1, ""                    },
  { "clearsign",     0,                0, 0, "off"                 },
  { "access-log",    0,                    0, "off"                 },
  { "allow-symlinks",0,    SETUP_VERSIONABLE, "off"                 },
  { "auto-captcha",  "autocaptcha",        0, "on"                  },
  { "auto-hyperlink",0,                    0, "on",                 },
  { "auto-shun",     0,                    0, "on"                  },
  { "autosync",      0,                    0, "on"                  },
  { "binary-glob",   0, SETUP_VERSIONABLE|40, ""                    },
  { "clearsign",     0,                    0, "off"                 },
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__DARWIN__) || defined(__APPLE__)
  { "case-sensitive",0,                0, 0, "off"                 },
  { "case-sensitive",0,                    0, "off"                 },
#else
  { "case-sensitive",0,                0, 0, "on"                  },
  { "case-sensitive",0,                    0, "on"                  },
#endif
  { "clean-glob",    0,               40, 1, ""                    },
  { "crnl-glob",     0,               40, 1, ""                    },
  { "default-perms", 0,               16, 0, "u"                   },
  { "diff-binary",   0,                0, 0, "on"                  },
  { "diff-command",  0,               40, 0, ""                    },
  { "dont-push",     0,                0, 0, "off"                 },
  { "editor",        0,               32, 0, ""                    },
  { "empty-dirs",    0,               40, 1, ""                    },
  { "encoding-glob",  0,              40, 1, ""                    },
  { "gdiff-command", 0,               40, 0, "gdiff"               },
  { "gmerge-command",0,               40, 0, ""                    },
  { "http-port",     0,               16, 0, "8080"                },
  { "https-login",   0,                0, 0, "off"                 },
  { "ignore-glob",   0,               40, 1, ""                    },
  { "keep-glob",     0,               40, 1, ""                    },
  { "localauth",     0,                0, 0, "off"                 },
  { "main-branch",   0,               40, 0, "trunk"               },
  { "manifest",      0,                0, 1, "off"                 },
  { "max-upload",    0,               25, 0, "250000"              },
  { "mtime-changes", 0,                0, 0, "on"                  },
  { "pgp-command",   0,               40, 0, "gpg --clearsign -o " },
  { "proxy",         0,               32, 0, "off"                 },
  { "relative-paths",0,                0, 0, "on"                  },
  { "repo-cksum",    0,                0, 0, "on"                  },
  { "self-register", 0,                0, 0, "off"                 },
  { "ssh-command",   0,               40, 0, ""                    },
  { "ssl-ca-location",0,              40, 0, ""                    },
  { "ssl-identity",  0,               40, 0, ""                    },
  { "clean-glob",    0, SETUP_VERSIONABLE|40, ""                    },
  { "crnl-glob",     0, SETUP_VERSIONABLE|40, ""                    },
  { "default-perms", 0,                   16, "u"                   },
  { "diff-binary",   0,                    0, "on"                  },
  { "diff-command",  0,                   40, ""                    },
  { "dont-push",     0,                    0, "off"                 },
  { "editor",        0,                   32, ""                    },
  { "empty-dirs",    0, SETUP_VERSIONABLE|40, ""                    },
  { "encoding-glob", 0, SETUP_VERSIONABLE|40, ""                    },
  { "gdiff-command", 0,                   40, "gdiff"               },
  { "gmerge-command",0,                   40, ""                    },
  { "http-port",     0,                   16, "8080"                },
  { "https-login",   0,                    0, "off"                 },
  { "ignore-glob",   0, SETUP_VERSIONABLE|40, ""                    },
  { "keep-glob",     0, SETUP_VERSIONABLE|40, ""                    },
  { "localauth",     0,                    0, "off"                 },
  { "main-branch",   0,                   40, "trunk"               },
  { "manifest",      0,    SETUP_VERSIONABLE, "off"                 },
  { "max-upload",    0,                   25, "250000"              },
  { "mtime-changes", 0,                    0, "on"                  },
  { "pgp-command",   0,                   40, "gpg --clearsign -o " },
  { "proxy",         0,                   32, "off"                 },
  { "relative-paths",0,                    0, "on"                  },
  { "repo-cksum",    0,                    0, "on"                  },
  { "self-register", 0,                    0, "off"                 },
  { "ssh-command",   0,                   40, ""                    },
  { "ssl-ca-location",0,                  40, ""                    },
  { "ssl-identity",  0,                   40, ""                    },
#ifdef FOSSIL_ENABLE_TCL
  { "tcl",           0,                0, 0, "off"                 },
  { "tcl-setup",     0,               40, 0, ""                    },
  { "tcl",           0,                    0, "off"                 },
  { "tcl-setup",     0,    SETUP_TEXTAREA|40, ""                    },
#endif
  { "th1-setup",     0,               40, 0, ""                    },
  { "th1-uri-regexp",0,               40, 0, ""                    },
  { "web-browser",   0,               32, 0, ""                    },
  { "white-foreground", 0,             0, 0, "off"                 },
  { 0,0,0,0,0 }
  { "th1-setup",     0,    SETUP_TEXTAREA|40, ""                    },
  { "th1-uri-regexp",0,                   40, ""                    },
  { "web-browser",   0,                   32, ""                    },
  { "white-foreground", 0,                 0, "off"                 },
  { 0,0,0,0 }
};

/*
** COMMAND: settings
** COMMAND: unset*
**
** %fossil settings ?PROPERTY? ?VALUE? ?OPTIONS?

Changes to src/setup.c.

1246
1247
1248
1249
1250
1251
1252
1253
1254


1255
1256
1257
1258
1259

1260
1261
1262
1263
1264
1265
1266
1267
1268


1269
1270
1271
1272
1273
















1274
1275
1276
1277
1278

1279
1280
1281
1282
1283
1284
1285
1246
1247
1248
1249
1250
1251
1252


1253
1254
1255
1256
1257
1258

1259
1260
1261
1262
1263
1264
1265
1266
1267

1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294

1295
1296
1297
1298
1299
1300
1301
1302







-
-
+
+




-
+








-
+
+





+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+




-
+







  @ <p>This page provides a simple interface to the "fossil setting" command.
  @ See the "fossil help setting" output below for further information on
  @ the meaning of each setting.</p><hr />
  @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
  @ <table border="0"><tr><td valign="top">
  login_insert_csrf_secret();
  for(pSet=ctrlSettings; pSet->name!=0; pSet++){
    if( pSet->width==0 ){
      int hasVersionableValue = pSet->versionable &&
    if( (pSet->width&SETUP_WIDTH)==0 ){
      int hasVersionableValue = (pSet->width&SETUP_VERSIONABLE) &&
          (db_get_do_versionable(pSet->name, NULL)!=0);
      onoff_attribute(pSet->name, pSet->name,
                      pSet->var!=0 ? pSet->var : pSet->name,
                      is_truth(pSet->def), hasVersionableValue);
      if( pSet->versionable ){
      if( (pSet->width&SETUP_VERSIONABLE) ){
        @  (v)<br />
      } else {
        @ <br />
      }
    }
  }
  @ </td><td style="width:50px;"></td><td valign="top">
  for(pSet=ctrlSettings; pSet->name!=0; pSet++){
    if( pSet->width!=0 && !pSet->versionable){
    if( (pSet->width&SETUP_WIDTH)!=0
        && !(pSet->width&(SETUP_VERSIONABLE|SETUP_TEXTAREA)) ){
      entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
                      pSet->var!=0 ? pSet->var : pSet->name,
                      (char*)pSet->def, 0);
      @ <br />
    }
  }
  for(pSet=ctrlSettings; pSet->name!=0; pSet++){
    if( (pSet->width&SETUP_WIDTH)!=0 && sqlite3_strglob("*glob", pSet->name)
        && (pSet->width&(SETUP_VERSIONABLE|SETUP_TEXTAREA)) ){
      int hasVersionableValue = 0;
      @<b>%s(pSet->name)</b>
      if( pSet->width&SETUP_VERSIONABLE ){
        hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
        @ (v)
      }
      @<br />
      textarea_attribute("", /*rows*/ 3, /*cols*/ 35, pSet->name,
                      pSet->var!=0 ? pSet->var : pSet->name,
                      (char*)pSet->def, hasVersionableValue);
      @ <br />
    }
  }
  @ </td><td style="width:50px;"></td><td valign="top">
  for(pSet=ctrlSettings; pSet->name!=0; pSet++){
    int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
    if( pSet->width!=0 && pSet->versionable){
    if( (pSet->width&SETUP_WIDTH)!=0 && !sqlite3_strglob("*glob", pSet->name)){
      @<b>%s(pSet->name)</b> (v)<br />
      textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
                      pSet->var!=0 ? pSet->var : pSet->name,
                      (char*)pSet->def, hasVersionableValue);
      @<br />
    }
  }