You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by au...@philips.com on 2004/07/22 11:22:08 UTC
SVN passes long file names including spaces the wrong way to an external
diffing engine?
I seem to have run into a minor bug in SVN which I would like to verify
with you guys before submitting it to the issue tracker:
Earlier, we ran into a problem [1] which seems to be caused by a severe
performance drop of the contextual diff engine on large files (around 8
MB) on a not so fast machine (1.7 GHz Pentium). In turn, this causes
SVN to drop the connection. Configuring SVN to use GNU diff and diff3
instead is supposed to provide a work-around (until the contextual diff
engine gets fixed) but makes us run into a slightly different problem.
GNU diff bails out with a not so descriptive error message which turns
out to already have been posted once before on this list [2]. I suspect
it is simply a matter of not properly passing on long file names under
Windows -- manually running the diff like 'diff \dev\some file \dev\some
other file' fails with the same message while running 'diff "\dev\some
file" "\dev\some other file"' works fine. I consider this to be a bug
because the file system allows spaces in file names and, with that, SVN
should be able to cope with them.
Digged shortly in the code and I suspect that inserting quotes on line
1670 and 1671 of subversion/libsvn_subr/io.c should help a lot.
However, since I can't get the thing to build properly on Windows, I
cannot try it and send a patch.
Auke
PS: It would be greatly appreciated if somebody with a working build on
Windows could send me his binaries when fixing this. (hint! ;-))
1. http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=14257
2. http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=29761
--
Auke Jilderda, Philips Research, Eindhoven, the Netherlands
e-mail: auke.jilderda@philips.com, phone: +31 40 2764870
http://pww.innersource.philips.com, http://pww.opensource.philips.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: SVN passes long file names including spaces the wrong way to
an external diffing engine?
Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-07-22 at 06:22, auke.jilderda@philips.com wrote:
> GNU diff bails out with a not so descriptive error message which turns
> out to already have been posted once before on this list [2]. I suspect
> it is simply a matter of not properly passing on long file names under
> Windows -- manually running the diff like 'diff \dev\some file \dev\some
> other file' fails with the same message while running 'diff "\dev\some
> file" "\dev\some other file"' works fine. I consider this to be a bug
> because the file system allows spaces in file names and, with that, SVN
> should be able to cope with them.
>
> Digged shortly in the code and I suspect that inserting quotes on line
> 1670 and 1671 of subversion/libsvn_subr/io.c should help a lot.
> However, since I can't get the thing to build properly on Windows, I
> cannot try it and send a patch.
Hi Auke...
Well, I added quotes around the arguments at those two places in the
code, rebuilt on win32, and guess what? 'svn diff --diff-cmd
c:\path\to\diff.exe' suddenly *stopped* working on files with spaces in
their name. And they were working just fine for me beforehand!
If you look at the code, notice that we're *not* invoking the external
diff process via a shell: the arguments are being directly passed to
the subprocess programmatically. So when I forcibly add quotes around
the args, the diff program is most likely looking for a file with
literal double-quote marks in its name!
So Mike Pilato and I think we're barking up the wrong tree here. Is it
possible that you just happen to be using an external diff.exe which
doesn't understand long filenames? Which diff.exe you using? Where did
you get it from? And maybe we can give you our own diff.exe binaries to
try instead?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org