Fossil

Check-in [39d146166a]
Login

Check-in [39d146166a]

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

Overview
Comment:Add 'binary' query parameter to the 'vpatch' web page.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | vpatch-binary
Files: files | file ages | folders
SHA3-256: 39d146166adf02231bb8190929b64db6859d6a513c2581eac0ec4965f8cbda87
User & Date: mistachkin 2019-09-30 16:11:42.797
Context
2019-09-30
16:11
Add 'binary' query parameter to the 'vpatch' web page. ... (Closed-Leaf check-in: 39d146166a user: mistachkin tags: vpatch-binary)
16:08
Update custom Makefile for MinGW. ... (check-in: 161958a49b user: mistachkin tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/diffcmd.c.
960
961
962
963
964
965
966





967
968
969
970
971
972

973
974
975
976
977
978
979
    fossil_free(pFileDir);
  }
}

/*
** WEBPAGE: vpatch
** URL: /vpatch?from=FROM&to=TO





**
** Show a patch that goes from check-in FROM to check-in TO.
*/
void vpatch_page(void){
  const char *zFrom = P("from");
  const char *zTo = P("to");

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  if( zFrom==0 || zTo==0 ) fossil_redirect_home();

  cgi_set_content_type("text/plain");
  diff_two_versions(zFrom, zTo, 0, 0, 0, DIFF_VERBOSE, 0);
}







>
>
>
>
>






>





|

960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
    fossil_free(pFileDir);
  }
}

/*
** WEBPAGE: vpatch
** URL: /vpatch?from=FROM&to=TO
**
** Query parameters:
**
**   binary=1        Attempt to compute diff for binary files as well.
**
**
** Show a patch that goes from check-in FROM to check-in TO.
*/
void vpatch_page(void){
  const char *zFrom = P("from");
  const char *zTo = P("to");
  const char *zBinary = P("binary");
  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
  if( zFrom==0 || zTo==0 ) fossil_redirect_home();

  cgi_set_content_type("text/plain");
  diff_two_versions(zFrom, zTo, 0, 0, zBinary!=0, DIFF_VERBOSE, 0);
}