Fossil

Check-in [324763b9]
Login

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

Overview
Comment:Fix undo when having a regular file on disk and symlink in undo.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | symlinks
Files: files | file ages | folders
SHA1:324763b932014891d345c31bf14d206f0e7e3d16
User & Date: dmitry 2011-09-01 22:52:20
Context
2011-09-01
22:55
Fix merge when merging UPDATEs a symlink to a regular file and vice versa. check-in: 82a95b46 user: dmitry tags: symlinks
22:52
Fix undo when having a regular file on disk and symlink in undo. check-in: 324763b9 user: dmitry tags: symlinks
22:15
Fix saving undo for symlinks. check-in: 0762b1d9 user: dmitry tags: symlinks
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/undo.c.

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
    if( old_exists ){
      if( new_exists ){
        fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname);
      }else{
        fossil_print("NEW %s\n", zPathname);
      }
      if( new_exists && (new_link || old_link) ){
        unlink(zFullname);
      }
      if( new_link ){
        create_symlink(blob_str(&new), zFullname);
      }else{
        blob_write_to_file(&new, zFullname);
      }
      file_setexe(zFullname, old_exe);
    }else{
      fossil_print("DELETE %s\n", zPathname);







|

|







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
    if( old_exists ){
      if( new_exists ){
        fossil_print("%s %s\n", redoFlag ? "REDO" : "UNDO", zPathname);
      }else{
        fossil_print("NEW %s\n", zPathname);
      }
      if( new_exists && (new_link || old_link) ){
        file_delete(zFullname);
      }
      if( old_link ){
        create_symlink(blob_str(&new), zFullname);
      }else{
        blob_write_to_file(&new, zFullname);
      }
      file_setexe(zFullname, old_exe);
    }else{
      fossil_print("DELETE %s\n", zPathname);