Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Restructured dependencies in Makefile |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
365bb9b0a56b498a4d5106d03b620e8a |
User & Date: | peter 2015-03-19 23:36:58.645 |
Context
2015-03-20
| ||
21:59 | Optimise dirdiff vs SVN VFS. Handle some errors in VFS better. (Most of this change was mistakenly in previous commit) check-in: 80ddbb6d24 user: peter tags: trunk | |
2015-03-19
| ||
23:36 | Restructured dependencies in Makefile check-in: 365bb9b0a5 user: peter tags: trunk | |
23:06 | Fixed the debug backdoor. check-in: 8f9bb7ad97 user: peter tags: trunk | |
Changes
Changes to Makefile.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #---------------------------------------------------------------------- # Make file for Eskil #---------------------------------------------------------------------- VERSION = 27 # Path to the TclKits used for creating StarPacks. TCLKIT = /home/peter/tclkit/v85 TCLKIT_LINUX = $(TCLKIT)/tclkit-linux TCLKIT_SOLARIS = $(TCLKIT)/tclkit-solaris-sparc TCLKIT_WIN = $(TCLKIT)/tclkit-win32.upx.exe TCLKIT_MAC = $(TCLKIT)/tclkit-mac-863 | | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #---------------------------------------------------------------------- # Make file for Eskil #---------------------------------------------------------------------- VERSION = 27 # Path to the TclKits used for creating StarPacks. TCLKIT = /home/peter/tclkit/v85 TCLKIT_LINUX = $(TCLKIT)/tclkit-linux TCLKIT_SOLARIS = $(TCLKIT)/tclkit-solaris-sparc TCLKIT_WIN = $(TCLKIT)/tclkit-win32.upx.exe TCLKIT_MAC = $(TCLKIT)/tclkit-mac-863 # Paths to the libraries used. # If you do not have access to all these, you can get them from an Eskil kit # as explained below. TEXTSEARCH = /home/peter/src/textsearch DIFFUTIL = /home/peter/src/DiffUtilTcl/lib.vfs/DiffUtil WCB = /home/peter/src/packages/wcb3.4 PDF4TCL = /home/peter/src/pdf4tcl/pkg SNIT = /home/peter/src/packages/tcllib/modules/snit TABLELIST = /home/peter/src/packages/tablelist5.12.1 TWAPI = /home/peter/src/packages/twapi |
︙ | ︙ | |||
29 30 31 32 33 34 35 | SRCFILES = src/eskil.tcl src/clip.tcl src/dirdiff.tcl src/help.tcl src/map.tcl \ src/print.tcl src/registry.tcl src/rev.tcl src/debug.tcl \ src/compare.tcl src/merge.tcl src/printobj.tcl src/plugin.tcl \ src/vcsvfs.tcl #---------------------------------------------------------------- | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | | | | | | | | | | | | | | | | | < < < < < < | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | SRCFILES = src/eskil.tcl src/clip.tcl src/dirdiff.tcl src/help.tcl src/map.tcl \ src/print.tcl src/registry.tcl src/rev.tcl src/debug.tcl \ src/compare.tcl src/merge.tcl src/printobj.tcl src/plugin.tcl \ src/vcsvfs.tcl #---------------------------------------------------------------- # Build a dependency tree to other libs needed. # This is made in a parallell VFS structure, mimicking Eskil's. # Thus deps.vfs can also be created by downloading an Eskil kit, # rename it to "deps" and unwrap it with sdx. #---------------------------------------------------------------- deps.vfs/src/embedfont.ttf: @mkdir -p deps.vfs/src @cd deps.vfs/src ; ln -fs $(EMBEDFONT) embedfont.ttf deps.vfs/lib/wcb: @mkdir -p deps.vfs/lib cd deps.vfs/lib ; ln -s $(WCB) wcb deps.vfs/lib/textsearch: @mkdir -p deps.vfs/lib cd deps.vfs/lib ; ln -s $(TEXTSEARCH) textsearch deps.vfs/lib/diffutil: @mkdir -p deps.vfs/lib cd deps.vfs/lib ; ln -s $(DIFFUTIL) diffutil deps.vfs/lib/pdf4tcl: @mkdir -p deps.vfs/lib cd deps.vfs/lib ; ln -s $(PDF4TCL) pdf4tcl deps.vfs/lib/tkdnd: @mkdir -p deps.vfs/lib cd deps.vfs/lib ; ln -s $(TKDND) tkdnd deps.vfs/lib/tablelist: @mkdir -p deps.vfs/lib cd deps.vfs/lib ; ln -s $(TABLELIST) tablelist deps.vfs/lib/snit: @mkdir -p deps.vfs/lib/snit cd deps.vfs/lib/snit ; ln -s $(SNIT)/pkgIndex.tcl cd deps.vfs/lib/snit ; ln -s $(SNIT)/snit.tcl cd deps.vfs/lib/snit ; ln -s $(SNIT)/snit2.tcl cd deps.vfs/lib/snit ; ln -s $(SNIT)/main2.tcl cd deps.vfs/lib/snit ; ln -s $(SNIT)/main1.tcl cd deps.vfs/lib/snit ; ln -s $(SNIT)/validate.tcl #------------------------------------------------------------------ # Setup symbolic links from the VFS to the sources and dependencies #------------------------------------------------------------------ eskil.vfs/src/eskil.tcl: @mkdir -p eskil.vfs/src @cd eskil.vfs/src ; for i in $(SRCFILES); do ln -fs ../../$$i ; done eskil.vfs/src/images: @mkdir -p eskil.vfs/src @cd eskil.vfs/src ; ln -fs ../../src/images eskil.vfs/src/embedfont.ttf: deps.vfs/src/embedfont.ttf @mkdir -p eskil.vfs/src @cd eskil.vfs/src ; ln -fs ../../deps.vfs/src/embedfont.ttf @cd src ; ln -fs ../deps.vfs/src/embedfont.ttf eskil.vfs/examples: cd eskil.vfs ; ln -fs ../examples eskil.vfs/doc: cd eskil.vfs ; ln -fs ../doc eskil.vfs/plugins: cd eskil.vfs ; ln -fs ../plugins eskil.vfs/COPYING: cd eskil.vfs ; ln -fs ../COPYING eskil.vfs/lib/wcb: deps.vfs/lib/wcb cd eskil.vfs/lib ; ln -fs ../../deps.vfs/lib/wcb eskil.vfs/lib/textsearch: deps.vfs/lib/textsearch cd eskil.vfs/lib ; ln -fs ../../deps.vfs/lib/textsearch eskil.vfs/lib/diffutil: deps.vfs/lib/diffutil cd eskil.vfs/lib ; ln -fs ../../deps.vfs/lib/diffutil eskil.vfs/lib/pdf4tcl: deps.vfs/lib/pdf4tcl cd eskil.vfs/lib ; ln -fs ../../deps.vfs/lib/pdf4tcl eskil.vfs/lib/tkdnd: deps.vfs/lib/tkdnd cd eskil.vfs/lib ; ln -fs ../../deps.vfs/lib/tkdnd eskil.vfs/lib/tablelist: deps.vfs/lib/tablelist cd eskil.vfs/lib ; ln -fs ../../deps.vfs/lib/tablelist eskil.vfs/lib/snit: deps.vfs/lib/snit cd eskil.vfs/lib ; ln -fs ../../deps.vfs/lib/snit links: eskil.vfs/src/eskil.tcl \ eskil.vfs/src/images \ eskil.vfs/src/embedfont.ttf \ eskil.vfs/examples\ eskil.vfs/doc\ eskil.vfs/plugins\ |
︙ | ︙ |
Changes to src/dirdiff.tcl.
︙ | ︙ | |||
159 160 161 162 163 164 165 | if {![string equal $f1 $f2]} { set eq 0 } } if {$eq == 2 && (![eof $ch1] || ![eof $ch2])} { set eq 0 } | > | | | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | if {![string equal $f1 $f2]} { set eq 0 } } if {$eq == 2 && (![eof $ch1] || ![eof $ch2])} { set eq 0 } # Errors during close are not interesting catch {close $ch1} catch {close $ch2} } } return [expr {$eq != 0}] } # Returns the contents of a directory as a sorted list of full file paths. proc DirContents {dir} { |
︙ | ︙ | |||
287 288 289 290 291 292 293 294 295 296 297 298 299 300 | component tree component hsb component vsb option -leftdirvariable -default "" -configuremethod SetDirOption option -rightdirvariable -default "" -configuremethod SetDirOption option -statusvar -default "" variable AfterId "" variable PauseBgProcessing 0 variable ScheduledRestart 0 variable AfterTime 1 variable IdleQueue {} variable IdleQueueArr | > | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | component tree component hsb component vsb option -leftdirvariable -default "" -configuremethod SetDirOption option -rightdirvariable -default "" -configuremethod SetDirOption option -statusvar -default "" option -changelist -default "" variable AfterId "" variable PauseBgProcessing 0 variable ScheduledRestart 0 variable AfterTime 1 variable IdleQueue {} variable IdleQueueArr |
︙ | ︙ | |||
680 681 682 683 684 685 686 | if {[$tree rowattrib $node type] ne "directory"} { set sts [catch {$self UpdateFileNode $node} err] } else { set sts [catch {$self UpdateDirNode $node} err] } if {$sts} { | | > > > > | > | | > > > > | 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 717 718 719 720 721 722 723 | if {[$tree rowattrib $node type] ne "directory"} { set sts [catch {$self UpdateFileNode $node} err] } else { set sts [catch {$self UpdateDirNode $node} err] } if {$sts} { lappend errors $node $err break } # Work for at least 20 ms to keep things efficient set post [clock clicks -milliseconds] if {($post - $pre) > 20} break } #if {($post - $pre) > 1000} { #puts "[expr $post - $pre] ms for [$tree set $node leftfull]" #} # Update the status variable to track progress if {$options(-statusvar) ne ""} { upvar \#0 $options(-statusvar) statusvar } if {[llength $errors] > 0} { lassign $errors node err set leftfull [$tree rowattrib $node leftfull] set rightfull [$tree rowattrib $node rightfull] set answer [tk_messageBox -icon error -type abortretryignore \ -message \ "Error comparing\n$leftfull\nvs\n$rightfull:\n$err"] if {$answer eq "retry"} { $self AddNodeToIdle $node } elseif {$answer eq "ignore"} { # Do nothing, just continue } else { set statusvar "" set AfterId "" return } } if {[llength $IdleQueue] > 0} { |
︙ | ︙ | |||
777 778 779 780 781 782 783 784 785 786 787 788 789 790 | set rightfull [$tree rowattrib $node rightfull] $self CompareDirs $leftfull $rightfull $node } method UpdateFileNode {node} { set leftfull [$tree rowattrib $node leftfull] set rightfull [$tree rowattrib $node rightfull] set equal [CompareFiles $leftfull $rightfull] if {$equal} { $self SetNodeStatus $node equal } else { $self SetNodeStatus $node change } } | > > > > > > > > | 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | set rightfull [$tree rowattrib $node rightfull] $self CompareDirs $leftfull $rightfull $node } method UpdateFileNode {node} { set leftfull [$tree rowattrib $node leftfull] set rightfull [$tree rowattrib $node rightfull] if {[llength $options(-changelist)]} { if {$rightfull ni $options(-changelist)} { #puts "$rightfull equal since not in change list" $self SetNodeStatus $node equal return } #puts "$rightfull checked since in change list" } set equal [CompareFiles $leftfull $rightfull] if {$equal} { $self SetNodeStatus $node equal } else { $self SetNodeStatus $node change } } |
︙ | ︙ | |||
983 984 985 986 987 988 989 990 991 992 993 994 995 996 | wm title $win "Eskil Dir" wm protocol $win WM_DELETE_WINDOW [list cleanupAndExit $win] install tree using DirCompareTree $win.dc \ -leftdirvariable ::dirdiff(leftDir) \ -rightdirvariable ::dirdiff(rightDir) \ -statusvar [myvar statusVar] ttk::frame $win.fe1 ttk::frame $win.fe2 menu $win.m $hull configure -menu $win.m | > > > | 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 | wm title $win "Eskil Dir" wm protocol $win WM_DELETE_WINDOW [list cleanupAndExit $win] install tree using DirCompareTree $win.dc \ -leftdirvariable ::dirdiff(leftDir) \ -rightdirvariable ::dirdiff(rightDir) \ -statusvar [myvar statusVar] if {[info exists ::dirdiff(localChanges)]} { $tree configure -changelist $::dirdiff(localChanges) } ttk::frame $win.fe1 ttk::frame $win.fe2 menu $win.m $hull configure -menu $win.m |
︙ | ︙ | |||
1302 1303 1304 1305 1306 1307 1308 | if {$::dirdiff(leftDir) eq $::dirdiff(rightDir) && $::dirdiff(leftDir) ne ""} { set fullname $::dirdiff(leftDir) set type [detectRevSystem $fullname] # Is this a revision system with dirdiff support? if {[info commands eskil::rev::${type}::mount] ne ""} { # No -r given; fall back on current. | > > > > > > > > | | > | 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 | if {$::dirdiff(leftDir) eq $::dirdiff(rightDir) && $::dirdiff(leftDir) ne ""} { set fullname $::dirdiff(leftDir) set type [detectRevSystem $fullname] # Is this a revision system with dirdiff support? if {[info commands eskil::rev::${type}::mount] ne ""} { # No -r given; fall back on current. if {[llength $revs] == 0} { # Optimisation attempt for checkout vs latest, see if there # is a command to detect local changes if {[info commands eskil::rev::${type}::localChanges] ne ""} { set ::dirdiff(localChanges) \ [eskil::rev::${type}::localChanges $fullname] #puts "Local Changes detected:\n[join $::dirdiff(localChanges) \n]" } # All vcs with dirdiff support should know that _ means current set revs _ } set revs [eskil::rev::${type}::ParseRevs $fullname $revs] set rev1 [lindex $revs 0] set rev2 [lindex $revs 1] # A little "splash-screen" to show progress destroy .dirdiffX toplevel .dirdiffX |
︙ | ︙ |
Changes to src/rev.tcl.
︙ | ︙ | |||
259 260 261 262 263 264 265 266 267 268 269 270 271 272 | } } if {$old != ""} { cd $old } } # Get a SVN patch proc eskil::rev::SVN::getPatch {revs {files {}}} { set cmd [list exec svn diff] foreach rev $revs { # TODO: What happens in strange combinations ? if {[string match "*://*" $rev]} { | > > > > > > > > > > > > > > > > | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | } } if {$old != ""} { cd $old } } # List local changes in a checkout proc eskil::rev::SVN::localChanges {dir} { set old [pwd] cd $dir set info [exec svn status --ignore-externals -q] cd $old set changes {} foreach line [split $info \n] { set line [string trim $line] if {[regexp {\S+$} $line file]} { lappend changes [file join $dir $file] } } return $changes } # Get a SVN patch proc eskil::rev::SVN::getPatch {revs {files {}}} { set cmd [list exec svn diff] foreach rev $revs { # TODO: What happens in strange combinations ? if {[string match "*://*" $rev]} { |
︙ | ︙ | |||
825 826 827 828 829 830 831 | set Url [eskil::rev::SVN::LookForBranch $filename $rev] if {$Url ne ""} { set rev $atRev } } if {$rev eq "_"} { # Common name for current | | > | 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | set Url [eskil::rev::SVN::LookForBranch $filename $rev] if {$Url ne ""} { set rev $atRev } } if {$rev eq "_"} { # Common name for current #set rev [eskil::rev::SVN::GetCurrent $filename] set rev BASE } elseif {[string is integer -strict $rev] && $rev <= 0} { # Zero means current # A negative integer rev is a relative rev # Save a roundtrip to the server in the case where we # can start from current if {$Url eq "" && $rev >= -1} { set curr [eskil::rev::SVN::GetCurrent $filename] |
︙ | ︙ |