Fossil SCM

Bug fix in the previous check-in for the "--tk" option on the "3-way-merge" command.

drh 2024-12-04 18:57 trunk
Commit d6fa91fdc843d732d3484da27055a5b959fddb6b117e079fff2ac2b69cc67209
2 files changed +2 -9 +3 -2
+2 -9
--- src/merge.tcl
+++ src/merge.tcl
@@ -109,11 +109,11 @@
109109
fconfigure $in -encoding utf-8
110110
set mergetxt [read $in]
111111
close $in
112112
} msg]} {
113113
tk_messageBox -message "Unable to run command: \"$cmd\""
114
- return
114
+ set mergetxt {}
115115
}
116116
foreach c [cols] {
117117
$c config -state normal
118118
$c delete 1.0 end
119119
}
@@ -265,16 +265,10 @@
265265
disableSync x
266266
$col xview moveto [expr {$first*[xvis $col]/($last-$first)}]
267267
foreach side {A B C D} {
268268
set sb .sbx$side
269269
set xview [.txt$side xview]
270
-# if {[lindex $xview 0] > 0 || [lindex $xview 1] < 1} {
271
-# grid $sb
272
-# eval $sb set $xview
273
-# } else {
274
-# grid remove $sb
275
-# }
276270
}
277271
enableSync x
278272
}
279273
280274
proc sync-y {first last} {
@@ -431,11 +425,10 @@
431425
::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
432426
::ttk::scrollbar .sbxC -command {.txtC xview} -orient horizontal
433427
::ttk::scrollbar .sbxD -command {.txtD xview} -orient horizontal
434428
frame .spacer
435429
436
-readMerge
437430
update idletasks
438431
439432
proc searchOnOff {} {
440433
if {[info exists ::search]} {
441434
unset ::search
@@ -534,9 +527,9 @@
534527
grid .sby -row 2 -column 8 -sticky ns
535528
grid .sbxA -row 3 -column 1 -sticky ew
536529
grid .sbxB -row 3 -column 3 -sticky ew
537530
grid .sbxC -row 3 -column 5 -sticky ew
538531
grid .sbxD -row 3 -column 7 -sticky ew
539
-
532
+readMerge
540533
541534
.spacer config -height [winfo height .sbxA]
542535
wm deiconify .
543536
--- src/merge.tcl
+++ src/merge.tcl
@@ -109,11 +109,11 @@
109 fconfigure $in -encoding utf-8
110 set mergetxt [read $in]
111 close $in
112 } msg]} {
113 tk_messageBox -message "Unable to run command: \"$cmd\""
114 return
115 }
116 foreach c [cols] {
117 $c config -state normal
118 $c delete 1.0 end
119 }
@@ -265,16 +265,10 @@
265 disableSync x
266 $col xview moveto [expr {$first*[xvis $col]/($last-$first)}]
267 foreach side {A B C D} {
268 set sb .sbx$side
269 set xview [.txt$side xview]
270 # if {[lindex $xview 0] > 0 || [lindex $xview 1] < 1} {
271 # grid $sb
272 # eval $sb set $xview
273 # } else {
274 # grid remove $sb
275 # }
276 }
277 enableSync x
278 }
279
280 proc sync-y {first last} {
@@ -431,11 +425,10 @@
431 ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
432 ::ttk::scrollbar .sbxC -command {.txtC xview} -orient horizontal
433 ::ttk::scrollbar .sbxD -command {.txtD xview} -orient horizontal
434 frame .spacer
435
436 readMerge
437 update idletasks
438
439 proc searchOnOff {} {
440 if {[info exists ::search]} {
441 unset ::search
@@ -534,9 +527,9 @@
534 grid .sby -row 2 -column 8 -sticky ns
535 grid .sbxA -row 3 -column 1 -sticky ew
536 grid .sbxB -row 3 -column 3 -sticky ew
537 grid .sbxC -row 3 -column 5 -sticky ew
538 grid .sbxD -row 3 -column 7 -sticky ew
539
540
541 .spacer config -height [winfo height .sbxA]
542 wm deiconify .
543
--- src/merge.tcl
+++ src/merge.tcl
@@ -109,11 +109,11 @@
109 fconfigure $in -encoding utf-8
110 set mergetxt [read $in]
111 close $in
112 } msg]} {
113 tk_messageBox -message "Unable to run command: \"$cmd\""
114 set mergetxt {}
115 }
116 foreach c [cols] {
117 $c config -state normal
118 $c delete 1.0 end
119 }
@@ -265,16 +265,10 @@
265 disableSync x
266 $col xview moveto [expr {$first*[xvis $col]/($last-$first)}]
267 foreach side {A B C D} {
268 set sb .sbx$side
269 set xview [.txt$side xview]
 
 
 
 
 
 
270 }
271 enableSync x
272 }
273
274 proc sync-y {first last} {
@@ -431,11 +425,10 @@
425 ::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
426 ::ttk::scrollbar .sbxC -command {.txtC xview} -orient horizontal
427 ::ttk::scrollbar .sbxD -command {.txtD xview} -orient horizontal
428 frame .spacer
429
 
430 update idletasks
431
432 proc searchOnOff {} {
433 if {[info exists ::search]} {
434 unset ::search
@@ -534,9 +527,9 @@
527 grid .sby -row 2 -column 8 -sticky ns
528 grid .sbxA -row 3 -column 1 -sticky ew
529 grid .sbxB -row 3 -column 3 -sticky ew
530 grid .sbxC -row 3 -column 5 -sticky ew
531 grid .sbxD -row 3 -column 7 -sticky ew
532 readMerge
533
534 .spacer config -height [winfo height .sbxA]
535 wm deiconify .
536
+3 -2
--- src/merge3.c
+++ src/merge3.c
@@ -811,12 +811,13 @@
811811
}else{
812812
nContext = atoi(zCnt);
813813
if( nContext<0 ) nContext = 0xfffffff;
814814
}
815815
blob_zero(&script);
816
- blob_appendf(&script, "set fossilcmd {| \"%/\" %s -tcl -c %d",
817
- g.nameOfExe, zSubCmd, nContext);
816
+ blob_appendf(&script, "set ncontext %d\n", nContext);
817
+ blob_appendf(&script, "set fossilcmd {| \"%/\" %s -tcl",
818
+ g.nameOfExe, zSubCmd);
818819
find_option("tcl",0,0);
819820
find_option("debug",0,0);
820821
zTclsh = find_option("tclsh",0,1);
821822
if( zTclsh==0 ){
822823
zTclsh = db_get("tclsh",0);
823824
--- src/merge3.c
+++ src/merge3.c
@@ -811,12 +811,13 @@
811 }else{
812 nContext = atoi(zCnt);
813 if( nContext<0 ) nContext = 0xfffffff;
814 }
815 blob_zero(&script);
816 blob_appendf(&script, "set fossilcmd {| \"%/\" %s -tcl -c %d",
817 g.nameOfExe, zSubCmd, nContext);
 
818 find_option("tcl",0,0);
819 find_option("debug",0,0);
820 zTclsh = find_option("tclsh",0,1);
821 if( zTclsh==0 ){
822 zTclsh = db_get("tclsh",0);
823
--- src/merge3.c
+++ src/merge3.c
@@ -811,12 +811,13 @@
811 }else{
812 nContext = atoi(zCnt);
813 if( nContext<0 ) nContext = 0xfffffff;
814 }
815 blob_zero(&script);
816 blob_appendf(&script, "set ncontext %d\n", nContext);
817 blob_appendf(&script, "set fossilcmd {| \"%/\" %s -tcl",
818 g.nameOfExe, zSubCmd);
819 find_option("tcl",0,0);
820 find_option("debug",0,0);
821 zTclsh = find_option("tclsh",0,1);
822 if( zTclsh==0 ){
823 zTclsh = db_get("tclsh",0);
824

Keyboard Shortcuts

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