Fossil

Check-in [9472cb56]
Login

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

Overview
Comment:On /timeline with files, hyperlink from the file to the corresponding artifact text.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9472cb5602764151fd4030ae07464e8ece76055f
User & Date: drh 2015-02-11 04:29:39
Context
2015-02-11
11:09
Use the "%S" formatting option for human-readable SHA1 hashes and "%!S" for SHA1 hashes in URLs. The length of these hashes are compile-time configurable using FOSSIL_SHA1_PREFIX_LEN and FOSSIL_SHA1_URLPREFIX_LEN, respectively. Defaults: 10 and 16. check-in: 1fee0377 user: drh tags: trunk
04:29
On /timeline with files, hyperlink from the file to the corresponding artifact text. check-in: 9472cb56 user: drh tags: trunk
01:55
Add the m= query parameter to /timeline. Disable the y= selection box on /timeline for cases where other parameters only allow checkins. Further work needed on the a= and b= query parameters to get them working with all combinations of other parameters. check-in: 45127a72 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/timeline.c.

520
521
522
523
524
525
526
527

528
529
530
531
532
533
534
...
537
538
539
540
541
542
543

544
545
546
547
548

549
550
551

552
553
554
555
556
557

558
559
560
561
562

563
564
565
566
567
568
569
        const char *zFilename = db_column_text(&fchngQuery, 2);
        int isNew = db_column_int(&fchngQuery, 0);
        int fid = db_column_int(&fchngQuery, 1);
        int isDel = fid==0;
        const char *zOldName = db_column_text(&fchngQuery, 5);
        const char *zOld = db_column_text(&fchngQuery, 4);
        const char *zNew = db_column_text(&fchngQuery, 3);
        const char *zUnpubTag = "";

        char zId[20];
        if( !inUl ){
          @ <ul class="filelist">
          inUl = 1;
        }
        if( tmFlags & TIMELINE_SHOWRID ){
          sqlite3_snprintf(sizeof(zId), zId, " (%d) ", fid);
................................................................................
        }
        if( (tmFlags & TIMELINE_FRENAMES)!=0 ){
          if( !isNew && !isDel && zOldName!=0 ){
            @ <li> %h(zOldName) &rarr; %h(zFilename)%s(zId)
          }
          continue;
        }

        if( content_is_private(fid) ){
          zUnpubTag =  UNPUB_TAG;
        }
        if( isNew ){
          @ <li> %h(zFilename)%s(zId) %s(zUnpubTag) (new file) &nbsp;

          @ %z(href("%R/artifact/%s",zNew))[view]</a></li>
        }else if( isDel ){
          @ <li> %h(zFilename) (deleted)</li>

        }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
          @ <li> %h(zOldName) &rarr; %h(zFilename)%s(zId) %s(zUnpubTag)
          @ %z(href("%R/artifact/%s",zNew))[view]</a></li>
        }else{
          if( zOldName!=0 ){
            @ <li> %h(zOldName) &rarr; %h(zFilename)%s(zId) %s(zUnpubTag)

          }else{
            @ <li> %h(zFilename)%s(zId) &nbsp; %s(zUnpubTag)
          }
          @ %z(href("%R/fdiff?sbs=1&v1=%s&v2=%s",zOld,zNew))[diff]</a></li>
        }

      }
      db_reset(&fchngQuery);
      if( inUl ){
        @ </ul>
      }
    }
  }







|
>







 







>

|


<
>


<
>

|
|


<
>

|



>







520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
...
538
539
540
541
542
543
544
545
546
547
548
549

550
551
552

553
554
555
556
557
558

559
560
561
562
563
564
565
566
567
568
569
570
571
572
        const char *zFilename = db_column_text(&fchngQuery, 2);
        int isNew = db_column_int(&fchngQuery, 0);
        int fid = db_column_int(&fchngQuery, 1);
        int isDel = fid==0;
        const char *zOldName = db_column_text(&fchngQuery, 5);
        const char *zOld = db_column_text(&fchngQuery, 4);
        const char *zNew = db_column_text(&fchngQuery, 3);
        const char *zUnpub = "";
        char *zA;
        char zId[20];
        if( !inUl ){
          @ <ul class="filelist">
          inUl = 1;
        }
        if( tmFlags & TIMELINE_SHOWRID ){
          sqlite3_snprintf(sizeof(zId), zId, " (%d) ", fid);
................................................................................
        }
        if( (tmFlags & TIMELINE_FRENAMES)!=0 ){
          if( !isNew && !isDel && zOldName!=0 ){
            @ <li> %h(zOldName) &rarr; %h(zFilename)%s(zId)
          }
          continue;
        }
        zA = href("%R/artifact/%S",fid?zNew:zOld);
        if( content_is_private(fid) ){
          zUnpub =  UNPUB_TAG;
        }
        if( isNew ){

          @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) (new file) &nbsp;
          @ %z(href("%R/artifact/%s",zNew))[view]</a></li>
        }else if( isDel ){

          @ <li> %s(zA)%h(zFilename)</a> (deleted)</li>
        }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
          @ <li> %h(zOldName) &rarr; %s(zA)%h(zFilename)</a>%s(zId)
          @ %s(zUnpub) %z(href("%R/artifact/%s",zNew))[view]</a></li>
        }else{
          if( zOldName!=0 ){

            @ <li>%h(zOldName) &rarr; %s(zA)%h(zFilename)%s(zId)</a> %s(zUnpub)
          }else{
            @ <li>%s(zA)%h(zFilename)</a>%s(zId) &nbsp; %s(zUnpub)
          }
          @ %z(href("%R/fdiff?sbs=1&v1=%s&v2=%s",zOld,zNew))[diff]</a></li>
        }
        fossil_free(zA);
      }
      db_reset(&fchngQuery);
      if( inUl ){
        @ </ul>
      }
    }
  }