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

Diffing schedule-deleted files - what's going on?

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-02-12 23:13:35 CET

Could anyone explain the rationale behind our treatment of
schedule-deleted files encountered during 'svn diff'? (I realise that
using 'rationale' and 'diff' in the same sentence may provoke some humour,
but presumably there is some reason for the current arrangement).

Specifically, we seem to treat such files as if they are empty, rather
than as if they are absent. This is rather strange, since diffs once
we commit will (of course) treat the file as absent.

A reproduction recipe is below, which should hopefully make things a
little clearer.

I'd like to fix repos-BASE diffs so that they don't have this odd
behaviour (and fix another bug in exactly the same area), but before I do
that, I'd like to understand what the correct behaviour for diffs against
WORKING is supposed to be, since that might affect the way I do this.

[DannyB, I've cc:d you because you committed the original regression test,
and so presumably you've got some idea about this.]

Regards,
Malcolm

rm -rf repo wc
svnadmin create repo
svn co file://`pwd`/repo wc

echo xxx > wc/foo
svn add wc/foo
svn ci wc -m log_r1

# Both of these show the file being added, as expected
svn diff -r0 wc
svn diff -r0:BASE wc

# Mark the file as schedule-deleted
svn rm wc/foo
# Now both of these show the addition of an empty file
# The repos->BASE one is definitely wrong, since changes in the
# WORKING tree should not affect diffs against BASE, but shouldn't the
# repos->WORKING diff show nothing? (The repository and WORKING trees
# are identical, after all.)
svn diff -r0 wc
svn diff -r0:BASE wc

# By way of justification, a repos->WORKING diff shouldn't change due
# to a commit. Both of these show no output, of course.
svn ci wc -m log_msg
svn diff -r0 wc
svn diff -r0:BASE wc

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 12 23:14:16 2006

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.