Fossil SCM
Fix the "update" command so that is does not report conflicts on files that have been added to the current check-out but not yet committed. The added files are simply carried forward into the updated version.
Commit
e124881a7080b648e943a01991569325e137c2da
Parent
623a9129c8fdaa6…
1 file changed
+5
-1
+5
-1
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -187,11 +187,15 @@ | ||
| 187 | 187 | /* The file is unedited. Change it to the target version */ |
| 188 | 188 | printf("UPDATE %s\n", zName); |
| 189 | 189 | undo_save(zName); |
| 190 | 190 | vfile_to_disk(0, idt, 0); |
| 191 | 191 | }else if( idt==0 && idv>0 ){ |
| 192 | - if( chnged ){ | |
| 192 | + if( ridv==0 ){ | |
| 193 | + /* Added in current checkout. Continue to hold the file as | |
| 194 | + ** as an addition */ | |
| 195 | + db_multi_exec("UPDATE vfile SET vid=%d WHERE id=%d", tid, idv); | |
| 196 | + }else if( chnged ){ | |
| 193 | 197 | printf("CONFLICT %s\n", zName); |
| 194 | 198 | }else{ |
| 195 | 199 | char *zFullPath; |
| 196 | 200 | printf("REMOVE %s\n", zName); |
| 197 | 201 | undo_save(zName); |
| 198 | 202 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -187,11 +187,15 @@ | |
| 187 | /* The file is unedited. Change it to the target version */ |
| 188 | printf("UPDATE %s\n", zName); |
| 189 | undo_save(zName); |
| 190 | vfile_to_disk(0, idt, 0); |
| 191 | }else if( idt==0 && idv>0 ){ |
| 192 | if( chnged ){ |
| 193 | printf("CONFLICT %s\n", zName); |
| 194 | }else{ |
| 195 | char *zFullPath; |
| 196 | printf("REMOVE %s\n", zName); |
| 197 | undo_save(zName); |
| 198 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -187,11 +187,15 @@ | |
| 187 | /* The file is unedited. Change it to the target version */ |
| 188 | printf("UPDATE %s\n", zName); |
| 189 | undo_save(zName); |
| 190 | vfile_to_disk(0, idt, 0); |
| 191 | }else if( idt==0 && idv>0 ){ |
| 192 | if( ridv==0 ){ |
| 193 | /* Added in current checkout. Continue to hold the file as |
| 194 | ** as an addition */ |
| 195 | db_multi_exec("UPDATE vfile SET vid=%d WHERE id=%d", tid, idv); |
| 196 | }else if( chnged ){ |
| 197 | printf("CONFLICT %s\n", zName); |
| 198 | }else{ |
| 199 | char *zFullPath; |
| 200 | printf("REMOVE %s\n", zName); |
| 201 | undo_save(zName); |
| 202 |