Fossil SCM
Making fossil warn about a conflict, if an update operation overwrites an extra file. This should close ticket [953031915f].
Commit
60c6197c8a5fede3abdd03ae97a311da7db154a6
Parent
129605856afc71e…
1 file changed
+4
+4
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -360,10 +360,14 @@ | ||
| 360 | 360 | fossil_print("CONFLICT %s\n", zName); |
| 361 | 361 | nConflict++; |
| 362 | 362 | }else if( idt>0 && idv==0 ){ |
| 363 | 363 | /* File added in the target. */ |
| 364 | 364 | fossil_print("ADD %s\n", zName); |
| 365 | + if ( file_wd_isfile_or_link(zName) ) { | |
| 366 | + fossil_print("***** The extra file %s has been overwritten\n", zName); | |
| 367 | + nConflict++; | |
| 368 | + } | |
| 365 | 369 | undo_save(zName); |
| 366 | 370 | if( !nochangeFlag ) vfile_to_disk(0, idt, 0, 0); |
| 367 | 371 | }else if( idt>0 && idv>0 && ridt!=ridv && chnged==0 ){ |
| 368 | 372 | /* The file is unedited. Change it to the target version */ |
| 369 | 373 | undo_save(zName); |
| 370 | 374 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -360,10 +360,14 @@ | |
| 360 | fossil_print("CONFLICT %s\n", zName); |
| 361 | nConflict++; |
| 362 | }else if( idt>0 && idv==0 ){ |
| 363 | /* File added in the target. */ |
| 364 | fossil_print("ADD %s\n", zName); |
| 365 | undo_save(zName); |
| 366 | if( !nochangeFlag ) vfile_to_disk(0, idt, 0, 0); |
| 367 | }else if( idt>0 && idv>0 && ridt!=ridv && chnged==0 ){ |
| 368 | /* The file is unedited. Change it to the target version */ |
| 369 | undo_save(zName); |
| 370 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -360,10 +360,14 @@ | |
| 360 | fossil_print("CONFLICT %s\n", zName); |
| 361 | nConflict++; |
| 362 | }else if( idt>0 && idv==0 ){ |
| 363 | /* File added in the target. */ |
| 364 | fossil_print("ADD %s\n", zName); |
| 365 | if ( file_wd_isfile_or_link(zName) ) { |
| 366 | fossil_print("***** The extra file %s has been overwritten\n", zName); |
| 367 | nConflict++; |
| 368 | } |
| 369 | undo_save(zName); |
| 370 | if( !nochangeFlag ) vfile_to_disk(0, idt, 0, 0); |
| 371 | }else if( idt>0 && idv>0 && ridt!=ridv && chnged==0 ){ |
| 372 | /* The file is unedited. Change it to the target version */ |
| 373 | undo_save(zName); |
| 374 |