︙ | | |
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
|
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
|
+
+
+
+
+
|
set ::eskil($top,mode) ""
set ::eskil($top,printFile) ""
set ::eskil($top,mergeFile) ""
set ::eskil($top,ancestorFile) ""
set ::eskil($top,conflictFile) ""
set ::eskil($top,limitlines) 0
set ::eskil($top,plugin) ""
# Copy the collected options from command line
foreach {item val} $::eskil(defaultopts) {
set ::eskil($top,$item) $val
}
}
# Create a new diff window and diff two files
proc newDiff {file1 file2 {range {}}} {
set top [makeDiffWin]
update
|
︙ | | |
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
|
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
|
+
|
# This can be used as an entry point if embedding eskil.
# In that case fill in ::eskil(argv) and ::eskil(argc) before calling.
proc parseCommandLine {} {
global dirdiff
set ::eskil(autoclose) 0
set ::eskil(ignorenewline) 0
set ::eskil(defaultopts) {}
if {$::eskil(argc) == 0} {
Init
return [makeDiffWin]
}
set allOpts {
|
︙ | | |
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
|
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
|
+
+
+
-
+
-
+
-
+
-
-
-
-
|
exit
}
set opts(plugin) $pinterp
set opts(pluginname) $plugin
set opts(plugininfo) $plugininfo
}
# Store the command line given opts
set ::eskil(defaultopts) [array get opts]
# Do we start in clip diff mode?
if {$doclip} {
return [makeClipDiffWin]
}
# Figure out if we start in a diff or dirdiff window.
set len [llength $files]
if {$len == 0 && $dodir} {
set dirdiff(leftDir) [pwd]
set dirdiff(rightDir) [pwd]
return [makeDirDiffWin opts]
return [makeDirDiffWin]
}
if {$len == 1} {
set fullname [lindex $files 0]
if {[FileIsDirectory $fullname 1]} {
set dirdiff(leftDir) $fullname
set dirdiff(rightDir) $dirdiff(leftDir)
return [makeDirDiffWin opts]
return [makeDirDiffWin]
}
} elseif {$len >= 2} {
set fullname1 [lindex $files 0]
set fullname2 [lindex $files 1]
if {[FileIsDirectory $fullname1 1] && [FileIsDirectory $fullname2 1]} {
set dirdiff(leftDir) $fullname1
set dirdiff(rightDir) $fullname2
return [makeDirDiffWin opts]
return [makeDirDiffWin]
}
}
# Ok, we have a normal diff
set top [makeDiffWin]
update
# Copy the previously collected options
foreach {item val} [array get opts] {
set ::eskil($top,$item) $val
}
# It is preferable to see the end if the rev string is too long
$::widgets($top,rev1) xview end
$::widgets($top,rev2) xview end
if {$doreview} {
set rev [detectRevSystem "" $preferedRev]
|
︙ | | |
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
|
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
|
-
-
-
-
|
foreach file $files {
if {$first} {
set first 0
} else {
# Create new window for other files
set top [makeDiffWin]
update
# Copy the previously collected options
foreach {item val} [array get opts] {
set ::eskil($top,$item) $val
}
# It is preferable to see the end if the rev string is too long
$::widgets($top,rev1) xview end
$::widgets($top,rev2) xview end
}
set fullname $file
set fulldir [file dirname $fullname]
if {$::eskil($top,mode) eq "conflict"} {
|
︙ | | |