Fossil

Check-in [7ec43ccb]
Login

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

Overview
Comment:Take into account local (uncommitted) changes when doing a merge.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7ec43ccb7a1f3481429d6799ff030a7a7e28458d
User & Date: drh 2010-12-13 13:21:00
Context
2010-12-13
14:31
Add the (unsupported) test-shortest-path command for finding the shortest path between two checkins in the DAG. check-in: c49ee72b user: drh tags: trunk
13:21
Take into account local (uncommitted) changes when doing a merge. check-in: 7ec43ccb user: drh tags: trunk
00:00
A few more merge test cases added. check-in: 3f490bcb user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/merge.c.

142
143
144
145
146
147
148
149


150
151
152
153
154
155
156
157
  db_multi_exec(
    "UPDATE fv SET"
    " idp=coalesce((SELECT id FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " ridp=coalesce((SELECT rid FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " idm=coalesce((SELECT id FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " ridm=coalesce((SELECT rid FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " idv=coalesce((SELECT id FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " ridv=coalesce((SELECT rid FROM vfile WHERE vid=%d AND pathname=fn),0)",


    pid, pid, mid, mid, vid, vid
  );

  /*
  ** Find files in mid and vid but not in pid and report conflicts.
  ** The file in mid will be ignored.  It will be treated as if it
  ** does not exist.
  */







|
>
>
|







142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
  db_multi_exec(
    "UPDATE fv SET"
    " idp=coalesce((SELECT id FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " ridp=coalesce((SELECT rid FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " idm=coalesce((SELECT id FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " ridm=coalesce((SELECT rid FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " idv=coalesce((SELECT id FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " ridv=coalesce((SELECT rid FROM vfile WHERE vid=%d AND pathname=fn),0),"
    " chnged=coalesce((SELECT chnged FROM vfile"
                      " WHERE vid=%d AND pathname=fn),0)",
    pid, pid, mid, mid, vid, vid, vid
  );

  /*
  ** Find files in mid and vid but not in pid and report conflicts.
  ** The file in mid will be ignored.  It will be treated as if it
  ** does not exist.
  */