Fossil

Check-in [b0036a3c]
Login

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

Overview
Comment:Add the "Invert" button to the "vdiff" web page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b0036a3c971dc7eb612927510d7a5dbfea78d799
User & Date: drh 2012-09-06 14:00:46
Context
2012-09-07
07:53
Enable unicode commandline and unicode console output for msvc builds. check-in: 28695020 user: jan.nijtmans tags: unicode-cmdline
2012-09-06
18:26
Fix a bug in name resolution when the name begins with "tag:" check-in: ac65f5bd user: drh tags: trunk
14:00
Add the "Invert" button to the "vdiff" web page. check-in: b0036a3c user: drh tags: trunk
13:52
Improvements to the "root:TAG" naming option so that TAG can also be a UUID. check-in: 0e927726 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

799
800
801
802
803
804
805
806









807
808
809
810
811
812
813
814
815
816
817


818
819
820
821
822
823
824
...
828
829
830
831
832
833
834


835
836
837
838
839
840
841
842
843



844
845
846
847
848
849
850
  }
  db_finalize(&q);
}


/*
** WEBPAGE: vdiff
** URL: /vdiff?from=UUID&to=UUID&detail=BOOLEAN;sbs=BOOLEAN









**
** Show all differences between two checkins.  
*/
void vdiff_page(void){
  int ridFrom, ridTo;
  int showDetail = 0;
  int sideBySide = 0;
  u64 diffFlags = 0;
  Manifest *pFrom, *pTo;
  ManifestFile *pFileFrom, *pFileTo;
  const char *zBranch;



  login_check_credentials();
  if( !g.perm.Read ){ login_needed(); return; }
  login_anonymous_available();

  zBranch = P("branch");
  if( zBranch && zBranch[0] ){
................................................................................
  pTo = vdiff_parse_manifest("to", &ridTo);
  if( pTo==0 ) return;
  pFrom = vdiff_parse_manifest("from", &ridFrom);
  if( pFrom==0 ) return;
  sideBySide = atoi(PD("sbs","1"));
  showDetail = atoi(PD("detail","0"));
  if( !showDetail && sideBySide ) showDetail = 1;


  if( !sideBySide ){
    style_submenu_element("Side-by-side Diff", "sbsdiff",
                          "%s/vdiff?from=%T&to=%T&detail=%d&sbs=1",
                          g.zTop, P("from"), P("to"), showDetail);
  }else{
    style_submenu_element("Unified Diff", "udiff",
                          "%s/vdiff?from=%T&to=%T&detail=%d&sbs=0",
                          g.zTop, P("from"), P("to"), showDetail);
  }



  style_header("Check-in Differences");
  @ <h2>Difference From:</h2><blockquote>
  checkin_description(ridFrom);
  @ </blockquote><h2>To:</h2><blockquote>
  checkin_description(ridTo);
  @ </blockquote><hr /><p>








|
>
>
>
>
>
>
>
>
>











>
>







 







>
>


|
|


|
|

>
>
>







799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
...
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
  }
  db_finalize(&q);
}


/*
** WEBPAGE: vdiff
** URL: /vdiff
**
** Query parameters:
**
**   from=TAG
**   to=TAG
**   branch=TAG
**   detail=BOOLEAN
**   sbs=BOOLEAN
**
**
** Show all differences between two checkins.  
*/
void vdiff_page(void){
  int ridFrom, ridTo;
  int showDetail = 0;
  int sideBySide = 0;
  u64 diffFlags = 0;
  Manifest *pFrom, *pTo;
  ManifestFile *pFileFrom, *pFileTo;
  const char *zBranch;
  const char *zFrom;
  const char *zTo;

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(); return; }
  login_anonymous_available();

  zBranch = P("branch");
  if( zBranch && zBranch[0] ){
................................................................................
  pTo = vdiff_parse_manifest("to", &ridTo);
  if( pTo==0 ) return;
  pFrom = vdiff_parse_manifest("from", &ridFrom);
  if( pFrom==0 ) return;
  sideBySide = atoi(PD("sbs","1"));
  showDetail = atoi(PD("detail","0"));
  if( !showDetail && sideBySide ) showDetail = 1;
  zFrom = P("from");
  zTo = P("to");
  if( !sideBySide ){
    style_submenu_element("Side-by-side Diff", "sbsdiff",
                          "%R/vdiff?from=%T&to=%T&detail=%d&sbs=1",
                          zFrom, zTo, showDetail);
  }else{
    style_submenu_element("Unified Diff", "udiff",
                          "%R/vdiff?from=%T&to=%T&detail=%d&sbs=0",
                          zFrom, zTo, showDetail);
  }
  style_submenu_element("Invert", "invert",
                        "%R/vdiff?from=%T&to=%T&detail=%d&sbs=%d",
                        zTo, zFrom, showDetail, sideBySide);
  style_header("Check-in Differences");
  @ <h2>Difference From:</h2><blockquote>
  checkin_description(ridFrom);
  @ </blockquote><h2>To:</h2><blockquote>
  checkin_description(ridTo);
  @ </blockquote><hr /><p>