Fossil SCM

Add a shebang and an introductory comment to the script generated by the SaveAs button in the graphical diff. Update the change log to mention the SaveAs button.

drh 2014-02-27 17:51 trunk
Commit 8f65d49c253002df8c2e958a1eae3963c631a5ab
+3 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -909,10 +909,12 @@
909909
@ update idletasks
910910
@
911911
@ proc saveDiff {} {
912912
@ set fn [tk_getSaveFile]
913913
@ set out [open $fn wb]
914
+@ puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'"
915
+@ puts $out "# to see the graphical diff.\n#"
914916
@ puts $out "set fossilcmd {}"
915917
@ puts $out "set prog [list $::prog]"
916918
@ puts $out "set difftxt \173"
917919
@ foreach e $::difftxt {puts $out [list $e]}
918920
@ puts $out "\175"
@@ -920,11 +922,11 @@
920922
@ close $out
921923
@ }
922924
@ ::ttk::button .bb.quit -text {Quit} -command exit
923925
@ ::ttk::button .bb.save -text {Save As...} -command saveDiff
924926
@ pack .bb.quit -side left
925
-@ pack .bb.save -side left
927
+@ if {$fossilcmd!=""} {pack .bb.save -side left}
926928
@ pack .bb.files -side left
927929
@ grid rowconfigure . 1 -weight 1
928930
@ grid columnconfigure . 1 -weight 1
929931
@ grid columnconfigure . 4 -weight 1
930932
@ grid .bb -row 0 -columnspan 6
931933
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -909,10 +909,12 @@
909 @ update idletasks
910 @
911 @ proc saveDiff {} {
912 @ set fn [tk_getSaveFile]
913 @ set out [open $fn wb]
 
 
914 @ puts $out "set fossilcmd {}"
915 @ puts $out "set prog [list $::prog]"
916 @ puts $out "set difftxt \173"
917 @ foreach e $::difftxt {puts $out [list $e]}
918 @ puts $out "\175"
@@ -920,11 +922,11 @@
920 @ close $out
921 @ }
922 @ ::ttk::button .bb.quit -text {Quit} -command exit
923 @ ::ttk::button .bb.save -text {Save As...} -command saveDiff
924 @ pack .bb.quit -side left
925 @ pack .bb.save -side left
926 @ pack .bb.files -side left
927 @ grid rowconfigure . 1 -weight 1
928 @ grid columnconfigure . 1 -weight 1
929 @ grid columnconfigure . 4 -weight 1
930 @ grid .bb -row 0 -columnspan 6
931
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -909,10 +909,12 @@
909 @ update idletasks
910 @
911 @ proc saveDiff {} {
912 @ set fn [tk_getSaveFile]
913 @ set out [open $fn wb]
914 @ puts $out "#!/usr/bin/tclsh\n#\n# Run this script using 'tclsh' or 'wish'"
915 @ puts $out "# to see the graphical diff.\n#"
916 @ puts $out "set fossilcmd {}"
917 @ puts $out "set prog [list $::prog]"
918 @ puts $out "set difftxt \173"
919 @ foreach e $::difftxt {puts $out [list $e]}
920 @ puts $out "\175"
@@ -920,11 +922,11 @@
922 @ close $out
923 @ }
924 @ ::ttk::button .bb.quit -text {Quit} -command exit
925 @ ::ttk::button .bb.save -text {Save As...} -command saveDiff
926 @ pack .bb.quit -side left
927 @ if {$fossilcmd!=""} {pack .bb.save -side left}
928 @ pack .bb.files -side left
929 @ grid rowconfigure . 1 -weight 1
930 @ grid columnconfigure . 1 -weight 1
931 @ grid columnconfigure . 4 -weight 1
932 @ grid .bb -row 0 -columnspan 6
933
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,10 +1,12 @@
11
<title>Change Log</title>
22
33
<h2>Changes For Version 1.29 (as yet unreleased)</h2>
44
* Add the ability to display content and diffs for UTF16 text files
55
in the web interface.
6
+ * Add the "SaveAs..." button to the graphical diff display that results
7
+ from using the --tk option with the [/help/diff | fossil diff] command.
68
* Honor timezones in imports from git.
79
* The [/reports] page now requires Read ("o") permissions. The "byweek"
810
report now properly propagates the selected year through the event type
911
filter links.
1012
* The [/help/info | info command] now shows leaf status of the checkout.
1113
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,10 +1,12 @@
1 <title>Change Log</title>
2
3 <h2>Changes For Version 1.29 (as yet unreleased)</h2>
4 * Add the ability to display content and diffs for UTF16 text files
5 in the web interface.
 
 
6 * Honor timezones in imports from git.
7 * The [/reports] page now requires Read ("o") permissions. The "byweek"
8 report now properly propagates the selected year through the event type
9 filter links.
10 * The [/help/info | info command] now shows leaf status of the checkout.
11
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,10 +1,12 @@
1 <title>Change Log</title>
2
3 <h2>Changes For Version 1.29 (as yet unreleased)</h2>
4 * Add the ability to display content and diffs for UTF16 text files
5 in the web interface.
6 * Add the "SaveAs..." button to the graphical diff display that results
7 from using the --tk option with the [/help/diff | fossil diff] command.
8 * Honor timezones in imports from git.
9 * The [/reports] page now requires Read ("o") permissions. The "byweek"
10 report now properly propagates the selected year through the event type
11 filter links.
12 * The [/help/info | info command] now shows leaf status of the checkout.
13

Keyboard Shortcuts

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