Differences From Artifact [615528bf6d]:
- File src/undo.c — part of check-in [8a6aa0a13f] at 2010-12-18 20:39:23 on branch experimental — Many bug fixes while testing stash: Fix "revert" so that it updates the file status correctly. Fix several cases of "//" being used as a file separator instead of just "/". Fix undo on stash apply. Make "stash drop" undoable. Update documentation for undo and stash. (user: drh size: 11704) [more...]
To Artifact [2dc924727f]:
- File src/undo.c — part of check-in [a1814d5015] at 2011-02-12 13:38:05 on branch file-safety — This branch contains experimental changes attempting to address complaints that Fossil sometimes overwrites unmanaged files. In this checkin: Use file_delete() instead of unlink() everywhere. Add interfaces file_move() and file_dont_overwrite() but do not use those interfaces yet. (user: drh size: 11709)
| ︙ | ︙ | |||
57 58 59 60 61 62 63 |
printf("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname);
}else{
printf("NEW %s\n", zPathname);
}
blob_write_to_file(&new, zFullname);
}else{
printf("DELETE %s\n", zPathname);
| | | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
printf("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname);
}else{
printf("NEW %s\n", zPathname);
}
blob_write_to_file(&new, zFullname);
}else{
printf("DELETE %s\n", zPathname);
file_delete(zFullname);
}
blob_reset(&new);
free(zFullname);
db_finalize(&q);
db_prepare(&q,
"UPDATE undo SET content=:c, existsflag=%d, redoflag=NOT redoflag"
" WHERE pathname=%Q",
|
| ︙ | ︙ |