Differences From:
File
src/update.c
part of check-in
[a040ae6e17]
- Write the new manifest file to the root of the check-out tree when
doing an update.
by
drh on
2007-08-08 15:18:53.
[view]
To:
File
src/update.c
part of check-in
[fe6ee8a431]
- Do not remove files that have been edited when doing an "update". Instead,
mark the files as CONFLICT.
by
drh on
2007-08-08 15:30:04.
[view]
@@ -145,13 +145,17 @@
/* 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;