Fossil

Check-in [d4fea96a]
Login

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

Overview
Comment:Show "error" messages in Tk diff.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | diff-eolws
Files: files | file ages | folders
SHA1:d4fea96ad82d90ec727e8ef1a3b03251c6f450c3
User & Date: joel 2014-03-04 00:42:40
Context
2014-03-04
08:21
Don't ignore whitespace by default, except in annotations/blames. Add new "w" option to some Web UI pages, allowing to ignore whitespace (no buttons yet). check-in: 28b39cc5 user: jan.nijtmans tags: diff-eolws
00:42
Show "error" messages in Tk diff. check-in: d4fea96a user: joel tags: diff-eolws
2014-03-03
15:02
merge trunk check-in: b8e61d24 user: jan.nijtmans tags: diff-eolws
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diffcmd.c.

626
627
628
629
630
631
632

633
634
635
636
637
638
639
...
678
679
680
681
682
683
684


685

686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705


706
707
708
709
710
711
712
...
721
722
723
724
725
726
727





728
729
730
731
732
733
734
...
892
893
894
895
896
897
898

899
900
901
902
903
904
905
@   RM_BG      #ffc0c0
@   HR_FG      #888888
@   HR_PAD_TOP 4
@   HR_PAD_BTM 8
@   FN_BG      #444444
@   FN_FG      #ffffff
@   FN_PAD     5

@   PADX       5
@   WIDTH      80
@   HEIGHT     45
@   LB_HEIGHT  25
@ }
@
@ if {![namespace exists ttk]} {
................................................................................
@   while {[set line [getLine $difftxt $N ii]] != -1} {
@     set fn2 {}
@     if {![regexp {^=+ (.*?) =+ versus =+ (.*?) =+$} $line all fn fn2]
@      && ![regexp {^=+ (.*?) =+$} $line all fn]
@     } {
@       continue
@     }


@     if {[string compare -length 6 [getLine $difftxt $N ii] "<table"]} {

@       continue
@     }
@     incr nDiffs
@     set idx [expr {$nDiffs > 1 ? [.txtA index end] : "1.0"}]
@     .wfiles.lb insert end $fn
@
@     foreach c [cols] {
@       while {[getLine $difftxt $N ii] ne "<pre>"} continue
@
@       if {$nDiffs > 1} {
@         $c insert end \n -
@       }
@       if {[colType $c] eq "txt"} {
@         $c insert end $fn\n fn
@         if {$fn2!=""} {set fn $fn2}
@       } else {
@         $c insert end \n fn
@       }
@       $c insert end \n -
@


@       set type [colType $c]
@       set str {}
@       while {[set line [getLine $difftxt $N ii]] ne "</pre>"} {
@         set len [string length [dehtml $line]]
@         if {$len > $widths($type)} {
@           set widths($type) $len
@         }
................................................................................
@         if {$class ne ""} {
@           $c insert end [dehtml $pre] - [dehtml $mid] [list $class -]
@         } else {
@           $c insert end [dehtml $pre] -
@         }
@       }
@     }





@   }
@
@   foreach c [cols] {
@     set type [colType $c]
@     if {$type ne "txt"} {
@       $c config -width $widths($type)
@     }
................................................................................
@   catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5
@   foreach tag {add rm chng} {
@     $txt tag config $tag -background $CFG([string toupper $tag]_BG)
@     $txt tag lower $tag
@   }
@   $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \
@     -justify center

@ }
@ text .mkr
@
@ foreach c [cols] {
@   set keyPrefix [string toupper [colType $c]]_COL_
@   if {[tk windowingsystem] eq "win32"} {$c config -font {courier 9}}
@   $c config -bg $CFG(${keyPrefix}BG) -fg $CFG(${keyPrefix}FG) -borderwidth 0 \







>







 







>
>
|
>







<
<











>
>







 







>
>
>
>
>







 







>







626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
...
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696


697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
...
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
...
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
@   RM_BG      #ffc0c0
@   HR_FG      #888888
@   HR_PAD_TOP 4
@   HR_PAD_BTM 8
@   FN_BG      #444444
@   FN_FG      #ffffff
@   FN_PAD     5
@   ERR_FG     #ee0000
@   PADX       5
@   WIDTH      80
@   HEIGHT     45
@   LB_HEIGHT  25
@ }
@
@ if {![namespace exists ttk]} {
................................................................................
@   while {[set line [getLine $difftxt $N ii]] != -1} {
@     set fn2 {}
@     if {![regexp {^=+ (.*?) =+ versus =+ (.*?) =+$} $line all fn fn2]
@      && ![regexp {^=+ (.*?) =+$} $line all fn]
@     } {
@       continue
@     }
@     set errMsg ""
@     set line [getLine $difftxt $N ii]
@     if {[string compare -length 6 $line "<table"]
@      && ![regexp {<p[^>]*>(.+)} $line - errMsg]} {
@       continue
@     }
@     incr nDiffs
@     set idx [expr {$nDiffs > 1 ? [.txtA index end] : "1.0"}]
@     .wfiles.lb insert end $fn
@
@     foreach c [cols] {


@       if {$nDiffs > 1} {
@         $c insert end \n -
@       }
@       if {[colType $c] eq "txt"} {
@         $c insert end $fn\n fn
@         if {$fn2!=""} {set fn $fn2}
@       } else {
@         $c insert end \n fn
@       }
@       $c insert end \n -
@
@       if {$errMsg ne ""} continue
@       while {[getLine $difftxt $N ii] ne "<pre>"} continue
@       set type [colType $c]
@       set str {}
@       while {[set line [getLine $difftxt $N ii]] ne "</pre>"} {
@         set len [string length [dehtml $line]]
@         if {$len > $widths($type)} {
@           set widths($type) $len
@         }
................................................................................
@         if {$class ne ""} {
@           $c insert end [dehtml $pre] - [dehtml $mid] [list $class -]
@         } else {
@           $c insert end [dehtml $pre] -
@         }
@       }
@     }
@
@     if {$errMsg ne ""} {
@       foreach c {.txtA .txtB} {$c insert end [string trim $errMsg] err}
@       foreach c [cols] {$c insert end \n -}
@     }
@   }
@
@   foreach c [cols] {
@     set type [colType $c]
@     if {$type ne "txt"} {
@       $c config -width $widths($type)
@     }
................................................................................
@   catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5
@   foreach tag {add rm chng} {
@     $txt tag config $tag -background $CFG([string toupper $tag]_BG)
@     $txt tag lower $tag
@   }
@   $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \
@     -justify center
@   $txt tag config err -foreground $CFG(ERR_FG)
@ }
@ text .mkr
@
@ foreach c [cols] {
@   set keyPrefix [string toupper [colType $c]]_COL_
@   if {[tk windowingsystem] eq "win32"} {$c config -font {courier 9}}
@   $c config -bg $CFG(${keyPrefix}BG) -fg $CFG(${keyPrefix}FG) -borderwidth 0 \