Check-in [fe6ee8a431]
Not logged in
Overview

SHA1 Hash:fe6ee8a431b69e5695801bd703fb6a38ce30dc40
Date: 2007-08-08 15:30:04
User: drh
Comment:Do not remove files that have been edited when doing an "update". Instead, mark the files as CONFLICT.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/update.c from [167b4a11d3] to [e7db94fb72].

@@ -144,15 +144,19 @@
     }else if( idt>0 && idv>0 && ridt!=ridv && chnged==0 ){
       /* The file is unedited.  Change it to the target version */
       printf("UPDATE %s\n", zName);
       vfile_to_disk(0, idt, 0);
     }else if( idt==0 && idv>0 ){
-      char *zFullPath;
-      printf("REMOVE %s\n", zName);
-      zFullPath = mprintf("%s/%s", g.zLocalRoot, zName);
-      unlink(zFullPath);
-      free(zFullPath);
+      if( chnged ){
+        printf("CONFLICT %s\n", zName);
+      }else{
+        char *zFullPath;
+        printf("REMOVE %s\n", zName);
+        zFullPath = mprintf("%s/%s", g.zLocalRoot, zName);
+        unlink(zFullPath);
+        free(zFullPath);
+      }
     }else if( idt>0 && idv>0 && ridt!=ridv && chnged ){
       /* Merge the changes in the current tree into the target version */
       Blob e, r, t, v;
       char *zFullPath;
       printf("MERGE %s\n", zName);