[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Diff: null device instead of empty file? [was: svn commit: r17181 - trunk/subversion/libsvn_wc]

From: Michael Sinz <Michael.Sinz_at_sinz.org>
Date: 2005-11-07 19:09:57 CET

On 11/6/05, Branko Èibej <brane@xbc.nu> wrote:
> Julian Foad wrote:
[...]
> > to do so? And that's not a totally unfair comparison. Diff programs
> > are not all line-based stdin-reading text stream consumers.
> Any diff program we're able to call from SVN will know how to open a
> file. There's nothing special about opening NUL: on Windows; you simply
> pass "NUL:" to CreateFile or fopen or open or whatever, and it should
> Just Work. You have to make a special effort for it not to.

Well, maybe, but maybe not - one thing that I have done in the past
is to use mmap() like symantics to read large files. It makes the diff
operation just operations on a memory array and lets the VM system
do the optimal reading/paging/caching of the data.

Now, I don't know how/if the windows mmap() like behaviors work on
things like null: (/dev/null) but I could see this as a potential source of
problems.

(Not that I don't think that programs are broken if they can not read
or write to /dev/null, but sometimes they just are...)

--
Michael Sinz               Technology and Engineering Director/Consultant
"Starting Startups"                          mailto:Michael.Sinz@sinz.org
My place on the web                      http://www.sinz.org/Michael.Sinz
Received on Mon Nov 7 19:11:04 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.