Fossil

Check-in [eb6935df]
Login

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

Overview
Comment:Add "ignore whitespace" button to ci page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | diff-eolws
Files: files | file ages | folders
SHA1:eb6935df7f3a62336fd79749a047376a3496c040
User & Date: jan.nijtmans 2014-03-04 14:14:14
Context
2014-03-05
00:20
Fix up and simplify /ci page button generation code. check-in: 0c670599 user: joel tags: diff-eolws
2014-03-04
14:14
Add "ignore whitespace" button to ci page. check-in: eb6935df user: jan.nijtmans tags: diff-eolws
13:26
Add "Ignore Whitespace" button to vdiff page. check-in: 56c7561e user: jan.nijtmans tags: diff-eolws
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

665
666
667
668
669
670
671

672
673
674
675
676


677
678
679
680
681
682
683
684
685
686



687




688
689
690
691
692
693


694
695
696
697
698
699
700
701
702
...
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
  }else{
    style_header("Check-in Information");
    login_anonymous_available();
  }
  db_finalize(&q1);
  showTags(rid, "");
  if( zParent ){

    @ <div class="section">Changes</div>
    @ <div class="sectionmenu">
    verboseFlag = g.zPath[0]!='c';
    if( db_get_boolean("show-version-diffs", 0)==0 ){
      verboseFlag = !verboseFlag;


      if( verboseFlag ){
        @ %z(xhref("class='button'","%R/vinfo/%T",zName))
        @ hide&nbsp;diffs</a>
        if( sideBySide ){
          @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
          @ unified&nbsp;diffs</a>
        }else{
          @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
          @ side-by-side&nbsp;diffs</a>
        }



      }else{




        @ %z(xhref("class='button'","%R/ci/%T?sbs=0",zName))
        @ show&nbsp;unified&nbsp;diffs</a>
        @ %z(xhref("class='button'","%R/ci/%T?sbs=1",zName))
        @ show&nbsp;side-by-side&nbsp;diffs</a>
      }
    }else{


      if( verboseFlag ){
        @ %z(xhref("class='button'","%R/ci/%T",zName))hide&nbsp;diffs</a>
        if( sideBySide ){
          @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
          @ unified&nbsp;diffs</a>
        }else{
          @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName))
          @ side-by-side&nbsp;diffs</a>
        }
................................................................................
       "  FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
       " WHERE mlink.mid=%d"
       "   AND (mlink.fid>0"
              " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
       " ORDER BY name /*sort*/",
       rid, rid
    );
    diffFlags = construct_diff_flags(verboseFlag, sideBySide);
    while( db_step(&q3)==SQLITE_ROW ){
      const char *zName = db_column_text(&q3,0);
      int mperm = db_column_int(&q3, 1);
      const char *zOld = db_column_text(&q3,2);
      const char *zNew = db_column_text(&q3,3);
      const char *zOldName = db_column_text(&q3, 4);
      append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);







>





>
>

|


|


|


>
>
>
|
>
>
>
>
|

|



>
>

|







 







<







665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
...
734
735
736
737
738
739
740

741
742
743
744
745
746
747
  }else{
    style_header("Check-in Information");
    login_anonymous_available();
  }
  db_finalize(&q1);
  showTags(rid, "");
  if( zParent ){
    const char *zW;
    @ <div class="section">Changes</div>
    @ <div class="sectionmenu">
    verboseFlag = g.zPath[0]!='c';
    if( db_get_boolean("show-version-diffs", 0)==0 ){
      verboseFlag = !verboseFlag;
      diffFlags = construct_diff_flags(verboseFlag, sideBySide);
      zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
      if( verboseFlag ){
        @ %z(xhref("class='button'","%R/vinfo/%T%s",zName,zW))
        @ hide&nbsp;diffs</a>
        if( sideBySide ){
          @ %z(xhref("class='button'","%R/ci/%T?sbs=0%s",zName,zW))
          @ unified&nbsp;diffs</a>
        }else{
          @ %z(xhref("class='button'","%R/ci/%T?sbs=1%s",zName,zW))
          @ side-by-side&nbsp;diffs</a>
        }
        if( *zW ){
          @ %z(xhref("class='button'","%R/ci/%T?sbs=%s",zName,sideBySide?"1":"0"))
          @ show&nbsp;whitespace&nbsp;differences</a>
        }else{
          @ %z(xhref("class='button'","%R/ci/%T?sbs=%s&w",zName,sideBySide?"1":"0"))
          @ ignore&nbsp;whitespace</a>
        }
      }else{
        @ %z(xhref("class='button'","%R/ci/%T?sbs=0%s",zName,zW))
        @ show&nbsp;unified&nbsp;diffs</a>
        @ %z(xhref("class='button'","%R/ci/%T?sbs=1%s",zName,zW))
        @ show&nbsp;side-by-side&nbsp;diffs</a>
      }
    }else{
      diffFlags = construct_diff_flags(verboseFlag, sideBySide);
      zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
      if( verboseFlag ){
        @ %z(xhref("class='button'","%R/ci/%T%s",zName,zW))hide&nbsp;diffs</a>
        if( sideBySide ){
          @ %z(xhref("class='button'","%R/info/%T?sbs=0",zName))
          @ unified&nbsp;diffs</a>
        }else{
          @ %z(xhref("class='button'","%R/info/%T?sbs=1",zName))
          @ side-by-side&nbsp;diffs</a>
        }
................................................................................
       "  FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
       " WHERE mlink.mid=%d"
       "   AND (mlink.fid>0"
              " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
       " ORDER BY name /*sort*/",
       rid, rid
    );

    while( db_step(&q3)==SQLITE_ROW ){
      const char *zName = db_column_text(&q3,0);
      int mperm = db_column_int(&q3, 1);
      const char *zOld = db_column_text(&q3,2);
      const char *zNew = db_column_text(&q3,3);
      const char *zOldName = db_column_text(&q3, 4);
      append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);