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

Re: svn commit: r17190 - trunk/subversion/libsvn_wc

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-11-05 00:26:46 CET

dberlin@tigris.org writes:

> Author: dberlin
> Date: Fri Nov 4 10:04:56 2005
> New Revision: 17190
>
> Modified:
> trunk/subversion/libsvn_wc/diff.c
>
> Log:
> 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.
>
>
>
> Modified: trunk/subversion/libsvn_wc/diff.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_wc/diff.c?rev=17190&p1=trunk/subversion/libsvn_wc/diff.c&p2=trunk/subversion/libsvn_wc/diff.c&r1=17189&r2=17190
> ==============================================================================
> --- trunk/subversion/libsvn_wc/diff.c (original)
> +++ trunk/subversion/libsvn_wc/diff.c Fri Nov 4 10:04:56 2005
> @@ -855,6 +855,8 @@
> the empty file against the current working copy. If
> 'reverse_order' is set, then show a deletion. */
>
> + if (entry->schedule == svn_wc_schedule_delete)
> + SVN_ERR (get_empty_file (pb->edit_baton, &full_path));
> SVN_ERR (get_local_mimetypes (&pristine_mimetype, &working_mimetype,
> NULL, adm_access, full_path, pool));

Is that the right thing to do? It doesn't have a regression test so
I'm not sure what behaviour you are trying to achieve.

$ svnadmin create repo
$ svn co file://`pwd`/repo wc
$ echo xxx > wc/foo
$ svn add wc/foo
$ svn ci -m "" wc
$ svn rm wc/foo
$ svn diff -r0 wc

Before your change I get

$ svn diff -r0 wc
../svn/subversion/libsvn_subr/io.c:2219: (apr_err=2)
svn: Can't open file 'wc/foo': No such file or directory

that's obviously a bug, with you change I get

$ svn diff -r0 wc
Index: /tmp/tmp
===================================================================
Index: wc/foo
===================================================================
--- wc/foo (revision 0)
+++ wc/foo (working copy)
@@ -1 +0,0 @@
-xxx

It's that really the correct output? There are two diffs: first an
empty diff, the /tmp/tmp part, and then a second diff, the wc/foo
part, that represents the local change. I suppose it's better than it
was, but I'm not sure it's correct.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 5 00:27:28 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.