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

Re: BUG(?): "svn diff" behaves incorrectly on symbolic links pointing to binary files

From: <kfogel_at_collab.net>
Date: 2005-06-14 19:51:12 CEST

Philip Martin <philip@codematters.co.uk> writes:
> Really? So what is the correct behaviour? Are you suggesting that
> the client uses the svn:mime-type of the link destination rather than
> the link itself? What happens if the destination is not versioned?

It hadn't occurred to me that it mattered if the destination is
versioned. The method I was envisioning was:

When running 'svn diff' on a link, determine the textyness of the
link target on the fly, using the same svn_io_detect_mimetype() method
that we use at add/import time, and do not show the diff if the target
is not texty.

But now that you mention it, we should treat versioned destinations
differently from unversioned ones. If the dest is versioned, then
just determine textyness by examining the file's properties as usual;
if it's unversioned, then follow the above recipe.

> How did you reproduce the bug anyway?
>
> $ svnadmin create repo
> $ svn co file://`pwd`/repo wc
> Checked out revision 0.
> $ cp /bin/ls wc/dst
> $ svn add wc/dst
> A (bin) wc/dst
> $ ln -sf dst wc/src
> $ svn add wc/src
> A wc/src
> $ svn diff wc
> Index: wc/src
> ===================================================================
> --- wc/src (revision 0)
> +++ wc/src (revision 0)
> @@ -0,0 +1 @@
> +link dst
> \ No newline at end of file
>
> Property changes on: wc/src
> ___________________________________________________________________
> Name: svn:special
> + *
>
> Index: wc/dst
> ===================================================================
> Cannot display: file marked as a binary type.
> svn:mime-type = application/octet-stream
>
> Property changes on: wc/dst
> ___________________________________________________________________
> Name: svn:executable
> + *
> Name: svn:mime-type
> + application/octet-stream

Well -- hmmm, and that would seem to be the recipe implied in the
original report, too. Vincent? Can you reproduce this bug with
Subversion 1.2 or with head of trunk?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 14 20:34:10 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.