Fossil SCM

Making fossil warn about a conflict, if an update operation overwrites an extra file. This should close ticket [953031915f].

viriketo 2011-10-14 20:25 UTC declined
Commit 60c6197c8a5fede3abdd03ae97a311da7db154a6
1 file changed +4
--- src/update.c
+++ src/update.c
@@ -360,10 +360,14 @@
360360
fossil_print("CONFLICT %s\n", zName);
361361
nConflict++;
362362
}else if( idt>0 && idv==0 ){
363363
/* File added in the target. */
364364
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
+ }
365369
undo_save(zName);
366370
if( !nochangeFlag ) vfile_to_disk(0, idt, 0, 0);
367371
}else if( idt>0 && idv>0 && ridt!=ridv && chnged==0 ){
368372
/* The file is unedited. Change it to the target version */
369373
undo_save(zName);
370374
--- 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

Keyboard Shortcuts

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