Fossil

Check-in [e124881a70]
Login

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

Overview
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.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e124881a7080b648e943a01991569325e137c2da
User & Date: drh 2009-07-07 14:53:58.000
References
2009-08-08
05:42 Tested ticket [d37b9eadb3]: Encoding problems after rebuild plus 3 other changes artifact: ab7b90e593 user: anonymous
2009-07-23
07:38 New ticket [045f23be75] commit gives error "2fossil: unknown command: <p><font". artifact: 74d712a66c user: anonymous
Context
2009-07-24
03:57
correct typo in error msg check-in: ce5eb40702 user: bch tags: trunk
2009-07-07
14:53
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. check-in: e124881a70 user: drh tags: trunk
2009-07-06
23:53
Update to the latest SQLite. On the "Ticket" page, if "nobody" is not allowed to create new tickets but "anonymous" is, then offer a hyperlink to log in as anonymous. Change the default settings to be more secure. check-in: 623a9129c8 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/update.c.
185
186
187
188
189
190
191




192
193
194
195
196
197
198
199
      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);
      undo_save(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);
        undo_save(zName);
        zFullPath = mprintf("%s/%s", g.zLocalRoot, zName);
        unlink(zFullPath);







>
>
>
>
|







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
      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);
      undo_save(zName);
      vfile_to_disk(0, idt, 0);
    }else if( idt==0 && idv>0 ){
      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);
        zFullPath = mprintf("%s/%s", g.zLocalRoot, zName);
        unlink(zFullPath);