1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
|
$win.m.md add checkbutton -label "Console" -variable consolestate \
-onvalue show -offvalue hide -command {console $consolestate}
$win.m.md add separator
}
$win.m.md add command -label "Reread Source" -underline 0 \
-command {EskilRereadSource}
$win.m.md add separator
$win.m.md add command -label "Redraw Window" -command {makeDirDiffWin 1}
}
ttk::button $win.bu -image $::img(upup) -command [mymethod UpDir] \
-underline 0
addBalloon $win.bu "Up in both."
bind $win <Alt-u> "$win.bu invoke"
|
|
|
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
|
$win.m.md add checkbutton -label "Console" -variable consolestate \
-onvalue show -offvalue hide -command {console $consolestate}
$win.m.md add separator
}
$win.m.md add command -label "Reread Source" -underline 0 \
-command {EskilRereadSource}
$win.m.md add separator
$win.m.md add command -label "Redraw Window" -command {makeDirDiffWin}
}
ttk::button $win.bu -image $::img(upup) -command [mymethod UpDir] \
-underline 0
addBalloon $win.bu "Up in both."
bind $win <Alt-u> "$win.bu invoke"
|
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
|
grid $top.l1 $top.e1 -sticky we
grid $top.l2 $top.e2 -sticky we
grid columnconfigure $top 1 -weight 1
grid rowconfigure $top 2 -weight 1
}
proc makeDirDiffWin {{redraw 0}} {
if {![info exists ::dirdiff(leftDir)]} {
set ::dirdiff(leftDir) ""
}
if {![info exists ::dirdiff(rightDir)]} {
set ::dirdiff(rightDir) ""
}
destroy .dirdiff
DirDiff .dirdiff
return .dirdiff
}
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
|
grid $top.l1 $top.e1 -sticky we
grid $top.l2 $top.e2 -sticky we
grid columnconfigure $top 1 -weight 1
grid rowconfigure $top 2 -weight 1
}
proc makeDirDiffWin {{optsName {}}} {
if {$optsName ne ""} {
upvar 1 $optsName opts
} else {
array set opts {}
}
if {![info exists ::dirdiff(leftDir)]} {
set ::dirdiff(leftDir) ""
}
if {![info exists ::dirdiff(rightDir)]} {
set ::dirdiff(rightDir) ""
}
# Experiment to support -r for directory diff
# Currently only Fossil is supported
if {[info exists opts(doptrev1)] && $opts(doptrev1) ne ""} {
set fullname $::dirdiff(leftDir)
if {[detectRevSystem $fullname] eq "FOSSIL"} {
set revs [list $opts(doptrev1)]
if {[info exists opts(doptrev2)] && $opts(doptrev2) ne ""} {
lappend revs $opts(doptrev2)
}
set revs [eskil::rev::FOSSIL::ParseRevs $fullname $revs]
set rev1 [lindex $revs 0]
set rev2 [lindex $revs 1]
set d1 [vcsvfs::fossil::mount $fullname $rev1]
set ::dirdiff(leftDir) $d1
if {$rev2 ne ""} {
set d2 [vcsvfs::fossil::mount $fullname $rev2]
set ::dirdiff(rightDir) $d2
}
}
}
destroy .dirdiff
DirDiff .dirdiff
return .dirdiff
}
|