Fossil SCM

For the --tk option to the diff command, invoke "tclsh" instead of "wish" and invoke "package require Tk" at the beginning of the script.

drh 2012-09-26 13:52 trunk
Commit aba451e9d52e3087b77b50a062f3024c9b1e590e
1 file changed +2 -1
+2 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -477,10 +477,11 @@
477477
}
478478
479479
/* A Tcl/Tk script used to render diff output.
480480
*/
481481
static const char zDiffScript[] =
482
+@ package require Tk
482483
@ wm withdraw .
483484
@ wm title . {Fossil Diff}
484485
@ wm iconname . {Fossil Diff}
485486
@ set body {}
486487
@ set mx 80 ;# Length of the longest line of text
@@ -537,11 +538,11 @@
537538
for(i=2; i<g.argc; i++){
538539
blob_appendf(&script, " \"%s\"", g.argv[i]);
539540
}
540541
blob_appendf(&script, "}\n%s", zDiffScript);
541542
zTempFile = write_blob_to_temp_file(&script);
542
- zCmd = mprintf("wish \"%s\"", zTempFile);
543
+ zCmd = mprintf("tclsh \"%s\"", zTempFile);
543544
fossil_system(zCmd);
544545
file_delete(zTempFile);
545546
}
546547
547548
/*
548549
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -477,10 +477,11 @@
477 }
478
479 /* A Tcl/Tk script used to render diff output.
480 */
481 static const char zDiffScript[] =
 
482 @ wm withdraw .
483 @ wm title . {Fossil Diff}
484 @ wm iconname . {Fossil Diff}
485 @ set body {}
486 @ set mx 80 ;# Length of the longest line of text
@@ -537,11 +538,11 @@
537 for(i=2; i<g.argc; i++){
538 blob_appendf(&script, " \"%s\"", g.argv[i]);
539 }
540 blob_appendf(&script, "}\n%s", zDiffScript);
541 zTempFile = write_blob_to_temp_file(&script);
542 zCmd = mprintf("wish \"%s\"", zTempFile);
543 fossil_system(zCmd);
544 file_delete(zTempFile);
545 }
546
547 /*
548
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -477,10 +477,11 @@
477 }
478
479 /* A Tcl/Tk script used to render diff output.
480 */
481 static const char zDiffScript[] =
482 @ package require Tk
483 @ wm withdraw .
484 @ wm title . {Fossil Diff}
485 @ wm iconname . {Fossil Diff}
486 @ set body {}
487 @ set mx 80 ;# Length of the longest line of text
@@ -537,11 +538,11 @@
538 for(i=2; i<g.argc; i++){
539 blob_appendf(&script, " \"%s\"", g.argv[i]);
540 }
541 blob_appendf(&script, "}\n%s", zDiffScript);
542 zTempFile = write_blob_to_temp_file(&script);
543 zCmd = mprintf("tclsh \"%s\"", zTempFile);
544 fossil_system(zCmd);
545 file_delete(zTempFile);
546 }
547
548 /*
549

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button