CVSTrac Legacy Code

Check-in [52ecfd6559]
Login

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

Overview
Comment:(#783) generate the link to appended remarks by targetting what should be the anchor. Doing so from the timeline will be a little more complicated.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:52ecfd65595704c3a18cd1d429d2d37ec91592cc
User & Date: cpb 2009-02-19 03:23:25
Context
2009-02-19
03:38
(#783) when dealing with remarks in the timeline, break them out separately and (try to) link directly to a new remark in the ticket. This won't work perfectly when dealing with direct edits to the remark field, but for normal use it should be fine. check-in: 743d4611de user: cpb tags: trunk
03:23
(#783) generate the link to appended remarks by targetting what should be the anchor. Doing so from the timeline will be a little more complicated. check-in: 52ecfd6559 user: cpb tags: trunk
02:59
(#783) when appending a ticket comment, write an HTML anchor based on the change time so we can find it later. check-in: 7c22978975 user: cpb tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to rss.c.

522
523
524
525
526
527
528




529
530
531
532
533
534
535
536
537
538
539

540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
                    && strncmp(az[i+3],az[i+4],len1)==0 ){
            zMsg = mprintf("Appended to #%h <i>%h</i>:",
                           az[i+5], zMsg ? zMsg : "");
            if( rssDetail>=9 ) zWiki = &(az[i+4])[len1];
          }else{
            zMsg = mprintf("%h",zMsg);
          }




        }else{
          nLastEdit = atoi(az[i]);
          while( az[i+7] && atoi(az[i+8])==6 && strcmp(az[i+5],az[i+12])==0 
                 && strcmp(az[i+2],az[i+9])==0
                 && strcmp(az[i+13],"remarks")!=0 ){
            if( atoi(az[i+7])!=nLastEdit ){
              nLastEdit = atoi(az[i+7]);
              nEdits++;
            }
            i += 7;
          }

        }
        if( nEdits>1 ){
          bprintf(zPrefix, sizeof(zPrefix), "%d changes to ticket #%.20s",
                  nEdits, az[i+5]);
        }else{
          bprintf(zPrefix, sizeof(zPrefix), "Changes to ticket #%.20s",
              az[i+5]);
        }
        bprintf(zLink,sizeof(zLink),"tktview?tn=%.20s",az[i+5]);
        break;
      }
      case 7: { /* Attachments */
        if( isdigit(az[i+3][0]) ){
          bprintf(zPrefix, sizeof(zPrefix), "Attachment to ticket #%.20s: ",
                  az[i+3]);
          zMsg = mprintf(







>
>
>
>











>








<







522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552

553
554
555
556
557
558
559
                    && strncmp(az[i+3],az[i+4],len1)==0 ){
            zMsg = mprintf("Appended to #%h <i>%h</i>:",
                           az[i+5], zMsg ? zMsg : "");
            if( rssDetail>=9 ) zWiki = &(az[i+4])[len1];
          }else{
            zMsg = mprintf("%h",zMsg);
          }

          /* link to the actual comment section */
          bprintf(zLink,sizeof(zLink),"tktview?tn=%.20s#tktchng%d",
                  az[i+5],(int)thisDate);
        }else{
          nLastEdit = atoi(az[i]);
          while( az[i+7] && atoi(az[i+8])==6 && strcmp(az[i+5],az[i+12])==0 
                 && strcmp(az[i+2],az[i+9])==0
                 && strcmp(az[i+13],"remarks")!=0 ){
            if( atoi(az[i+7])!=nLastEdit ){
              nLastEdit = atoi(az[i+7]);
              nEdits++;
            }
            i += 7;
          }
          bprintf(zLink,sizeof(zLink),"tktview?tn=%.20s",az[i+5]);
        }
        if( nEdits>1 ){
          bprintf(zPrefix, sizeof(zPrefix), "%d changes to ticket #%.20s",
                  nEdits, az[i+5]);
        }else{
          bprintf(zPrefix, sizeof(zPrefix), "Changes to ticket #%.20s",
              az[i+5]);
        }

        break;
      }
      case 7: { /* Attachments */
        if( isdigit(az[i+3][0]) ){
          bprintf(zPrefix, sizeof(zPrefix), "Attachment to ticket #%.20s: ",
                  az[i+3]);
          zMsg = mprintf(