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

Re: diff error? url@rev against local mods -- was: Re: diff_repos_wc question

From: Neels J Hofmeyr <neels_at_elego.de>
Date: Fri, 10 Oct 2008 03:06:46 +0200

Julian Foad wrote:
> On Sun, 2008-10-05 at 04:17 +0200, Neels J Hofmeyr wrote:
>>> Karl Fogel wrote:
>>>> "Neels J. Hofmeyr" <neels_at_elego.de> writes:
>>>>> Let me rephrase that:
>>>>>
>>>>> Is it currently possible to do a diff between
>>>>> URL_at_REV
>>>>> and
>>>>> an unrelated[1] working copy with local mods
>>>>> , and if yes, how?
>>>>> [1] unrelated, as in not of the same URL.
>>>> $ cd svn_trunk_working_copy
>>>> $ echo "This is a local mod." >> README
>>>> $ svn diff --old=http://svn.collab.net/repos/svn/trunk/INSTALL@33019 --new=README
>>>>
>>>> -Karl
>>> Ah, thanks for that. I was quite unlucky (cough) to have missed that
>>> combination.
>>>
>>> Alas, it looks like julianf and me found a case where `svn diff' reports
>>> wrongly. (It is a crucial diff case for implementing directory comparison
>>> for tree-conflicts.)
>>>
>>> I've attached test scripts and an output screenshot when using current trunk.
>>>
>>> "Create two similar trees, but leave some of the changes uncommitted in
>>> the second tree. Then diff the url of the first to the working copy of
>>> the second tree."
> [...]
>>> When reading the "Results" in the output, note that
> [...]
>>> 2) the other local change (the file addition of `baz') is sort of not seen
>>> by diff and reported as if baz was missing in `--new' (wrong).
>
> Sadly, there are several cases of "svn diff" that are just broken. This
> appears to be one of them.
>
>>> 3) Also, the diff is sort of ambiguous about reporting the file name:
>>> Which is it, quux/baz or foo/baz?
>>> "--- quux/baz (.../file:///arch/elego/svn/test/repos/foo/baz) (revision 2)"
>
> Yes, it's broken there too, though of course these header lines are
> unimportant for our purposes.
>
>>> Is this really an error or am I still missing something?
>
> It's really an error.
>
> Can you maybe add a test for it, and/or file an issue, and/or fix it, or
> just ignore this case, while still writing the directory compare thing?

Filed issue #3295,
committed diff_tests.py 49 "diff URL against working copy with local mods"

For issue #1675,
committed diff_tests.py 50 "diff -r1 of removed file to its local addition"

-- 
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696  mobile: +49 177 2345869  fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

Received on 2008-10-10 03:08:21 CEST

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.