Fossil

Check-in [0df5249d]
Login

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

Overview
Comment:When a file has been deleted on the current branch and edited on a separate branch, bring in the edited version of the file when merging from the separate branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0df5249d51b9c49ae323602a04c11590dff5dea4
User & Date: drh 2016-12-24 00:30:41
References
2016-12-28
18:20
Update test case now that merge rename bug has been fixed with checkin [0df5249d51]. check-in: b09be7ba user: andybradford tags: trunk
Context
2016-12-24
18:07
Improve the "fossil sql" command so that it opens all database - repository, localdb, and configdb. Use the latest command-line shell code from the SQLite project so that the ".tables" command correctly shows all tables. check-in: 07081558 user: drh tags: trunk
00:30
When a file has been deleted on the current branch and edited on a separate branch, bring in the edited version of the file when merging from the separate branch. check-in: 0df5249d user: drh tags: trunk
2016-12-23
23:42
When doing a gdiff between two versions, use the files being diffed as a basis for the temporary filenames that are constructed. check-in: 051d0aba user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/merge.c.

781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
    " WHERE idp=0 AND idv=0 AND idm>0"
  );
  while( db_step(&q)==SQLITE_ROW ){
    int idm = db_column_int(&q, 0);
    const char *zName;
    char *zFullName;
    db_multi_exec(
      "INSERT INTO vfile(vid,chnged,deleted,rid,mrid,isexe,islink,pathname)"
      "  SELECT %d,%d,0,rid,mrid,isexe,islink,pathname FROM vfile WHERE id=%d",
      vid, integrateFlag?5:3, idm
    );
    zName = db_column_text(&q, 1);
    zFullName = mprintf("%s%s", g.zLocalRoot, zName);
    if( file_wd_isfile_or_link(zFullName)
        && !db_exists("SELECT 1 FROM fv WHERE fn=%Q", zName) ){







|







781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
    " WHERE idp=0 AND idv=0 AND idm>0"
  );
  while( db_step(&q)==SQLITE_ROW ){
    int idm = db_column_int(&q, 0);
    const char *zName;
    char *zFullName;
    db_multi_exec(
      "REPLACE INTO vfile(vid,chnged,deleted,rid,mrid,isexe,islink,pathname)"
      "  SELECT %d,%d,0,rid,mrid,isexe,islink,pathname FROM vfile WHERE id=%d",
      vid, integrateFlag?5:3, idm
    );
    zName = db_column_text(&q, 1);
    zFullName = mprintf("%s%s", g.zLocalRoot, zName);
    if( file_wd_isfile_or_link(zFullName)
        && !db_exists("SELECT 1 FROM fv WHERE fn=%Q", zName) ){