Eskil

Check-in [e37b52eb4e]
Login

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

Overview
Comment:Added -excludedir and -excludefile options for dir diff.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e37b52eb4ea245f04602994df81c381a8e0ca4780e805f118009d7d78e1b6744
User & Date: peter 2017-12-22 00:22:23.595
Context
2017-12-28
16:56
Pause before a large file in dirdiff processing to make it clear where it is slowed down. check-in: 0bf5b9f746 user: peter tags: trunk
2017-12-22
00:22
Added -excludedir and -excludefile options for dir diff. check-in: e37b52eb4e user: peter tags: trunk
2017-12-16
01:11
Make sure Dir Diff can pick one out of many plugins. Dir Diff no longer shortcuts for files with same size&mtime. check-in: 689940e052 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Changes.



1
2
3
4
5
6
7



2017-12-16
 Make sure plugins are applied in the right order.
 Make sure Dir Diff can pick one out of many plugins.
 Dir Diff no longer shortcuts for files with same size&mtime.

2017-12-13
 Use same font in commit window as in diff window.
>
>
>







1
2
3
4
5
6
7
8
9
10
2017-12-22
 Added -excludedir and -excludefile options for dir diff.

2017-12-16
 Make sure plugins are applied in the right order.
 Make sure Dir Diff can pick one out of many plugins.
 Dir Diff no longer shortcuts for files with same size&mtime.

2017-12-13
 Use same font in commit window as in diff window.
Changes to htdocs/changes.wiki.
1
2
3
4



5

6
7
8
9
10
11
12
<title>Changes</title>

Upcoming changes (not yet released):




  *  None yet...


Changes in v2.8.0 (2017-12-05):

  *  Handle multiple plugins.
  *  Upgraded DiffUtil to 0.4.0 which is significantly faster for large files.
  *  Default pivot is now 10. Added GUI choise for pivot 1.





>
>
>
|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<title>Changes</title>

Upcoming changes (not yet released):

  *  Repaired plugins for directory diff (broken by multi plugin in 2.8.0).
  *  Added -excludedir and -excludefile options for directory diff.
  *  Handle GIT revisions better for directory diff.
  *  Support -nocase in directory diff.
  *  Directory diff no longer shortcuts for files with same size&mtime.

Changes in v2.8.0 (2017-12-05):

  *  Handle multiple plugins.
  *  Upgraded DiffUtil to 0.4.0 which is significantly faster for large files.
  *  Default pivot is now 10. Added GUI choise for pivot 1.

Changes to src/startup.tcl.
521
522
523
524
525
526
527









528
529
530
531
532
533
534
proc addPrefOpt {name elem {validator ""}} {
    dict set ::eskil(opts) $name ""
    dict set ::eskil(opts,info) $name $::eskil(defoptinfo)
    dict set ::eskil(opts,info) $name type Pref
    dict set ::eskil(opts,info) $name "elem" $elem
    dict set ::eskil(opts,info) $name "validator" $validator
}









# Add a vaildator command to an Opt
proc addValidator {name cmd} {
    dict set ::eskil(opts,info) $name validator $cmd
}
# Add a filter command prefix to an Opt
proc addFilter {name cmd} {
    dict set ::eskil(opts,info) $name filter $cmd







>
>
>
>
>
>
>
>
>







521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
proc addPrefOpt {name elem {validator ""}} {
    dict set ::eskil(opts) $name ""
    dict set ::eskil(opts,info) $name $::eskil(defoptinfo)
    dict set ::eskil(opts,info) $name type Pref
    dict set ::eskil(opts,info) $name "elem" $elem
    dict set ::eskil(opts,info) $name "validator" $validator
}
# Add a command line option that takes multiple values and stores in Pref
proc addPrefMultOpt {name elem {validator ""}} {
    dict set ::eskil(opts) $name ""
    dict set ::eskil(opts,info) $name $::eskil(defoptinfo)
    dict set ::eskil(opts,info) $name type Pref
    dict set ::eskil(opts,info) $name "elem" $elem
    dict set ::eskil(opts,info) $name "validator" $validator
    dict set ::eskil(opts,info) $name multi 1
}
# Add a vaildator command to an Opt
proc addValidator {name cmd} {
    dict set ::eskil(opts,info) $name validator $cmd
}
# Add a filter command prefix to an Opt
proc addFilter {name cmd} {
    dict set ::eskil(opts,info) $name filter $cmd
597
598
599
600
601
602
603



604
605

606

607
608
609
610
611
612
613
    if {$cmd ne ""} {
        uplevel 1 $cmd
    }

    set type [dict get $::eskil(opts,info) $arg type]
    switch $type {
        Pref {



            set ::Pref([dict get $::eskil(opts,info) $arg elem]) $val
        }

        Opts {

            upvar 1 opts _xx
            set _xx([dict get $::eskil(opts,info) $arg elem]) $val
        }
    }
    dict set ::eskil(opts,info) $arg given 1
}
proc optGet {arg} {







>
>
>
|
|
>

>







606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
    if {$cmd ne ""} {
        uplevel 1 $cmd
    }

    set type [dict get $::eskil(opts,info) $arg type]
    switch $type {
        Pref {
            if {[dict get $::eskil(opts,info) $arg multi]} {
                lappend ::Pref([dict get $::eskil(opts,info) $arg elem]) $val
            } else {
                set ::Pref([dict get $::eskil(opts,info) $arg elem]) $val
            }
        }
        Opts {
            # Does not support multi yet
            upvar 1 opts _xx
            set _xx([dict get $::eskil(opts,info) $arg elem]) $val
        }
    }
    dict set ::eskil(opts,info) $arg given 1
}
proc optGet {arg} {
734
735
736
737
738
739
740





741
742
743
744
745
746
747
    docFlag -printHeaderSize   "Font size for page header (10)"
    docFlag -printCharsPerLine "Adapt font size for this line length and wrap (80)"
    docFlag -printPaper       "Select paper size (a4)"
    docFlag -printColorChange "Color for change (1.0 0.7 0.7)"
    docFlag -printColorOld    "Color for old text (0.7 1.0 0.7)"
    docFlag -printColorNew    "Color for new text (0.8 0.8 1.0)"
    docFlag -printFont "Select font to use in PDF, afm or ttf. If <fontfile> is given as \"Courier\", PDF built in font is used"





    addMultOpt -prefix
    docFlag    -prefix "Care mainly about words starting with \"str\""
    addMultOpt -preprocess
    addMultOpt -preprocessleft
    addMultOpt -preprocessright
    docFlag    -preprocess  "TBW <pair>"
    docFlag    -preprocessleft  "TBW <pair>"







>
>
>
>
>







748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
    docFlag -printHeaderSize   "Font size for page header (10)"
    docFlag -printCharsPerLine "Adapt font size for this line length and wrap (80)"
    docFlag -printPaper       "Select paper size (a4)"
    docFlag -printColorChange "Color for change (1.0 0.7 0.7)"
    docFlag -printColorOld    "Color for old text (0.7 1.0 0.7)"
    docFlag -printColorNew    "Color for new text (0.8 0.8 1.0)"
    docFlag -printFont "Select font to use in PDF, afm or ttf. If <fontfile> is given as \"Courier\", PDF built in font is used"
    addPrefMultOpt -excludedir dir,exdirs
    docFlag    -excludedir "Exclude from directory diff"
    addPrefMultOpt -excludefile dir,exfiles
    docFlag    -excludefile "Exclude from directory diff"
    # These affect Pref but via special processing later
    addMultOpt -prefix
    docFlag    -prefix "Care mainly about words starting with \"str\""
    addMultOpt -preprocess
    addMultOpt -preprocessleft
    addMultOpt -preprocessright
    docFlag    -preprocess  "TBW <pair>"
    docFlag    -preprocessleft  "TBW <pair>"
783
784
785
786
787
788
789



790
791
792
793
794
795
796
            set match [lsearch -glob -all -inline $allOpts $arg*]
        } else {
            set match [list $arg]
        }
        puts [lsort -dictionary $match]
        exit
    }




    # Go through and fill in options
    set files {}
    for {set i 0} {$i < [llength $::eskil(argv)]} {incr i} {
        set arg [lindex $::eskil(argv) $i]
        # Non-dash means not an option
        if {[string index $arg 0] ne "-"} {







>
>
>







802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
            set match [lsearch -glob -all -inline $allOpts $arg*]
        } else {
            set match [list $arg]
        }
        puts [lsort -dictionary $match]
        exit
    }

    # Local opts array that some flags puts their info in.
    array set opts {}

    # Go through and fill in options
    set files {}
    for {set i 0} {$i < [llength $::eskil(argv)]} {incr i} {
        set arg [lindex $::eskil(argv) $i]
        # Non-dash means not an option
        if {[string index $arg 0] ne "-"} {