You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Berlin <db...@dberlin.org> on 2005/11/04 15:56:38 UTC
Problem with diffing against schedule-delete files
The following sequence of steps:
svn co svn://gcc.gnu.org/svn/gcc/branches/sh-elf-4_1-branch
cd sh-elf-4_1-branch
svn merge -r106276:106279 svn://gcc.gnu.org/svn/gcc/trunk .
svn diff --old svn://gcc.gnu.org/svn/gcc/trunk/gcc --new gcc
will cause us to try to diff against a non-existence gcc/.cvsignore file
(both regular and external diff error out).
This happens on 1.4 and 1.3
This is because the delete_entry handler in libsvn_wc/diff.c used as a
editor callback doesn't check whether the wc entry it's diffing against
has
been schedule-delete'd, and if so, use the empty file.
Since this is a url->wc diff, this is the editor function used, NOT the
regular path through file_diff which would have handled this case.
There is no obvious way to drive this diff through a path that already
handles schedule_delete right.
The attached patch fixes it, which i'm committing and will nominate for
1.3.x.
[[[
Fix url->wc diff against schedule-delete files.
* subversion/libsvn_wc/diff.c
(delete_entry): If the entry is marked for deletion, use
the empty file.
]]]
Re: Problem with diffing against schedule-delete files
Posted by Branko Čibej <br...@xbc.nu>.
Daniel Berlin wrote:
> The following sequence of steps:
>
> svn co svn://gcc.gnu.org/svn/gcc/branches/sh-elf-4_1-branch
> cd sh-elf-4_1-branch
> svn merge -r106276:106279 svn://gcc.gnu.org/svn/gcc/trunk .
> svn diff --old svn://gcc.gnu.org/svn/gcc/trunk/gcc --new gcc
>
> will cause us to try to diff against a non-existence gcc/.cvsignore file
> (both regular and external diff error out).
>
> This happens on 1.4 and 1.3
>
> This is because the delete_entry handler in libsvn_wc/diff.c used as a
> editor callback doesn't check whether the wc entry it's diffing against
> has
> been schedule-delete'd, and if so, use the empty file.
>
> Since this is a url->wc diff, this is the editor function used, NOT the
> regular path through file_diff which would have handled this case.
> There is no obvious way to drive this diff through a path that already
> handles schedule_delete right.
>
> The attached patch fixes it, which i'm committing and will nominate for
> 1.3.x.
>
This was brought up on the GCC list, right?
+1 for 1.3, it's a trivial (and trivially correct) change.
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org