Fossil SCM

Rename "unicode-glob" to "encoding-glob".

jan.nijtmans 2013-01-21 11:38 improve_commit_warning
Commit e8ecd18db10b935d6092d8c71b457f6965f0ea14
3 files changed +4 -1 +1 -1 +4 -3
+4 -1
--- src/checkin.c
+++ src/checkin.c
@@ -914,13 +914,15 @@
914914
const char *zConvert;
915915
Blob ans;
916916
char cReply;
917917
918918
if(eType==-4){
919
+ if (binOk) goto go_on;
919920
zWarning = "long lines";
920921
zConvert = "";
921922
}else{
923
+ if (unicodeOk) goto go_on;
922924
zWarning = "invalid UTF-8";
923925
zConvert = "c=convert/";
924926
}
925927
blob_zero(&ans);
926928
file_relative_name(zFilename, &fname, 0);
@@ -943,10 +945,11 @@
943945
} else if( cReply!='y' && cReply!='Y' ){
944946
fossil_fatal("Abandoning commit due to %s in %s",
945947
zWarning, blob_str(&fname));
946948
}
947949
blob_reset(&ans);
950
+ go_on:
948951
eType +=4 ;
949952
}
950953
if( eType==0 || eType==-1 || fUnicode ){
951954
const char *zWarning;
952955
const char *zConvert = "c=convert/";
@@ -1352,11 +1355,11 @@
13521355
"SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
13531356
"WHERE chnged==1 AND NOT deleted AND is_selected(id)",
13541357
g.zLocalRoot,
13551358
glob_expr("pathname", db_get("crnl-glob","")),
13561359
glob_expr("pathname", db_get("binary-glob","")),
1357
- glob_expr("pathname", db_get("unicode-glob",""))
1360
+ glob_expr("pathname", db_get("encoding-glob",""))
13581361
);
13591362
while( db_step(&q)==SQLITE_ROW ){
13601363
int id, rid;
13611364
const char *zFullname;
13621365
Blob content;
13631366
--- src/checkin.c
+++ src/checkin.c
@@ -914,13 +914,15 @@
914 const char *zConvert;
915 Blob ans;
916 char cReply;
917
918 if(eType==-4){
 
919 zWarning = "long lines";
920 zConvert = "";
921 }else{
 
922 zWarning = "invalid UTF-8";
923 zConvert = "c=convert/";
924 }
925 blob_zero(&ans);
926 file_relative_name(zFilename, &fname, 0);
@@ -943,10 +945,11 @@
943 } else if( cReply!='y' && cReply!='Y' ){
944 fossil_fatal("Abandoning commit due to %s in %s",
945 zWarning, blob_str(&fname));
946 }
947 blob_reset(&ans);
 
948 eType +=4 ;
949 }
950 if( eType==0 || eType==-1 || fUnicode ){
951 const char *zWarning;
952 const char *zConvert = "c=convert/";
@@ -1352,11 +1355,11 @@
1352 "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
1353 "WHERE chnged==1 AND NOT deleted AND is_selected(id)",
1354 g.zLocalRoot,
1355 glob_expr("pathname", db_get("crnl-glob","")),
1356 glob_expr("pathname", db_get("binary-glob","")),
1357 glob_expr("pathname", db_get("unicode-glob",""))
1358 );
1359 while( db_step(&q)==SQLITE_ROW ){
1360 int id, rid;
1361 const char *zFullname;
1362 Blob content;
1363
--- src/checkin.c
+++ src/checkin.c
@@ -914,13 +914,15 @@
914 const char *zConvert;
915 Blob ans;
916 char cReply;
917
918 if(eType==-4){
919 if (binOk) goto go_on;
920 zWarning = "long lines";
921 zConvert = "";
922 }else{
923 if (unicodeOk) goto go_on;
924 zWarning = "invalid UTF-8";
925 zConvert = "c=convert/";
926 }
927 blob_zero(&ans);
928 file_relative_name(zFilename, &fname, 0);
@@ -943,10 +945,11 @@
945 } else if( cReply!='y' && cReply!='Y' ){
946 fossil_fatal("Abandoning commit due to %s in %s",
947 zWarning, blob_str(&fname));
948 }
949 blob_reset(&ans);
950 go_on:
951 eType +=4 ;
952 }
953 if( eType==0 || eType==-1 || fUnicode ){
954 const char *zWarning;
955 const char *zConvert = "c=convert/";
@@ -1352,11 +1355,11 @@
1355 "SELECT id, %Q || pathname, mrid, %s, chnged, %s, %s FROM vfile "
1356 "WHERE chnged==1 AND NOT deleted AND is_selected(id)",
1357 g.zLocalRoot,
1358 glob_expr("pathname", db_get("crnl-glob","")),
1359 glob_expr("pathname", db_get("binary-glob","")),
1360 glob_expr("pathname", db_get("encoding-glob",""))
1361 );
1362 while( db_step(&q)==SQLITE_ROW ){
1363 int id, rid;
1364 const char *zFullname;
1365 Blob content;
1366
+1 -1
--- src/configure.c
+++ src/configure.c
@@ -103,11 +103,11 @@
103103
{ "project-description", CONFIGSET_PROJ },
104104
{ "manifest", CONFIGSET_PROJ },
105105
{ "binary-glob", CONFIGSET_PROJ },
106106
{ "ignore-glob", CONFIGSET_PROJ },
107107
{ "crnl-glob", CONFIGSET_PROJ },
108
- { "unicode-glob", CONFIGSET_PROJ },
108
+ { "encoding-glob", CONFIGSET_PROJ },
109109
{ "empty-dirs", CONFIGSET_PROJ },
110110
{ "allow-symlinks", CONFIGSET_PROJ },
111111
112112
{ "ticket-table", CONFIGSET_TKT },
113113
{ "ticket-common", CONFIGSET_TKT },
114114
--- src/configure.c
+++ src/configure.c
@@ -103,11 +103,11 @@
103 { "project-description", CONFIGSET_PROJ },
104 { "manifest", CONFIGSET_PROJ },
105 { "binary-glob", CONFIGSET_PROJ },
106 { "ignore-glob", CONFIGSET_PROJ },
107 { "crnl-glob", CONFIGSET_PROJ },
108 { "unicode-glob", CONFIGSET_PROJ },
109 { "empty-dirs", CONFIGSET_PROJ },
110 { "allow-symlinks", CONFIGSET_PROJ },
111
112 { "ticket-table", CONFIGSET_TKT },
113 { "ticket-common", CONFIGSET_TKT },
114
--- src/configure.c
+++ src/configure.c
@@ -103,11 +103,11 @@
103 { "project-description", CONFIGSET_PROJ },
104 { "manifest", CONFIGSET_PROJ },
105 { "binary-glob", CONFIGSET_PROJ },
106 { "ignore-glob", CONFIGSET_PROJ },
107 { "crnl-glob", CONFIGSET_PROJ },
108 { "encoding-glob", CONFIGSET_PROJ },
109 { "empty-dirs", CONFIGSET_PROJ },
110 { "allow-symlinks", CONFIGSET_PROJ },
111
112 { "ticket-table", CONFIGSET_TKT },
113 { "ticket-common", CONFIGSET_TKT },
114
+4 -3
--- src/db.c
+++ src/db.c
@@ -2091,11 +2091,11 @@
20912091
{ "th1-setup", 0, 40, 0, "" },
20922092
#ifdef FOSSIL_ENABLE_TCL
20932093
{ "tcl", 0, 0, 0, "off" },
20942094
{ "tcl-setup", 0, 40, 0, "" },
20952095
#endif
2096
- { "unicode-glob", 0, 40, 1, "" },
2096
+ { "encoding-glob", 0, 40, 1, "" },
20972097
{ "web-browser", 0, 32, 0, "" },
20982098
{ "white-foreground", 0, 0, 0, "off" },
20992099
{ 0,0,0,0,0 }
21002100
};
21012101
@@ -2278,14 +2278,15 @@
22782278
**
22792279
** th1-setup This is the setup script to be evaluated after creating
22802280
** and initializing the TH1 interpreter. By default, this
22812281
** is empty and no extra setup is performed.
22822282
**
2283
-** unicode-glob The VALUE is a comma or newline-separated list of GLOB
2283
+** encoding-glob The VALUE is a comma or newline-separated list of GLOB
22842284
** (versionable) patterns specifying files that the "commit" command will
22852285
** ignore when issuing warnings about text files that may
2286
-** contain Unicode. Set to "*" to disable Unicode checking.
2286
+** use an encoding other than ASCII or UTF-8 . Set to "*"
2287
+** to disable encoding checking.
22872288
**
22882289
** web-browser A shell command used to launch your preferred
22892290
** web browser when given a URL as an argument.
22902291
** Defaults to "start" on windows, "open" on Mac,
22912292
** and "firefox" on Unix.
22922293
--- src/db.c
+++ src/db.c
@@ -2091,11 +2091,11 @@
2091 { "th1-setup", 0, 40, 0, "" },
2092 #ifdef FOSSIL_ENABLE_TCL
2093 { "tcl", 0, 0, 0, "off" },
2094 { "tcl-setup", 0, 40, 0, "" },
2095 #endif
2096 { "unicode-glob", 0, 40, 1, "" },
2097 { "web-browser", 0, 32, 0, "" },
2098 { "white-foreground", 0, 0, 0, "off" },
2099 { 0,0,0,0,0 }
2100 };
2101
@@ -2278,14 +2278,15 @@
2278 **
2279 ** th1-setup This is the setup script to be evaluated after creating
2280 ** and initializing the TH1 interpreter. By default, this
2281 ** is empty and no extra setup is performed.
2282 **
2283 ** unicode-glob The VALUE is a comma or newline-separated list of GLOB
2284 ** (versionable) patterns specifying files that the "commit" command will
2285 ** ignore when issuing warnings about text files that may
2286 ** contain Unicode. Set to "*" to disable Unicode checking.
 
2287 **
2288 ** web-browser A shell command used to launch your preferred
2289 ** web browser when given a URL as an argument.
2290 ** Defaults to "start" on windows, "open" on Mac,
2291 ** and "firefox" on Unix.
2292
--- src/db.c
+++ src/db.c
@@ -2091,11 +2091,11 @@
2091 { "th1-setup", 0, 40, 0, "" },
2092 #ifdef FOSSIL_ENABLE_TCL
2093 { "tcl", 0, 0, 0, "off" },
2094 { "tcl-setup", 0, 40, 0, "" },
2095 #endif
2096 { "encoding-glob", 0, 40, 1, "" },
2097 { "web-browser", 0, 32, 0, "" },
2098 { "white-foreground", 0, 0, 0, "off" },
2099 { 0,0,0,0,0 }
2100 };
2101
@@ -2278,14 +2278,15 @@
2278 **
2279 ** th1-setup This is the setup script to be evaluated after creating
2280 ** and initializing the TH1 interpreter. By default, this
2281 ** is empty and no extra setup is performed.
2282 **
2283 ** encoding-glob The VALUE is a comma or newline-separated list of GLOB
2284 ** (versionable) patterns specifying files that the "commit" command will
2285 ** ignore when issuing warnings about text files that may
2286 ** use an encoding other than ASCII or UTF-8 . Set to "*"
2287 ** to disable encoding checking.
2288 **
2289 ** web-browser A shell command used to launch your preferred
2290 ** web browser when given a URL as an argument.
2291 ** Defaults to "start" on windows, "open" on Mac,
2292 ** and "firefox" on Unix.
2293

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button