Fossil

Diff
Login

Diff

Differences From Artifact [a58a20d4e9]:

To Artifact [d849ff88c6]:


335
336
337
338
339
340
341
342

343
344
345
346
347
348
349
350
351
};

/*
** Compute all file name changes that occur going from checkin iFrom
** to checkin iTo.
**
** The number of name changes is written into *pnChng.  For each name
** change, to integers are allocated for *piChng.  The first is the original

** name and the second is the new name.  Space to hold *piChng is obtained
** from fossil_malloc() and should be released by the caller.
**
** This routine really has nothing to do with bisection.  It is located
** in this bisect.c module in order to leverage some of the bisect
** infrastructure.
*/
void find_filename_changes(
  int iFrom,







|
>
|
|







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
};

/*
** Compute all file name changes that occur going from checkin iFrom
** to checkin iTo.
**
** The number of name changes is written into *pnChng.  For each name
** change, two integers are allocated for *piChng.  The first is the 
** filename.fnid for the original name and the second is for new name.
** Space to hold *piChng is obtained from fossil_malloc() and should
** be released by the caller.
**
** This routine really has nothing to do with bisection.  It is located
** in this bisect.c module in order to leverage some of the bisect
** infrastructure.
*/
void find_filename_changes(
  int iFrom,
366
367
368
369
370
371
372
373
374




375
376
377
378
379
380
381
  bisect_reset();
  p = bisect_shortest_path(iFrom, iTo, 1);
  if( p==0 ) return;
  bisect_reverse_path();
  db_prepare(&q1,
     "SELECT pfnid, fnid FROM mlink WHERE mid=:mid AND pfnid>0"
  );
  for(p=bisect.pStart->u.pTo; p; p=p->u.pTo){
    int fnid, pfnid;




    db_bind_int(&q1, ":mid", p->rid);
    while( db_step(&q1)==SQLITE_ROW ){
      if( p->fromIsParent ){
        fnid = db_column_int(&q1, 1);
        pfnid = db_column_int(&q1, 0);
      }else{
        fnid = db_column_int(&q1, 0);







|

>
>
>
>







367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
  bisect_reset();
  p = bisect_shortest_path(iFrom, iTo, 1);
  if( p==0 ) return;
  bisect_reverse_path();
  db_prepare(&q1,
     "SELECT pfnid, fnid FROM mlink WHERE mid=:mid AND pfnid>0"
  );
  for(p=bisect.pStart; p; p=p->u.pTo){
    int fnid, pfnid;
    if( !p->fromIsParent && (p->u.pTo==0 || p->u.pTo->fromIsParent) ){
      /* Skip nodes where the parent is not on the path */
      continue;
    }
    db_bind_int(&q1, ":mid", p->rid);
    while( db_step(&q1)==SQLITE_ROW ){
      if( p->fromIsParent ){
        fnid = db_column_int(&q1, 1);
        pfnid = db_column_int(&q1, 0);
      }else{
        fnid = db_column_int(&q1, 0);