Fossil

Check-in [544d2213]
Login

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

Overview
Comment:Enhance the --tk option on diff so that it works with special characters (like "\" and "}") in the filename.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:544d22139da66d98f857dbd0149dff036b7dc213
User & Date: drh 2014-04-03 13:37:23
Context
2014-04-03
15:14
Add support for hex (0x), octal (0o) and binary (0b) integers, just as Tcl. Adapted from patch provided by Sergei Gavrikov. check-in: 1f6734c3 user: jan.nijtmans tags: trunk
13:37
Enhance the --tk option on diff so that it works with special characters (like "\" and "}") in the filename. check-in: 544d2213 user: drh tags: trunk
07:05
Fix highlight algorithm when used in combination with "Ignore Whitespace" check-in: c23190a6 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diffcmd.c.

1022
1023
1024
1025
1026
1027
1028




1029
1030


1031
1032
1033
1034
1035
1036
1037
      ** for testing and debugging. */
      if( strglob("*-script",z) && i<g.argc-1 ){
        i++;
        zTempFile = g.argv[i];
        continue;
      }
    }




    blob_append(&script, " ", 1);
    shell_escape(&script, z);


  }
  blob_appendf(&script, "}\n%s", zDiffScript);
  if( zTempFile ){
    blob_write_to_file(&script, zTempFile);
    fossil_print("To see diff, run: tclsh \"%s\"\n", zTempFile);
  }else{
#if defined(FOSSIL_ENABLE_TCL)







>
>
>
>
|
<
>
>







1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033

1034
1035
1036
1037
1038
1039
1040
1041
1042
      ** for testing and debugging. */
      if( strglob("*-script",z) && i<g.argc-1 ){
        i++;
        zTempFile = g.argv[i];
        continue;
      }
    }
    if( sqlite3_strglob("*}*",z) ){
      blob_appendf(&script, " {%/}", z);
    }else{
      int j;
      blob_append(&script, " ", 1);

      for(j=0; z[j]; j++) blob_appendf(&script, "\\%03o", (unsigned char)z[j]);
    }
  }
  blob_appendf(&script, "}\n%s", zDiffScript);
  if( zTempFile ){
    blob_write_to_file(&script, zTempFile);
    fossil_print("To see diff, run: tclsh \"%s\"\n", zTempFile);
  }else{
#if defined(FOSSIL_ENABLE_TCL)