Fossil

Check-in [e8ecd18db1]
Login

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

Overview
Comment:Rename "unicode-glob" to "encoding-glob".
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | improve_commit_warning
Files: files | file ages | folders
SHA1: e8ecd18db10b935d6092d8c71b457f6965f0ea14
User & Date: jan.nijtmans 2013-01-21 11:38:18.530
Context
2013-02-07
09:39
merge trunk check-in: 8994f3680a user: jan.nijtmans tags: improve_commit_warning
2013-01-21
11:38
Rename "unicode-glob" to "encoding-glob". check-in: e8ecd18db1 user: jan.nijtmans tags: improve_commit_warning
10:29
merge trunk check-in: a68dffbff3 user: jan.nijtmans tags: improve_commit_warning
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/checkin.c.
912
913
914
915
916
917
918

919
920
921

922
923
924
925
926
927
928
  if( eType<-2){
    const char *zWarning;
    const char *zConvert;
    Blob ans;
    char cReply;

    if(eType==-4){

      zWarning = "long lines";
      zConvert = "";
    }else{

      zWarning = "invalid UTF-8";
      zConvert = "c=convert/";
    }
    blob_zero(&ans);
    file_relative_name(zFilename, &fname, 0);
    zMsg = mprintf(
         "%s appears to be text, but contains %s.  commit anyhow (%sy/N)? ",







>



>







912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
  if( eType<-2){
    const char *zWarning;
    const char *zConvert;
    Blob ans;
    char cReply;

    if(eType==-4){
      if (binOk) goto go_on;
      zWarning = "long lines";
      zConvert = "";
    }else{
      if (unicodeOk) goto go_on;
      zWarning = "invalid UTF-8";
      zConvert = "c=convert/";
    }
    blob_zero(&ans);
    file_relative_name(zFilename, &fname, 0);
    zMsg = mprintf(
         "%s appears to be text, but contains %s.  commit anyhow (%sy/N)? ",
941
942
943
944
945
946
947

948
949
950
951
952
953
954
      fclose(f);
      return 1;
    } else if( cReply!='y' && cReply!='Y' ){
      fossil_fatal("Abandoning commit due to %s in %s",
                   zWarning, blob_str(&fname));
    }
    blob_reset(&ans);

    eType +=4 ;
  }
  if( eType==0 || eType==-1 || fUnicode ){
    const char *zWarning;
    const char *zConvert = "c=convert/";
    Blob ans;
    char cReply;







>







943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
      fclose(f);
      return 1;
    } else if( cReply!='y' && cReply!='Y' ){
      fossil_fatal("Abandoning commit due to %s in %s",
                   zWarning, blob_str(&fname));
    }
    blob_reset(&ans);
  go_on:
    eType +=4 ;
  }
  if( eType==0 || eType==-1 || fUnicode ){
    const char *zWarning;
    const char *zConvert = "c=convert/";
    Blob ans;
    char cReply;
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
  */
  db_prepare(&q,
    "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
    "WHERE chnged==1 AND NOT deleted AND is_selected(id)",
    g.zLocalRoot,
    glob_expr("pathname", db_get("crnl-glob","")),
    glob_expr("pathname", db_get("binary-glob","")),
    glob_expr("pathname", db_get("unicode-glob",""))
  );
  while( db_step(&q)==SQLITE_ROW ){
    int id, rid;
    const char *zFullname;
    Blob content;
    int crnlOk, binOk, unicodeOk, chnged;








|







1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
  */
  db_prepare(&q,
    "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
    "WHERE chnged==1 AND NOT deleted AND is_selected(id)",
    g.zLocalRoot,
    glob_expr("pathname", db_get("crnl-glob","")),
    glob_expr("pathname", db_get("binary-glob","")),
    glob_expr("pathname", db_get("encoding-glob",""))
  );
  while( db_step(&q)==SQLITE_ROW ){
    int id, rid;
    const char *zFullname;
    Blob content;
    int crnlOk, binOk, unicodeOk, chnged;

Changes to src/configure.c.
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

  { "project-name",           CONFIGSET_PROJ },
  { "project-description",    CONFIGSET_PROJ },
  { "manifest",               CONFIGSET_PROJ },
  { "binary-glob",            CONFIGSET_PROJ },
  { "ignore-glob",            CONFIGSET_PROJ },
  { "crnl-glob",              CONFIGSET_PROJ },
  { "unicode-glob",           CONFIGSET_PROJ },
  { "empty-dirs",             CONFIGSET_PROJ },
  { "allow-symlinks",         CONFIGSET_PROJ },

  { "ticket-table",           CONFIGSET_TKT  },
  { "ticket-common",          CONFIGSET_TKT  },
  { "ticket-change",          CONFIGSET_TKT  },
  { "ticket-newpage",         CONFIGSET_TKT  },







|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

  { "project-name",           CONFIGSET_PROJ },
  { "project-description",    CONFIGSET_PROJ },
  { "manifest",               CONFIGSET_PROJ },
  { "binary-glob",            CONFIGSET_PROJ },
  { "ignore-glob",            CONFIGSET_PROJ },
  { "crnl-glob",              CONFIGSET_PROJ },
  { "encoding-glob",          CONFIGSET_PROJ },
  { "empty-dirs",             CONFIGSET_PROJ },
  { "allow-symlinks",         CONFIGSET_PROJ },

  { "ticket-table",           CONFIGSET_TKT  },
  { "ticket-common",          CONFIGSET_TKT  },
  { "ticket-change",          CONFIGSET_TKT  },
  { "ticket-newpage",         CONFIGSET_TKT  },
Changes to src/db.c.
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
  { "ssl-identity",  0,               40, 0, ""                    },
  { "ssh-command",   0,               40, 0, ""                    },
  { "th1-setup",     0,               40, 0, ""                    },
#ifdef FOSSIL_ENABLE_TCL
  { "tcl",           0,                0, 0, "off"                 },
  { "tcl-setup",     0,               40, 0, ""                    },
#endif
  { "unicode-glob",  0,               40, 1, ""                    },
  { "web-browser",   0,               32, 0, ""                    },
  { "white-foreground", 0,             0, 0, "off"                 },
  { 0,0,0,0,0 }
};

/*
** COMMAND: settings







|







2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
  { "ssl-identity",  0,               40, 0, ""                    },
  { "ssh-command",   0,               40, 0, ""                    },
  { "th1-setup",     0,               40, 0, ""                    },
#ifdef FOSSIL_ENABLE_TCL
  { "tcl",           0,                0, 0, "off"                 },
  { "tcl-setup",     0,               40, 0, ""                    },
#endif
  { "encoding-glob", 0,               40, 1, ""                    },
  { "web-browser",   0,               32, 0, ""                    },
  { "white-foreground", 0,             0, 0, "off"                 },
  { 0,0,0,0,0 }
};

/*
** COMMAND: settings
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285

2286
2287
2288
2289
2290
2291
2292
2293
**                     and initializing the Tcl interpreter.  By default, this
**                     is empty and no extra setup is performed.
**
**    th1-setup        This is the setup script to be evaluated after creating
**                     and initializing the TH1 interpreter.  By default, this
**                     is empty and no extra setup is performed.
**
**    unicode-glob     The VALUE is a comma or newline-separated list of GLOB
**     (versionable)   patterns specifying files that the "commit" command will
**                     ignore when issuing warnings about text files that may

**                     contain Unicode. Set to "*" to disable Unicode checking.
**
**    web-browser      A shell command used to launch your preferred
**                     web browser when given a URL as an argument.
**                     Defaults to "start" on windows, "open" on Mac,
**                     and "firefox" on Unix.
**
** Options:







|


>
|







2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
**                     and initializing the Tcl interpreter.  By default, this
**                     is empty and no extra setup is performed.
**
**    th1-setup        This is the setup script to be evaluated after creating
**                     and initializing the TH1 interpreter.  By default, this
**                     is empty and no extra setup is performed.
**
**    encoding-glob    The VALUE is a comma or newline-separated list of GLOB
**     (versionable)   patterns specifying files that the "commit" command will
**                     ignore when issuing warnings about text files that may
**                     use an encoding other than ASCII or UTF-8 . Set to "*"
**                     to disable encoding checking.
**
**    web-browser      A shell command used to launch your preferred
**                     web browser when given a URL as an argument.
**                     Defaults to "start" on windows, "open" on Mac,
**                     and "firefox" on Unix.
**
** Options: