Fossil SCM

If a file has been "fossil rm"-ed in the local checkout - which has not been committed, then a "fossil update" is done to another version that has no changes on that file, then silently keep that file unmanaged.

drh 2013-08-26 18:23 trunk
Commit 2918effe0d0aaae5875d61737c943eadf007d41e
1 file changed +2 -3
+2 -3
--- src/update.c
+++ src/update.c
@@ -405,15 +405,14 @@
405405
fossil_print("UPDATE %s - change to unmanaged file\n", zName);
406406
}else{
407407
fossil_print("UPDATE %s\n", zName);
408408
}
409409
if( !dryRunFlag ) vfile_to_disk(0, idt, 0, 0);
410
- }else if( idt>0 && idv>0 && file_wd_size(zFullPath)<0 ){
410
+ }else if( idt>0 && idv>0 && !deleted && file_wd_size(zFullPath)<0 ){
411411
/* The file missing from the local check-out. Restore it to the
412412
** version that appears in the target. */
413
- fossil_print("UPDATE %s%s\n", zName,
414
- deleted?" - change to unmanaged file":"");
413
+ fossil_print("UPDATE %s\n", zName);
415414
undo_save(zName);
416415
if( !dryRunFlag ) vfile_to_disk(0, idt, 0, 0);
417416
}else if( idt==0 && idv>0 ){
418417
if( ridv==0 ){
419418
/* Added in current checkout. Continue to hold the file as
420419
--- src/update.c
+++ src/update.c
@@ -405,15 +405,14 @@
405 fossil_print("UPDATE %s - change to unmanaged file\n", zName);
406 }else{
407 fossil_print("UPDATE %s\n", zName);
408 }
409 if( !dryRunFlag ) vfile_to_disk(0, idt, 0, 0);
410 }else if( idt>0 && idv>0 && file_wd_size(zFullPath)<0 ){
411 /* The file missing from the local check-out. Restore it to the
412 ** version that appears in the target. */
413 fossil_print("UPDATE %s%s\n", zName,
414 deleted?" - change to unmanaged file":"");
415 undo_save(zName);
416 if( !dryRunFlag ) vfile_to_disk(0, idt, 0, 0);
417 }else if( idt==0 && idv>0 ){
418 if( ridv==0 ){
419 /* Added in current checkout. Continue to hold the file as
420
--- src/update.c
+++ src/update.c
@@ -405,15 +405,14 @@
405 fossil_print("UPDATE %s - change to unmanaged file\n", zName);
406 }else{
407 fossil_print("UPDATE %s\n", zName);
408 }
409 if( !dryRunFlag ) vfile_to_disk(0, idt, 0, 0);
410 }else if( idt>0 && idv>0 && !deleted && file_wd_size(zFullPath)<0 ){
411 /* The file missing from the local check-out. Restore it to the
412 ** version that appears in the target. */
413 fossil_print("UPDATE %s\n", zName);
 
414 undo_save(zName);
415 if( !dryRunFlag ) vfile_to_disk(0, idt, 0, 0);
416 }else if( idt==0 && idv>0 ){
417 if( ridv==0 ){
418 /* Added in current checkout. Continue to hold the file as
419

Keyboard Shortcuts

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