Fossil

Check-in [fe6ee8a431]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not remove files that have been edited when doing an "update". Instead, mark the files as CONFLICT.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fe6ee8a431b69e5695801bd703fb6a38ce30dc40
User & Date: drh 2007-08-08 15:30:04.000
Context
2007-08-09
01:08
Website updates. check-in: b110d77c36 user: drh tags: trunk
2007-08-08
15:30
Do not remove files that have been edited when doing an "update". Instead, mark the files as CONFLICT. check-in: fe6ee8a431 user: drh tags: trunk
15:22
Make sure a user does not attempt to "fossil add" the manifest or the _FOSSIL_ files. check-in: 20bcbcf2f2 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/update.c.
142
143
144
145
146
147
148



149
150
151
152
153

154
155
156
157
158
159
160
      printf("ADD %s\n", zName);
      vfile_to_disk(0, idt, 0);
    }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);

    }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);
      zFullPath = mprintf("%s/%s", g.zLocalRoot, zName);
      content_get(ridt, &t);







>
>
>
|
|
|
|
|
>







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
      printf("ADD %s\n", zName);
      vfile_to_disk(0, idt, 0);
    }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 ){
      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);
      zFullPath = mprintf("%s/%s", g.zLocalRoot, zName);
      content_get(ridt, &t);