Fossil SCM
Fix rendering of merge information that contains "N" entries followed by "S".
Commit
2ec8a7ae388d06794de6a41d3b686e73dcdd726e05fd08d71cbc43a083a49656
Parent
d6fa91fdc843d73…
1 file changed
+44
-8
+44
-8
| --- src/merge.tcl | ||
| +++ src/merge.tcl | ||
| @@ -154,53 +154,53 @@ | ||
| 154 | 154 | .txtA insert end [string range $A 1 end]\n $dtag |
| 155 | 155 | } |
| 156 | 156 | if {$key2=="."} { |
| 157 | 157 | .lnB insert end \n - |
| 158 | 158 | .txtB insert end \n $dtag |
| 159 | + } elseif {$key2=="N"} { | |
| 160 | + .nameB config -text [string range $B 1 end] | |
| 159 | 161 | } else { |
| 160 | 162 | .lnB insert end $lnB\n - |
| 161 | 163 | incr lnB |
| 162 | 164 | if {$key4=="2"} {set tag chng} {set tag $dtag} |
| 163 | 165 | if {$key2=="1"} { |
| 164 | 166 | .txtB insert end [string range $A 1 end]\n $tag |
| 165 | - } elseif {$key2=="N"} { | |
| 166 | - .nameB config -text [string range $B 1 end] | |
| 167 | 167 | } else { |
| 168 | 168 | .txtB insert end [string range $B 1 end]\n $tag |
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | if {$key3=="."} { |
| 172 | 172 | .lnC insert end \n - |
| 173 | 173 | .txtC insert end \n $dtag |
| 174 | + } elseif {$key3=="N"} { | |
| 175 | + .nameC config -text [string range $C 1 end] | |
| 174 | 176 | } else { |
| 175 | 177 | .lnC insert end $lnC\n - |
| 176 | 178 | incr lnC |
| 177 | 179 | if {$key4=="3"} {set tag add} {set tag $dtag} |
| 178 | 180 | if {$key3=="1"} { |
| 179 | 181 | .txtC insert end [string range $A 1 end]\n $tag |
| 180 | 182 | } elseif {$key3=="2"} { |
| 181 | 183 | .txtC insert end [string range $B 1 end]\n chng |
| 182 | - } elseif {$key3=="N"} { | |
| 183 | - .nameC config -text [string range $C 1 end] | |
| 184 | - } else { | |
| 184 | + } else { | |
| 185 | 185 | .txtC insert end [string range $C 1 end]\n $tag |
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | if {$key4=="." || $key4=="X"} { |
| 189 | 189 | .lnD insert end \n - |
| 190 | 190 | .txtD insert end \n $dtag |
| 191 | + } elseif {$key4=="N"} { | |
| 192 | + .nameD config -text [string range $D 1 end] | |
| 191 | 193 | } else { |
| 192 | 194 | .lnD insert end $lnD\n - |
| 193 | 195 | incr lnD |
| 194 | 196 | if {$key4=="1"} { |
| 195 | 197 | .txtD insert end [string range $A 1 end]\n - |
| 196 | 198 | } elseif {$key4=="2"} { |
| 197 | 199 | .txtD insert end [string range $B 1 end]\n chng |
| 198 | 200 | } elseif {$key4=="3"} { |
| 199 | 201 | .txtD insert end [string range $C 1 end]\n add |
| 200 | - } elseif {$key4=="N"} { | |
| 201 | - .nameD config -text [string range $D 1 end] | |
| 202 | 202 | } else { |
| 203 | 203 | .txtD insert end [string range $D 1 end]\n - |
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | 206 | } |
| @@ -377,13 +377,49 @@ | ||
| 377 | 377 | bind .wfiles.lb <Motion> { |
| 378 | 378 | %W selection clear 0 end |
| 379 | 379 | %W selection set @%x,%y |
| 380 | 380 | } |
| 381 | 381 | } |
| 382 | + | |
| 382 | 383 | label .bb.ctxtag -text "Context:" |
| 383 | -tk_optionMenu .bb.ctx ncontext 3 6 12 25 40 100 All | |
| 384 | +set context_choices {3 6 12 25 50 100 All} | |
| 385 | +if {$ncontext<0} {set ncontext All} | |
| 384 | 386 | trace add variable ncontext write readMerge |
| 387 | +::ttk::menubutton .bb.ctx -text $ncontext | |
| 388 | +if {[tk windowingsystem] eq "win32"} { | |
| 389 | + ::ttk::style theme use winnative | |
| 390 | + .bb.ctx configure -padding {20 1 10 2} | |
| 391 | +} | |
| 392 | +toplevel .wctx | |
| 393 | +wm withdraw .wctx | |
| 394 | +update idletasks | |
| 395 | +wm transient .wctx . | |
| 396 | +wm overrideredirect .wctx 1 | |
| 397 | +listbox .wctx.lb -width 0 -height 7 -activestyle none | |
| 398 | +.wctx.lb insert end {*}$context_choices | |
| 399 | +pack .wctx.lb | |
| 400 | +bind .bb.ctx <1> { | |
| 401 | + set x [winfo rootx %W] | |
| 402 | + set y [expr {[winfo rooty %W]+[winfo height %W]}] | |
| 403 | + wm geometry .wctx +$x+$y | |
| 404 | + wm deiconify .wctx | |
| 405 | + focus .wctx.lb | |
| 406 | +} | |
| 407 | +bind .wctx <FocusOut> {wm withdraw .wctx} | |
| 408 | +bind .wctx <Escape> {focus .} | |
| 409 | +foreach evt {1 Return} { | |
| 410 | + bind .wctx.lb <$evt> { | |
| 411 | + set ::ncontext [lindex $::context_choices [%W curselection]] | |
| 412 | + .bb.ctx config -text $::ncontext | |
| 413 | + focus . | |
| 414 | + break | |
| 415 | + } | |
| 416 | +} | |
| 417 | +bind .wctx.lb <Motion> { | |
| 418 | + %W selection clear 0 end | |
| 419 | + %W selection set @%x,%y | |
| 420 | +} | |
| 385 | 421 | |
| 386 | 422 | foreach {side syncCol} {A .txtB B .txtA C .txtC D .txtD} { |
| 387 | 423 | set ln .ln$side |
| 388 | 424 | text $ln |
| 389 | 425 | $ln tag config - -justify right |
| 390 | 426 |
| --- src/merge.tcl | |
| +++ src/merge.tcl | |
| @@ -154,53 +154,53 @@ | |
| 154 | .txtA insert end [string range $A 1 end]\n $dtag |
| 155 | } |
| 156 | if {$key2=="."} { |
| 157 | .lnB insert end \n - |
| 158 | .txtB insert end \n $dtag |
| 159 | } else { |
| 160 | .lnB insert end $lnB\n - |
| 161 | incr lnB |
| 162 | if {$key4=="2"} {set tag chng} {set tag $dtag} |
| 163 | if {$key2=="1"} { |
| 164 | .txtB insert end [string range $A 1 end]\n $tag |
| 165 | } elseif {$key2=="N"} { |
| 166 | .nameB config -text [string range $B 1 end] |
| 167 | } else { |
| 168 | .txtB insert end [string range $B 1 end]\n $tag |
| 169 | } |
| 170 | } |
| 171 | if {$key3=="."} { |
| 172 | .lnC insert end \n - |
| 173 | .txtC insert end \n $dtag |
| 174 | } else { |
| 175 | .lnC insert end $lnC\n - |
| 176 | incr lnC |
| 177 | if {$key4=="3"} {set tag add} {set tag $dtag} |
| 178 | if {$key3=="1"} { |
| 179 | .txtC insert end [string range $A 1 end]\n $tag |
| 180 | } elseif {$key3=="2"} { |
| 181 | .txtC insert end [string range $B 1 end]\n chng |
| 182 | } elseif {$key3=="N"} { |
| 183 | .nameC config -text [string range $C 1 end] |
| 184 | } else { |
| 185 | .txtC insert end [string range $C 1 end]\n $tag |
| 186 | } |
| 187 | } |
| 188 | if {$key4=="." || $key4=="X"} { |
| 189 | .lnD insert end \n - |
| 190 | .txtD insert end \n $dtag |
| 191 | } else { |
| 192 | .lnD insert end $lnD\n - |
| 193 | incr lnD |
| 194 | if {$key4=="1"} { |
| 195 | .txtD insert end [string range $A 1 end]\n - |
| 196 | } elseif {$key4=="2"} { |
| 197 | .txtD insert end [string range $B 1 end]\n chng |
| 198 | } elseif {$key4=="3"} { |
| 199 | .txtD insert end [string range $C 1 end]\n add |
| 200 | } elseif {$key4=="N"} { |
| 201 | .nameD config -text [string range $D 1 end] |
| 202 | } else { |
| 203 | .txtD insert end [string range $D 1 end]\n - |
| 204 | } |
| 205 | } |
| 206 | } |
| @@ -377,13 +377,49 @@ | |
| 377 | bind .wfiles.lb <Motion> { |
| 378 | %W selection clear 0 end |
| 379 | %W selection set @%x,%y |
| 380 | } |
| 381 | } |
| 382 | label .bb.ctxtag -text "Context:" |
| 383 | tk_optionMenu .bb.ctx ncontext 3 6 12 25 40 100 All |
| 384 | trace add variable ncontext write readMerge |
| 385 | |
| 386 | foreach {side syncCol} {A .txtB B .txtA C .txtC D .txtD} { |
| 387 | set ln .ln$side |
| 388 | text $ln |
| 389 | $ln tag config - -justify right |
| 390 |
| --- src/merge.tcl | |
| +++ src/merge.tcl | |
| @@ -154,53 +154,53 @@ | |
| 154 | .txtA insert end [string range $A 1 end]\n $dtag |
| 155 | } |
| 156 | if {$key2=="."} { |
| 157 | .lnB insert end \n - |
| 158 | .txtB insert end \n $dtag |
| 159 | } elseif {$key2=="N"} { |
| 160 | .nameB config -text [string range $B 1 end] |
| 161 | } else { |
| 162 | .lnB insert end $lnB\n - |
| 163 | incr lnB |
| 164 | if {$key4=="2"} {set tag chng} {set tag $dtag} |
| 165 | if {$key2=="1"} { |
| 166 | .txtB insert end [string range $A 1 end]\n $tag |
| 167 | } else { |
| 168 | .txtB insert end [string range $B 1 end]\n $tag |
| 169 | } |
| 170 | } |
| 171 | if {$key3=="."} { |
| 172 | .lnC insert end \n - |
| 173 | .txtC insert end \n $dtag |
| 174 | } elseif {$key3=="N"} { |
| 175 | .nameC config -text [string range $C 1 end] |
| 176 | } else { |
| 177 | .lnC insert end $lnC\n - |
| 178 | incr lnC |
| 179 | if {$key4=="3"} {set tag add} {set tag $dtag} |
| 180 | if {$key3=="1"} { |
| 181 | .txtC insert end [string range $A 1 end]\n $tag |
| 182 | } elseif {$key3=="2"} { |
| 183 | .txtC insert end [string range $B 1 end]\n chng |
| 184 | } else { |
| 185 | .txtC insert end [string range $C 1 end]\n $tag |
| 186 | } |
| 187 | } |
| 188 | if {$key4=="." || $key4=="X"} { |
| 189 | .lnD insert end \n - |
| 190 | .txtD insert end \n $dtag |
| 191 | } elseif {$key4=="N"} { |
| 192 | .nameD config -text [string range $D 1 end] |
| 193 | } else { |
| 194 | .lnD insert end $lnD\n - |
| 195 | incr lnD |
| 196 | if {$key4=="1"} { |
| 197 | .txtD insert end [string range $A 1 end]\n - |
| 198 | } elseif {$key4=="2"} { |
| 199 | .txtD insert end [string range $B 1 end]\n chng |
| 200 | } elseif {$key4=="3"} { |
| 201 | .txtD insert end [string range $C 1 end]\n add |
| 202 | } else { |
| 203 | .txtD insert end [string range $D 1 end]\n - |
| 204 | } |
| 205 | } |
| 206 | } |
| @@ -377,13 +377,49 @@ | |
| 377 | bind .wfiles.lb <Motion> { |
| 378 | %W selection clear 0 end |
| 379 | %W selection set @%x,%y |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | label .bb.ctxtag -text "Context:" |
| 384 | set context_choices {3 6 12 25 50 100 All} |
| 385 | if {$ncontext<0} {set ncontext All} |
| 386 | trace add variable ncontext write readMerge |
| 387 | ::ttk::menubutton .bb.ctx -text $ncontext |
| 388 | if {[tk windowingsystem] eq "win32"} { |
| 389 | ::ttk::style theme use winnative |
| 390 | .bb.ctx configure -padding {20 1 10 2} |
| 391 | } |
| 392 | toplevel .wctx |
| 393 | wm withdraw .wctx |
| 394 | update idletasks |
| 395 | wm transient .wctx . |
| 396 | wm overrideredirect .wctx 1 |
| 397 | listbox .wctx.lb -width 0 -height 7 -activestyle none |
| 398 | .wctx.lb insert end {*}$context_choices |
| 399 | pack .wctx.lb |
| 400 | bind .bb.ctx <1> { |
| 401 | set x [winfo rootx %W] |
| 402 | set y [expr {[winfo rooty %W]+[winfo height %W]}] |
| 403 | wm geometry .wctx +$x+$y |
| 404 | wm deiconify .wctx |
| 405 | focus .wctx.lb |
| 406 | } |
| 407 | bind .wctx <FocusOut> {wm withdraw .wctx} |
| 408 | bind .wctx <Escape> {focus .} |
| 409 | foreach evt {1 Return} { |
| 410 | bind .wctx.lb <$evt> { |
| 411 | set ::ncontext [lindex $::context_choices [%W curselection]] |
| 412 | .bb.ctx config -text $::ncontext |
| 413 | focus . |
| 414 | break |
| 415 | } |
| 416 | } |
| 417 | bind .wctx.lb <Motion> { |
| 418 | %W selection clear 0 end |
| 419 | %W selection set @%x,%y |
| 420 | } |
| 421 | |
| 422 | foreach {side syncCol} {A .txtB B .txtA C .txtC D .txtD} { |
| 423 | set ln .ln$side |
| 424 | text $ln |
| 425 | $ln tag config - -justify right |
| 426 |