Fossil

Check-in [756c1875]
Login

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

Overview
Comment:Capitalize button labels for consistency with other pages. Change "Show Whitespace Differences" to "Show Whitespace Changes".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | diff-eolws
Files: files | file ages | folders
SHA1:756c187590dc9c4af284ac4c63d2d291e54ebfe3
User & Date: joel 2014-03-05 00:42:51
Context
2014-03-05
02:39
Add "w" URL parameter and buttons to /fdiff pages. check-in: 0ec153a2 user: joel tags: diff-eolws
00:42
Capitalize button labels for consistency with other pages. Change "Show Whitespace Differences" to "Show Whitespace Changes". check-in: 756c1875 user: joel tags: diff-eolws
00:20
Fix up and simplify /ci page button generation code. check-in: 0c670599 user: joel tags: diff-eolws
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

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
715
...
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
....
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
      zPage = "ci";
      zPageHide = "vinfo";
    }
    diffFlags = construct_diff_flags(verboseFlag, sideBySide);
    zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
    if( verboseFlag ){
      @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
      @ hide&nbsp;diffs</a>
      if( sideBySide ){
        @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
        @ unified&nbsp;diffs</a>
      }else{
        @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW))
        @ side-by-side&nbsp;diffs</a>
      }
      if( *zW ){
        @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide))
        @ show&nbsp;whitespace&nbsp;differences</a>
      }else{
        @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide))
        @ ignore&nbsp;whitespace</a>
      }
    }else{
      @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName))
      @ show&nbsp;unified&nbsp;diffs</a>
      @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
      @ show&nbsp;side-by-side&nbsp;diffs</a>
    }
    @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
    @ patch</a></div>
    if( pRe ){
      @ <p><b>Only differences that match regular expression "%h(zRe)"
      @ are shown.</b></p>
    }
    db_prepare(&q3,
       "SELECT name,"
       "       mperm,"
................................................................................
  if( sideBySide || verboseFlag ){
    style_submenu_element("Hide Diff", "hidediff",
                          "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
                          zFrom, zTo,
                          zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
  }
  if( !sideBySide ){
    style_submenu_element("Side-by-side Diff", "sbsdiff",
                          "%R/vdiff?from=%T&to=%T&sbs=1%s%T%s",
                          zFrom, zTo,
                          zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
  }
  if( sideBySide || !verboseFlag ) {
    style_submenu_element("Unified Diff", "udiff",
                          "%R/vdiff?from=%T&to=%T&sbs=0&v%s%T%s",
................................................................................
  zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
  diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;

  style_header("Diff");
  style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch",
                        g.zTop, P("v1"), P("v2"));
  if( !sideBySide ){
    style_submenu_element("Side-by-side Diff", "sbsdiff",
                          "%s/fdiff?v1=%T&v2=%T&sbs=1",
                          g.zTop, P("v1"), P("v2"));
  }else{
    style_submenu_element("Unified Diff", "udiff",
                          "%s/fdiff?v1=%T&v2=%T&sbs=0",
                          g.zTop, P("v1"), P("v2"));
  }







|


|


|



|


|



|

|


|







 







|







 







|







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
715
...
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
....
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
      zPage = "ci";
      zPageHide = "vinfo";
    }
    diffFlags = construct_diff_flags(verboseFlag, sideBySide);
    zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
    if( verboseFlag ){
      @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
      @ Hide&nbsp;Diffs</a>
      if( sideBySide ){
        @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
        @ Unified&nbsp;Diffs</a>
      }else{
        @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW))
        @ Side-by-Side&nbsp;Diffs</a>
      }
      if( *zW ){
        @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide))
        @ Show&nbsp;Whitespace&nbsp;Changes</a>
      }else{
        @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide))
        @ Ignore&nbsp;Whitespace</a>
      }
    }else{
      @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName))
      @ Show&nbsp;Unified&nbsp;Diffs</a>
      @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
      @ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
    }
    @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
    @ Patch</a></div>
    if( pRe ){
      @ <p><b>Only differences that match regular expression "%h(zRe)"
      @ are shown.</b></p>
    }
    db_prepare(&q3,
       "SELECT name,"
       "       mperm,"
................................................................................
  if( sideBySide || verboseFlag ){
    style_submenu_element("Hide Diff", "hidediff",
                          "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
                          zFrom, zTo,
                          zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
  }
  if( !sideBySide ){
    style_submenu_element("Side-by-Side Diff", "sbsdiff",
                          "%R/vdiff?from=%T&to=%T&sbs=1%s%T%s",
                          zFrom, zTo,
                          zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
  }
  if( sideBySide || !verboseFlag ) {
    style_submenu_element("Unified Diff", "udiff",
                          "%R/vdiff?from=%T&to=%T&sbs=0&v%s%T%s",
................................................................................
  zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
  diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;

  style_header("Diff");
  style_submenu_element("Patch", "Patch", "%s/fdiff?v1=%T&v2=%T&patch",
                        g.zTop, P("v1"), P("v2"));
  if( !sideBySide ){
    style_submenu_element("Side-by-Side Diff", "sbsdiff",
                          "%s/fdiff?v1=%T&v2=%T&sbs=1",
                          g.zTop, P("v1"), P("v2"));
  }else{
    style_submenu_element("Unified Diff", "udiff",
                          "%s/fdiff?v1=%T&v2=%T&sbs=0",
                          g.zTop, P("v1"), P("v2"));
  }