Check-in [e124881a70]
Not logged in
Overview

SHA1 Hash:e124881a7080b648e943a01991569325e137c2da
Date: 2009-07-07 14:53:58
User: drh
Comment: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.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/update.c from [e7d09d9291] to [053193c6c1].

@@ -187,11 +187,15 @@
       /* The file is unedited.  Change it to the target version */
       printf("UPDATE %s\n", zName);
       undo_save(zName);
       vfile_to_disk(0, idt, 0);
     }else if( idt==0 && idv>0 ){
-      if( chnged ){
+      if( ridv==0 ){
+        /* Added in current checkout.  Continue to hold the file as
+        ** as an addition */
+        db_multi_exec("UPDATE vfile SET vid=%d WHERE id=%d", tid, idv);
+      }else if( chnged ){
         printf("CONFLICT %s\n", zName);
       }else{
         char *zFullPath;
         printf("REMOVE %s\n", zName);
         undo_save(zName);