Fossil

Check-in [d6fa91fdc8]
Login

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

Overview
Comment:Bug fix in the previous check-in for the "--tk" option on the "3-way-merge" command.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d6fa91fdc843d732d3484da27055a5b959fddb6b117e079fff2ac2b69cc67209
User & Date: drh 2024-12-04 18:57:47.865
Context
2024-12-04
19:25
Fix rendering of merge information that contains "N" entries followed by "S". check-in: 2ec8a7ae38 user: drh tags: trunk
18:57
Bug fix in the previous check-in for the "--tk" option on the "3-way-merge" command. check-in: d6fa91fdc8 user: drh tags: trunk
18:49
Improved controls at the top of the --tk merge information GUI. check-in: f8932be5aa user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/merge.tcl.
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
  if {[catch {
    set in [open $cmd r]
    fconfigure $in -encoding utf-8
    set mergetxt [read $in]
    close $in
  } msg]} {
    tk_messageBox -message "Unable to run command: \"$cmd\""
    return
  }
  foreach c [cols] {
    $c config -state normal
    $c delete 1.0 end
  }
  set lnA 1
  set lnB 1







|







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
  if {[catch {
    set in [open $cmd r]
    fconfigure $in -encoding utf-8
    set mergetxt [read $in]
    close $in
  } msg]} {
    tk_messageBox -message "Unable to run command: \"$cmd\""
    set mergetxt {}
  }
  foreach c [cols] {
    $c config -state normal
    $c delete 1.0 end
  }
  set lnA 1
  set lnB 1
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282

proc sync-x {col first last} {
  disableSync x
  $col xview moveto [expr {$first*[xvis $col]/($last-$first)}]
  foreach side {A B C D} {
    set sb .sbx$side
    set xview [.txt$side xview]
#    if {[lindex $xview 0] > 0 || [lindex $xview 1] < 1} {
#      grid $sb
#      eval $sb set $xview
#    } else {
#      grid remove $sb
#    }
  }
  enableSync x
}

proc sync-y {first last} {
  disableSync y
  foreach c [cols] {







<
<
<
<
<
<







263
264
265
266
267
268
269






270
271
272
273
274
275
276

proc sync-x {col first last} {
  disableSync x
  $col xview moveto [expr {$first*[xvis $col]/($last-$first)}]
  foreach side {A B C D} {
    set sb .sbx$side
    set xview [.txt$side xview]






  }
  enableSync x
}

proc sync-y {first last} {
  disableSync y
  foreach c [cols] {
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
::ttk::scrollbar .sby -command {.txtA yview} -orient vertical
::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal
::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
::ttk::scrollbar .sbxC -command {.txtC xview} -orient horizontal
::ttk::scrollbar .sbxD -command {.txtD xview} -orient horizontal
frame .spacer

readMerge
update idletasks

proc searchOnOff {} {
  if {[info exists ::search]} {
    unset ::search
    .txtA tag remove search 1.0 end
    .txtB tag remove search 1.0 end







<







423
424
425
426
427
428
429

430
431
432
433
434
435
436
::ttk::scrollbar .sby -command {.txtA yview} -orient vertical
::ttk::scrollbar .sbxA -command {.txtA xview} -orient horizontal
::ttk::scrollbar .sbxB -command {.txtB xview} -orient horizontal
::ttk::scrollbar .sbxC -command {.txtC xview} -orient horizontal
::ttk::scrollbar .sbxD -command {.txtD xview} -orient horizontal
frame .spacer


update idletasks

proc searchOnOff {} {
  if {[info exists ::search]} {
    unset ::search
    .txtA tag remove search 1.0 end
    .txtB tag remove search 1.0 end
532
533
534
535
536
537
538
539
540
541
542
grid .nameD -row 1 -column 7 -sticky ew
eval grid [cols] -row 2 -sticky nsew
grid .sby -row 2 -column 8 -sticky ns
grid .sbxA -row 3 -column 1 -sticky ew
grid .sbxB -row 3 -column 3 -sticky ew
grid .sbxC -row 3 -column 5 -sticky ew
grid .sbxD -row 3 -column 7 -sticky ew


.spacer config -height [winfo height .sbxA]
wm deiconify .







|



525
526
527
528
529
530
531
532
533
534
535
grid .nameD -row 1 -column 7 -sticky ew
eval grid [cols] -row 2 -sticky nsew
grid .sby -row 2 -column 8 -sticky ns
grid .sbxA -row 3 -column 1 -sticky ew
grid .sbxB -row 3 -column 3 -sticky ew
grid .sbxC -row 3 -column 5 -sticky ew
grid .sbxD -row 3 -column 7 -sticky ew
readMerge

.spacer config -height [winfo height .sbxA]
wm deiconify .
Changes to src/merge3.c.
809
810
811
812
813
814
815

816
817
818
819
820
821
822
823
824
  if( zCnt==0 ){
    nContext = 6;
  }else{
    nContext = atoi(zCnt);
    if( nContext<0 ) nContext = 0xfffffff;
  }
  blob_zero(&script);

  blob_appendf(&script, "set fossilcmd {| \"%/\" %s -tcl -c %d",
               g.nameOfExe, zSubCmd, nContext);
  find_option("tcl",0,0);
  find_option("debug",0,0);
  zTclsh = find_option("tclsh",0,1);
  if( zTclsh==0 ){
    zTclsh = db_get("tclsh",0);
  }
  /* The undocumented --script FILENAME option causes the Tk script to







>
|
|







809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
  if( zCnt==0 ){
    nContext = 6;
  }else{
    nContext = atoi(zCnt);
    if( nContext<0 ) nContext = 0xfffffff;
  }
  blob_zero(&script);
  blob_appendf(&script, "set ncontext %d\n", nContext);
  blob_appendf(&script, "set fossilcmd {| \"%/\" %s -tcl",
               g.nameOfExe, zSubCmd);
  find_option("tcl",0,0);
  find_option("debug",0,0);
  zTclsh = find_option("tclsh",0,1);
  if( zTclsh==0 ){
    zTclsh = db_get("tclsh",0);
  }
  /* The undocumented --script FILENAME option causes the Tk script to