Fossil SCM

missed a small part when merging

jan.nijtmans 2012-11-27 09:15 UTC convert_before_commit_v2
Commit 5d3a492d8a3fbd2a3467679b68c9f63232386f79
1 file changed +4 -1
+4 -1
--- src/checkin.c
+++ src/checkin.c
@@ -1091,10 +1091,11 @@
10911091
Blob cksum1, cksum2; /* Before and after commit checksums */
10921092
Blob cksum1b; /* Checksum recorded in the manifest */
10931093
int szD; /* Size of the delta manifest */
10941094
int szB; /* Size of the baseline manifest */
10951095
int nConflict = 0; /* Number of unresolved merge conflicts */
1096
+ int abortCommit = 0;
10961097
Blob ans;
10971098
char cReply;
10981099
10991100
url_proxy_options();
11001101
noSign = find_option("nosign",0,0)!=0;
@@ -1338,11 +1339,11 @@
13381339
}else{
13391340
blob_read_from_file(&content, zFullname);
13401341
}
13411342
/* Do not emit any warnings when they are disabled. */
13421343
if( !noWarningFlag ){
1343
- commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
1344
+ abortCommit |= commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
13441345
}
13451346
if( chnged==1 && contains_merge_marker(&content) ){
13461347
Blob fname; /* Relative pathname of the file */
13471348
13481349
nConflict++;
@@ -1361,10 +1362,12 @@
13611362
}
13621363
db_finalize(&q);
13631364
if( nConflict && !allowConflict ){
13641365
fossil_fatal("abort due to unresolved merge conflicts; "
13651366
"use --allow-conflict to override");
1367
+ } else if( abortCommit ){
1368
+ fossil_fatal("files are converted on your request. Please re-test before committing");
13661369
}
13671370
13681371
/* Create the new manifest */
13691372
if( blob_size(&comment)==0 ){
13701373
blob_append(&comment, "(no comment)", -1);
13711374
--- src/checkin.c
+++ src/checkin.c
@@ -1091,10 +1091,11 @@
1091 Blob cksum1, cksum2; /* Before and after commit checksums */
1092 Blob cksum1b; /* Checksum recorded in the manifest */
1093 int szD; /* Size of the delta manifest */
1094 int szB; /* Size of the baseline manifest */
1095 int nConflict = 0; /* Number of unresolved merge conflicts */
 
1096 Blob ans;
1097 char cReply;
1098
1099 url_proxy_options();
1100 noSign = find_option("nosign",0,0)!=0;
@@ -1338,11 +1339,11 @@
1338 }else{
1339 blob_read_from_file(&content, zFullname);
1340 }
1341 /* Do not emit any warnings when they are disabled. */
1342 if( !noWarningFlag ){
1343 commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
1344 }
1345 if( chnged==1 && contains_merge_marker(&content) ){
1346 Blob fname; /* Relative pathname of the file */
1347
1348 nConflict++;
@@ -1361,10 +1362,12 @@
1361 }
1362 db_finalize(&q);
1363 if( nConflict && !allowConflict ){
1364 fossil_fatal("abort due to unresolved merge conflicts; "
1365 "use --allow-conflict to override");
 
 
1366 }
1367
1368 /* Create the new manifest */
1369 if( blob_size(&comment)==0 ){
1370 blob_append(&comment, "(no comment)", -1);
1371
--- src/checkin.c
+++ src/checkin.c
@@ -1091,10 +1091,11 @@
1091 Blob cksum1, cksum2; /* Before and after commit checksums */
1092 Blob cksum1b; /* Checksum recorded in the manifest */
1093 int szD; /* Size of the delta manifest */
1094 int szB; /* Size of the baseline manifest */
1095 int nConflict = 0; /* Number of unresolved merge conflicts */
1096 int abortCommit = 0;
1097 Blob ans;
1098 char cReply;
1099
1100 url_proxy_options();
1101 noSign = find_option("nosign",0,0)!=0;
@@ -1338,11 +1339,11 @@
1339 }else{
1340 blob_read_from_file(&content, zFullname);
1341 }
1342 /* Do not emit any warnings when they are disabled. */
1343 if( !noWarningFlag ){
1344 abortCommit |= commit_warning(&content, crnlOk, binOk, unicodeOk, zFullname);
1345 }
1346 if( chnged==1 && contains_merge_marker(&content) ){
1347 Blob fname; /* Relative pathname of the file */
1348
1349 nConflict++;
@@ -1361,10 +1362,12 @@
1362 }
1363 db_finalize(&q);
1364 if( nConflict && !allowConflict ){
1365 fossil_fatal("abort due to unresolved merge conflicts; "
1366 "use --allow-conflict to override");
1367 } else if( abortCommit ){
1368 fossil_fatal("files are converted on your request. Please re-test before committing");
1369 }
1370
1371 /* Create the new manifest */
1372 if( blob_size(&comment)==0 ){
1373 blob_append(&comment, "(no comment)", -1);
1374

Keyboard Shortcuts

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