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.

drh 2009-07-07 14:53 trunk
Commit e124881a7080b648e943a01991569325e137c2da
1 file changed +5 -1
+5 -1
--- src/update.c
+++ src/update.c
@@ -187,11 +187,15 @@
187187
/* The file is unedited. Change it to the target version */
188188
printf("UPDATE %s\n", zName);
189189
undo_save(zName);
190190
vfile_to_disk(0, idt, 0);
191191
}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 ){
193197
printf("CONFLICT %s\n", zName);
194198
}else{
195199
char *zFullPath;
196200
printf("REMOVE %s\n", zName);
197201
undo_save(zName);
198202
--- 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

Keyboard Shortcuts

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