On 02/11/13 14:26, Marius Gedminas wrote:
On Fri, Nov 01, 2013 at 07:50:58AM -0700, ZyX wrote:
I recompiled vim with a DB_COUNT of 5, and that successfully worked to
diff five files. I suspect that the DB_COUNT limit can be raised
without difficulty. I suspect that with a bit of coding that the
DB_COUNT could be made arbitrary (ie. dependent upon how many files are
being requested for simultaneous diffing).
Absence of limit makes sense. Both 9 and 4 look like some magic
number. 4 was questioned by OP, I just added a question for 9.
I do not think though somebody is going to bother with memory
(de)allocation implied by removing the limit. But before increasing
limit to 9, 99 or INT_MAX one has to answer why. I do not see much
difference between 4 and 9: I never actually needed more then 3; and
even 3 diffed buffers are a bit confusing. Thus I would like to hear a
use-case that resulted in request to increase the limit.
I've once needed to diff five[*] very similar files[**]. I had to
rebuild vim after increasing that arbitrary limit, and then vimdiff
worked just fine.
[*] probably five, I don't remember the exact number, only that it was
more than vim's default limit
[**] they contained names of installed Debian packages from five
different computers, one per line
Marius Gedminas
Two is extremely common. Three or four (with common ancestor and/or
common descendant) are not unheard of. You showed a usecase for five,
and by analysing that usecase, it may be inferred that six or seven
should be possible, but that 100 would be too many to be expected in
practice. I suppose that exactly where to fix the limit leaves some room
for appreciation. Maybe it could be made into a compile-time option,
either hidden in src/feature.h (that would be a simple matter, moving
its define line from line 1731 of src/structs.h to some place in
src/feature.h where FEAT_DIFF is known to be defined, maybe between
lines 474 and 475; feature.h would then need to be #include'd in
structs.h (where it isn't; diff.c includes it via vim.h); or it could
even be added as a new configure argument, maybe something like
--with-diff-count=7 (the default remaining 4, I suppose) (but that would
mean delving into the configure scripts, which is something beyond my ken)..
Of course the maximum number should be "safely lower" than the maximum
number of file handles on the system where Vim is running, and by safely
I mean: so that neither Vim nor other programs running in parallel would
be made to run out of file handles.
My Mercurial configuration contains settings for quite a number of
external merge tools; I'm not sure where they all came from. Those for
Vim (unsurprisingly, I suppose) set four arguments but immediately
closes the last two buffers. I attached the relevant lines from the
output of "hg showconfig", after sorting, and with the Vim lines
repeated at the end. As you can see, none of the examples are for more
than 4 files. (By comparison to hgrc files, the part until the first dot
is the [section] name.)
But of course the capabilities of vimdiff must not be kept down to what
existing version-control software is known to require.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
39. You move into a new house and decide to Netscape before you landscape.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
merge-tools.UltraCompare.args=$base $local $other -title1 base -title3 other
merge-tools.UltraCompare.diffargs=$child $parent -title1 $clabel -title2
$plabel1
merge-tools.araxis.args=/3 /a2 /wait /merge /title1:"Other" /title2:"Base"
/title3:"Local :"$local $other $base $local $output
merge-tools.araxis.diffargs=/2 /wait /title1:"$plabel1" /title2:"$clabel"
$parent $child
merge-tools.bcompare.args=$local $other $base -mergeoutput=$output -ro
-lefttitle=parent1 -centertitle=base -righttitle=parent2 -outputtitle=merged
-automerge -reviewconflicts -solo
merge-tools.bcompare.diffargs=-lro -lefttitle='$plabel1' -righttitle='$clabel'
-solo -expandall $parent $child
merge-tools.beyondcompare3.args=$local $other $base $output /ro
/lefttitle=local /centertitle=base /righttitle=other /automerge
/reviewconflicts /solo
merge-tools.beyondcompare3.diffargs=/lro /lefttitle='$plabel1'
/righttitle='$clabel' /solo /expandall $parent $child
merge-tools.diffmerge.args=-nosplash -merge -title1=local -title2=merged
-title3=other $local $base $other -result=$output
merge-tools.diffmerge.diffargs=--nosplash --title1='$plabel1'
--title2='$clabel' $parent $child
merge-tools.diffuse.args=$local $base $other
merge-tools.diffuse.diffargs=$parent $child
merge-tools.ecmerge.args=$base $local $other --mode=merge3 --title0=base
--title1=local --title2=other --to=$output
merge-tools.ecmerge.diffargs=$parent $child --mode=diff2 --title1='$plabel1'
--title2='$clabel'
merge-tools.filemerge.args=-left $other -right $local -ancestor $base -merge
$output
merge-tools.gvimdiff.args=-f $base $local $output $other +close +close
merge-tools.kdiff3.args=--L1 base --L2 local --L3 other $base $local $other -o
$output
merge-tools.kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
merge-tools.meld.args=--label='local' $local --label='base' $base
--label='other' $other
merge-tools.meld.diffargs=-a --label='$plabel1' $parent --label='$clabel' $child
merge-tools.p4merge.args=$base $local $other $output
merge-tools.p4merge.diffargs=$parent $child
merge-tools.tkdiff.args=$local $other -a $base -o $output
merge-tools.tkdiff.diffargs=-L '$plabel1' $parent -L '$clabel' $child
merge-tools.tortoisemerge.args=/base:$base /mine:$local /theirs:$other
/merged:$output
merge-tools.tortoisemerge.diffargs=/base:$parent /mine:$child
/basename:'$plabel1' /minename:'$clabel'
merge-tools.vimdiff.args=$base $local $output $other +close +close
merge-tools.winmerge.args=/e /x /wl /ub /dl other /dr local $other $local
$output
merge-tools.winmerge.diffargs=/r /e /x /ub /wl /dl '$plabel1' /dr '$clabel'
$parent $child
merge-tools.xxdiff.args=--show-merged-pane --exit-with-merge-status --title1
local --title2 base --title3 other --merged-filename $output --merge $local
$base $other
merge-tools.xxdiff.diffargs=--title1 '$plabel1' $parent --title2 '$clabel'
$child
merge-tools.gvimdiff.args=-f $base $local $output $other +close +close
merge-tools.vimdiff.args=$base $local $output $other +close +close