Fossil

Check-in [61c52dd6]
Login

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

Overview
Comment:Use artifact IDs, not record IDs, on the "diff" link of check-in change listings.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 61c52dd6aa3641d0131a2c3e3c0a16e8a36ffee5
User & Date: drh 2010-03-30 14:29:32
References
2010-04-02
20:27 New ticket [3dbc12f4] Edit ticket fails to save changes if assigned_to AND remark are changed.. artifact: 8a7d22db user: anonymous
Context
2010-03-31
14:35
When compiled with FOSSIL_DEBUG, print warnings if any SQLite queries fail to use indices. check-in: e95e87c1 user: drh tags: trunk
2010-03-30
14:29
Use artifact IDs, not record IDs, on the "diff" link of check-in change listings. check-in: 61c52dd6 user: drh tags: trunk
01:22
The sync, clone, push, and pull commands process 302 redirects. check-in: 84439e9d user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
...
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
    if( showDiff ){
      @ <a href="%s(g.zBaseURL)/ci/%T(zName)">[hide&nbsp;diffs]</a><br/>
    }else{
      @ <a href="%s(g.zBaseURL)/vinfo/%T(zName)">[show&nbsp;diffs]</a><br/>
    }
  }
  db_prepare(&q,
     "SELECT pid, fid, name, substr(a.uuid,1,10), substr(b.uuid,1,10)"
     "  FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
     "         LEFT JOIN blob a ON a.rid=pid"
     "         LEFT JOIN blob b ON b.rid=fid"
     " WHERE mlink.mid=%d"
     " ORDER BY name",
     rid
  );
  while( db_step(&q)==SQLITE_ROW ){
    int pid = db_column_int(&q,0);
    int fid = db_column_int(&q,1);
................................................................................
      if( zNew==0 ){
        @ <p>Deleted %h(zName)</p>
        continue;
      }else{
        @ <p>Changes to %h(zName)</p>
      }
    }else if( zOld && zNew ){
      @ <p>Modified <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a>
      @ from <a href="%s(g.zBaseURL)/artifact/%s(zOld)">[%s(zOld)]</a>
      @ to <a href="%s(g.zBaseURL)/artifact/%s(zNew)">[%s(zNew)].</a>
      if( !showDiff ){
        @ &nbsp;&nbsp;
        @ <a href="%s(g.zBaseURL)/fdiff?v1=%d(pid)&v2=%d(fid)">[diff]</a>
      }
    }else if( zOld ){
      @ <p>Deleted <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a>
      @ version <a href="%s(g.zBaseURL)/artifact/%s(zOld)">[%s(zOld)]</a></p>
      continue;
    }else{
      @ <p>Added <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a>
      @ version <a href="%s(g.zBaseURL)/artifact/%s(zNew)">[%s(zNew)]</a></p>
    }
    if( showDiff ){
      @ <blockquote><pre>
      append_diff(pid, fid);
      @ </pre></blockquote>
    }
  }







|
|
|
|







 







|
|
|


|


|
|


|
|







395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
...
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
    if( showDiff ){
      @ <a href="%s(g.zBaseURL)/ci/%T(zName)">[hide&nbsp;diffs]</a><br/>
    }else{
      @ <a href="%s(g.zBaseURL)/vinfo/%T(zName)">[show&nbsp;diffs]</a><br/>
    }
  }
  db_prepare(&q,
     "SELECT pid, fid, name,"
     "       (SELECT uuid FROM blob WHERE rid=mlink.pid),"
     "       (SELECT uuid FROM blob WHERE rid=mlink.fid)"
     "  FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
     " WHERE mlink.mid=%d"
     " ORDER BY name",
     rid
  );
  while( db_step(&q)==SQLITE_ROW ){
    int pid = db_column_int(&q,0);
    int fid = db_column_int(&q,1);
................................................................................
      if( zNew==0 ){
        @ <p>Deleted %h(zName)</p>
        continue;
      }else{
        @ <p>Changes to %h(zName)</p>
      }
    }else if( zOld && zNew ){
      @ <p>Modified <a href="%s(g.zTop)/finfo?name=%T(zName)">%h(zName)</a>
      @ from <a href="%s(g.zTop)/artifact/%s(zOld)">[%S(zOld)]</a>
      @ to <a href="%s(g.zTop)/artifact/%s(zNew)">[%S(zNew)].</a>
      if( !showDiff ){
        @ &nbsp;&nbsp;
        @ <a href="%s(g.zTop)/fdiff?v1=%S(zOld)&v2=%S(zNew)">[diff]</a>
      }
    }else if( zOld ){
      @ <p>Deleted <a href="%s(g.zTop)/finfo?name=%T(zName)">%h(zName)</a>
      @ version <a href="%s(g.zTop)/artifact/%s(zOld)">[%S(zOld)]</a></p>
      continue;
    }else{
      @ <p>Added <a href="%s(g.zTop)/finfo?name=%T(zName)">%h(zName)</a>
      @ version <a href="%s(g.zTop)/artifact/%s(zNew)">[%S(zNew)]</a></p>
    }
    if( showDiff ){
      @ <blockquote><pre>
      append_diff(pid, fid);
      @ </pre></blockquote>
    }
  }