Fossil SCM

Call pivot_set_*() before each pivot_find() call.

joel 2016-05-09 23:48 merge-renames
Commit ec25471c506e37a9ae60dc69ed0e62806633cd0a
1 file changed +9 -7
+9 -7
--- src/merge.c
+++ src/merge.c
@@ -337,24 +337,26 @@
337337
pid = db_int(0, "SELECT pid FROM plink WHERE cid=%d AND isprim", mid);
338338
if( pid<=0 ){
339339
fossil_fatal("cannot find an ancestor for %s", g.argv[2]);
340340
}
341341
}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);
349342
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);
350350
pid = pivot_find(0);
351351
if( pid<=0 ){
352352
fossil_fatal("cannot find a common ancestor between the current "
353353
"checkout and %s", g.argv[2]);
354354
}
355355
}
356
+ pivot_set_primary(mid);
357
+ pivot_set_secondary(vid);
356358
nid = pivot_find(1);
357359
}
358360
if( backoutFlag ){
359361
int t = pid;
360362
pid = mid;
361363
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button