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

Re: Fw: SVN: Diffs for removed directories

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-03-05 14:53:06 CET

John Szakmeister wrote:
> On Thursday 04 March 2004 11:05, Rene Rebe wrote:
>
>>according to the attached mail subversion (at least the client) seems
>>to have a problems including the diff of deleted files if the whole
>>directory is deleted.
>
> Hmm... these commands seem to work:
> svn diff -rN:BASE
> svn diff -rPREV:BASE
>
> These don't seem to:
> svn diff -rPREV:M
> svn diff -rN:M .
> svn diff -rN:M URL
>
> It apparently has something to do with the fact that once the diff routine
> hits a deleted directory, it doesn't go any further. For the commands that
> work, diff_file_deleted_with_diff() gets called for the missing files but
> diff_dir_deleted() doesn't get called. For the second set of commands, it's
> vice-versa.

Oh, dear. I think those diff internals are not as nicely factored as they could be. There are other inconsistencies in the output as well. I've been meaning to dig in and see what I can do.

> FWIW, diff -u doesn't produce diffs if a directory is missing.
[...]
> So, I'm not sure
> what the right interaction is here. Can patch handle removing directories?

'patch' can remove directories, but that's only partly relevant. We should certainly try to produce output that is, by default, as useful with "patch" as possible, which means we should produce diffs for deleted files. But in particular, we provide a "--no-diff-deleted" flag to suppress the output of diffs for deleted files, so, in the absence of this switch, we should produce such diffs.

The problem is that our "diff" is just not self-consistent, and I think we can justly call that a bug and fix it (even in version 1.0.1 if we want to do it that soon).

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 5 14:52:42 2004

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.