Fossil

Check-in [ec25471c]
Login

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

Overview
Comment:Call pivot_set_*() before each pivot_find() call.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | merge-renames
Files: files | file ages | folders
SHA1: ec25471c506e37a9ae60dc69ed0e62806633cd0a
User & Date: joel 2016-05-09 23:48:37
Context
2016-05-11
02:29
Ensure that N is also a first-parent ancestor of P for cases where P is not on the same branch as either V or M. check-in: 8bf221e5 user: joel tags: merge-renames
2016-05-09
23:48
Call pivot_set_*() before each pivot_find() call. check-in: ec25471c user: joel tags: merge-renames
2016-05-06
20:27
Handle merges with a specified baseline that comes after a commit with renames. check-in: 8da901bb user: joel tags: merge-renames
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/merge.c.

335
336
337
338
339
340
341

342
343
344
345
346
347
348
349
350
351
352
353
354
355


356
357
358
359
360
361
362
      fossil_fatal("incompatible options: --integrate & --cherrypick or --backout");
    }
    pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid);
    if( pid<=0 ){
      fossil_fatal("cannot find an ancestor for %s", g.argv[2]);
    }
  }else{

    pivot_set_primary(mid);
    pivot_set_secondary(vid);
    db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0");
    while( db_step(&q)==SQLITE_ROW ){
      pivot_set_secondary(db_column_int(&q,0));
    }
    db_finalize(&q);
    if( !zPivot ){
      pid = pivot_find(0);
      if( pid<=0 ){
        fossil_fatal("cannot find a common ancestor between the current "
                     "checkout and %s", g.argv[2]);
      }
    }


    nid = pivot_find(1);
  }
  if( backoutFlag ){
    int t = pid;
    pid = mid;
    mid = t;
  }







>
|
|
|
|
|
|
|
<






>
>







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349

350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
      fossil_fatal("incompatible options: --integrate & --cherrypick or --backout");
    }
    pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid);
    if( pid<=0 ){
      fossil_fatal("cannot find an ancestor for %s", g.argv[2]);
    }
  }else{
    if( !zPivot ){
      pivot_set_primary(mid);
      pivot_set_secondary(vid);
      db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0");
      while( db_step(&q)==SQLITE_ROW ){
        pivot_set_secondary(db_column_int(&q,0));
      }
      db_finalize(&q);

      pid = pivot_find(0);
      if( pid<=0 ){
        fossil_fatal("cannot find a common ancestor between the current "
                     "checkout and %s", g.argv[2]);
      }
    }
    pivot_set_primary(mid);
    pivot_set_secondary(vid);
    nid = pivot_find(1);
  }
  if( backoutFlag ){
    int t = pid;
    pid = mid;
    mid = t;
  }