Fossil SCM

During commit, instead of using the '--force' option to bypass file type warnings, add a new option '--no-warnings'.

mistachkin 2012-11-25 22:31 UTC bellon-unicode
Commit e9954e588bccc79836192ce559f448c119c59e95
1 file changed +4 -2
+4 -2
--- src/checkin.c
+++ src/checkin.c
@@ -1023,10 +1023,11 @@
10231023
const char *zComment; /* Check-in comment */
10241024
Stmt q; /* Query to find files that have been modified */
10251025
char *zUuid; /* UUID of the new check-in */
10261026
int noSign = 0; /* True to omit signing the manifest using GPG */
10271027
int isAMerge = 0; /* True if checking in a merge */
1028
+ int noWarningFlag = 0; /* True if skipping all warnings */
10281029
int forceFlag = 0; /* Force a fork */
10291030
int forceDelta = 0; /* Force a delta-manifest */
10301031
int forceBaseline = 0; /* Force a baseline-manifest */
10311032
int allowConflict = 0; /* Allow unresolve merge conflicts */
10321033
int binaryOk = 0; /* The --binary-ok flag */
@@ -1061,10 +1062,11 @@
10611062
fossil_fatal("cannot use --delta and --baseline together");
10621063
}
10631064
testRun = find_option("test",0,0)!=0;
10641065
zComment = find_option("comment","m",1);
10651066
forceFlag = find_option("force", "f", 0)!=0;
1067
+ noWarningFlag = find_option("no-warnings", 0, 0)!=0;
10661068
zBranch = find_option("branch","b",1);
10671069
zColor = find_option("bgcolor",0,1);
10681070
zBrClr = find_option("branchcolor",0,1);
10691071
binaryOk = find_option("binary-ok",0,0)!=0;
10701072
while( (zTag = find_option("tag",0,1))!=0 ){
@@ -1286,12 +1288,12 @@
12861288
/* Instead of file content, put link destination path */
12871289
blob_read_link(&content, zFullname);
12881290
}else{
12891291
blob_read_from_file(&content, zFullname);
12901292
}
1291
- if( !forceFlag ){
1292
- /* Do not emit any warnings in force mode. */
1293
+ /* Do not emit any warnings when they are disabled. */
1294
+ if( !noWarningFlag ){
12931295
commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
12941296
}
12951297
if( chnged==1 && contains_merge_marker(&content) ){
12961298
Blob fname; /* Relative pathname of the file */
12971299
12981300
--- src/checkin.c
+++ src/checkin.c
@@ -1023,10 +1023,11 @@
1023 const char *zComment; /* Check-in comment */
1024 Stmt q; /* Query to find files that have been modified */
1025 char *zUuid; /* UUID of the new check-in */
1026 int noSign = 0; /* True to omit signing the manifest using GPG */
1027 int isAMerge = 0; /* True if checking in a merge */
 
1028 int forceFlag = 0; /* Force a fork */
1029 int forceDelta = 0; /* Force a delta-manifest */
1030 int forceBaseline = 0; /* Force a baseline-manifest */
1031 int allowConflict = 0; /* Allow unresolve merge conflicts */
1032 int binaryOk = 0; /* The --binary-ok flag */
@@ -1061,10 +1062,11 @@
1061 fossil_fatal("cannot use --delta and --baseline together");
1062 }
1063 testRun = find_option("test",0,0)!=0;
1064 zComment = find_option("comment","m",1);
1065 forceFlag = find_option("force", "f", 0)!=0;
 
1066 zBranch = find_option("branch","b",1);
1067 zColor = find_option("bgcolor",0,1);
1068 zBrClr = find_option("branchcolor",0,1);
1069 binaryOk = find_option("binary-ok",0,0)!=0;
1070 while( (zTag = find_option("tag",0,1))!=0 ){
@@ -1286,12 +1288,12 @@
1286 /* Instead of file content, put link destination path */
1287 blob_read_link(&content, zFullname);
1288 }else{
1289 blob_read_from_file(&content, zFullname);
1290 }
1291 if( !forceFlag ){
1292 /* Do not emit any warnings in force mode. */
1293 commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
1294 }
1295 if( chnged==1 && contains_merge_marker(&content) ){
1296 Blob fname; /* Relative pathname of the file */
1297
1298
--- src/checkin.c
+++ src/checkin.c
@@ -1023,10 +1023,11 @@
1023 const char *zComment; /* Check-in comment */
1024 Stmt q; /* Query to find files that have been modified */
1025 char *zUuid; /* UUID of the new check-in */
1026 int noSign = 0; /* True to omit signing the manifest using GPG */
1027 int isAMerge = 0; /* True if checking in a merge */
1028 int noWarningFlag = 0; /* True if skipping all warnings */
1029 int forceFlag = 0; /* Force a fork */
1030 int forceDelta = 0; /* Force a delta-manifest */
1031 int forceBaseline = 0; /* Force a baseline-manifest */
1032 int allowConflict = 0; /* Allow unresolve merge conflicts */
1033 int binaryOk = 0; /* The --binary-ok flag */
@@ -1061,10 +1062,11 @@
1062 fossil_fatal("cannot use --delta and --baseline together");
1063 }
1064 testRun = find_option("test",0,0)!=0;
1065 zComment = find_option("comment","m",1);
1066 forceFlag = find_option("force", "f", 0)!=0;
1067 noWarningFlag = find_option("no-warnings", 0, 0)!=0;
1068 zBranch = find_option("branch","b",1);
1069 zColor = find_option("bgcolor",0,1);
1070 zBrClr = find_option("branchcolor",0,1);
1071 binaryOk = find_option("binary-ok",0,0)!=0;
1072 while( (zTag = find_option("tag",0,1))!=0 ){
@@ -1286,12 +1288,12 @@
1288 /* Instead of file content, put link destination path */
1289 blob_read_link(&content, zFullname);
1290 }else{
1291 blob_read_from_file(&content, zFullname);
1292 }
1293 /* Do not emit any warnings when they are disabled. */
1294 if( !noWarningFlag ){
1295 commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
1296 }
1297 if( chnged==1 && contains_merge_marker(&content) ){
1298 Blob fname; /* Relative pathname of the file */
1299
1300

Keyboard Shortcuts

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