Fossil SCM
Call pivot_set_*() before each pivot_find() call.
Commit
ec25471c506e37a9ae60dc69ed0e62806633cd0a
Parent
8da901bb98dbe06…
1 file changed
+9
-7
+9
-7
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -337,24 +337,26 @@ | ||
| 337 | 337 | pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid); |
| 338 | 338 | if( pid<=0 ){ |
| 339 | 339 | fossil_fatal("cannot find an ancestor for %s", g.argv[2]); |
| 340 | 340 | } |
| 341 | 341 | }else{ |
| 342 | - pivot_set_primary(mid); | |
| 343 | - pivot_set_secondary(vid); | |
| 344 | - db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0"); | |
| 345 | - while( db_step(&q)==SQLITE_ROW ){ | |
| 346 | - pivot_set_secondary(db_column_int(&q,0)); | |
| 347 | - } | |
| 348 | - db_finalize(&q); | |
| 349 | 342 | if( !zPivot ){ |
| 343 | + pivot_set_primary(mid); | |
| 344 | + pivot_set_secondary(vid); | |
| 345 | + db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0"); | |
| 346 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 347 | + pivot_set_secondary(db_column_int(&q,0)); | |
| 348 | + } | |
| 349 | + db_finalize(&q); | |
| 350 | 350 | pid = pivot_find(0); |
| 351 | 351 | if( pid<=0 ){ |
| 352 | 352 | fossil_fatal("cannot find a common ancestor between the current " |
| 353 | 353 | "checkout and %s", g.argv[2]); |
| 354 | 354 | } |
| 355 | 355 | } |
| 356 | + pivot_set_primary(mid); | |
| 357 | + pivot_set_secondary(vid); | |
| 356 | 358 | nid = pivot_find(1); |
| 357 | 359 | } |
| 358 | 360 | if( backoutFlag ){ |
| 359 | 361 | int t = pid; |
| 360 | 362 | pid = mid; |
| 361 | 363 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -337,24 +337,26 @@ | |
| 337 | pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid); |
| 338 | if( pid<=0 ){ |
| 339 | fossil_fatal("cannot find an ancestor for %s", g.argv[2]); |
| 340 | } |
| 341 | }else{ |
| 342 | pivot_set_primary(mid); |
| 343 | pivot_set_secondary(vid); |
| 344 | db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0"); |
| 345 | while( db_step(&q)==SQLITE_ROW ){ |
| 346 | pivot_set_secondary(db_column_int(&q,0)); |
| 347 | } |
| 348 | db_finalize(&q); |
| 349 | if( !zPivot ){ |
| 350 | pid = pivot_find(0); |
| 351 | if( pid<=0 ){ |
| 352 | fossil_fatal("cannot find a common ancestor between the current " |
| 353 | "checkout and %s", g.argv[2]); |
| 354 | } |
| 355 | } |
| 356 | nid = pivot_find(1); |
| 357 | } |
| 358 | if( backoutFlag ){ |
| 359 | int t = pid; |
| 360 | pid = mid; |
| 361 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -337,24 +337,26 @@ | |
| 337 | pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid); |
| 338 | if( pid<=0 ){ |
| 339 | fossil_fatal("cannot find an ancestor for %s", g.argv[2]); |
| 340 | } |
| 341 | }else{ |
| 342 | if( !zPivot ){ |
| 343 | pivot_set_primary(mid); |
| 344 | pivot_set_secondary(vid); |
| 345 | db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0"); |
| 346 | while( db_step(&q)==SQLITE_ROW ){ |
| 347 | pivot_set_secondary(db_column_int(&q,0)); |
| 348 | } |
| 349 | db_finalize(&q); |
| 350 | pid = pivot_find(0); |
| 351 | if( pid<=0 ){ |
| 352 | fossil_fatal("cannot find a common ancestor between the current " |
| 353 | "checkout and %s", g.argv[2]); |
| 354 | } |
| 355 | } |
| 356 | pivot_set_primary(mid); |
| 357 | pivot_set_secondary(vid); |
| 358 | nid = pivot_find(1); |
| 359 | } |
| 360 | if( backoutFlag ){ |
| 361 | int t = pid; |
| 362 | pid = mid; |
| 363 |