Fossil

Check-in [9df32e2808]
Login

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

Overview
Comment:Added the vdiff webpage with links from vinfo.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9df32e280830decdb65206f9276b60bb81e14aed
User & Date: drh 2007-08-01 01:24:37.000
Context
2007-08-01
02:03
Do not attempt to verify phantoms. Set the default max message size at 500K instead of 1MB. Updates to the todo list. ... (check-in: 71ed18cc4b user: drh tags: trunk)
01:24
Added the vdiff webpage with links from vinfo. ... (check-in: 9df32e2808 user: drh tags: trunk)
00:55
Add the finfo web page. ... (check-in: 86c8768475 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/info.c.
218
219
220
221
222
223
224

225
226
227
228
229
230
231
  );
  if( db_step(&q)==SQLITE_ROW ){
    @ <h2>Version %s(db_column_text(&q,0))</h2>
    @ <ul>
    @ <li><b>Date:</b> %s(db_column_text(&q, 1))</li>
    @ <li><b>User:</b> %s(db_column_text(&q, 2))</li>
    @ <li><b>Comment:</b> %s(db_column_text(&q, 3))</li>

    @ </ul>
  }
  db_finalize(&q);
  @ <p><h2>Descendents:</h2>
  n = showDescendents(rid, 2);
  if( n==0 ){
    @ <ul>None.  This is a leaf node.</ul>







>







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
  );
  if( db_step(&q)==SQLITE_ROW ){
    @ <h2>Version %s(db_column_text(&q,0))</h2>
    @ <ul>
    @ <li><b>Date:</b> %s(db_column_text(&q, 1))</li>
    @ <li><b>User:</b> %s(db_column_text(&q, 2))</li>
    @ <li><b>Comment:</b> %s(db_column_text(&q, 3))</li>
    @ <li><a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a></li>
    @ </ul>
  }
  db_finalize(&q);
  @ <p><h2>Descendents:</h2>
  n = showDescendents(rid, 2);
  if( n==0 ){
    @ <ul>None.  This is a leaf node.</ul>
308
309
310
311
312
313
314





























































315
316
317
318
319
320
321
    @ %h(db_column_text(&q,2)) (by %h(db_column_text(&q,3)))</td>
  }
  db_finalize(&q);
  @ </table>
  style_footer();
}
































































#if 0
/*
** WEB PAGE: diff
**
** Display the difference between two files determined by the v1 and v2







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
    @ %h(db_column_text(&q,2)) (by %h(db_column_text(&q,3)))</td>
  }
  db_finalize(&q);
  @ </table>
  style_footer();
}


/*
** Append the difference between two RIDs to the output
*/
static void append_diff(int fromid, int toid){
  Blob from, to, out;
  content_get(fromid, &from);
  content_get(toid, &to);
  blob_zero(&out);
  unified_diff(&from, &to, 5, &out);
  @ %h(blob_str(&out))
  blob_reset(&from);
  blob_reset(&to);
  blob_reset(&out);  
}

/*
** WEBPAGE: vdiff
**
** Show all differences for a particular check-in specified by g.zExtra
*/
void vdiff_page(void){
  int rid, i;
  Stmt q;
  Manifest m;
  Blob mfile, file;
  char *zUuid;

  login_check_credentials();
  if( !g.okHistory ){ login_needed(); return; }
  style_header("Version Diff");

  rid = name_to_rid(g.zExtra);
  if( rid==0 ){
    cgi_redirect("index");
  }
  db_prepare(&q,
     "SELECT pid, fid, name"
     "  FROM mlink, filename"
     " WHERE mlink.mid=%d"
     "   AND filename.fnid=mlink.fnid"
     " ORDER BY name",
     rid
  );
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
  @ <h2>All Changes In Version
  hyperlink_to_uuid(zUuid);
  @ </h2>
  while( db_step(&q)==SQLITE_ROW ){
    int pid = db_column_int(&q,0);
    int fid = db_column_int(&q,1);
    const char *zName = db_column_text(&q,2);
    @ <p><a href="%s(g.zBaseURL)/finfo/%T(zName)">%h(zName)</a></p>
    @ <blockquote><pre>
    append_diff(pid, fid);
    @ </pre></blockquote>
  }
  db_finalize(&q);
  style_footer();
}



#if 0
/*
** WEB PAGE: diff
**
** Display the difference between two files determined by the v1 and v2