You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Rene Rebe <re...@gmx.de> on 2004/03/04 16:05:47 UTC

Fw: SVN: Diffs for removed directories

Hi all,

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.

Sincerely yours,
  René Rebe
    - ROCK Linux stable release maintainer

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene@rocklinux-consulting.de
http://www.rocklinux.org http://www.rocklinux-consulting.de
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene



Re: Fw: SVN: Diffs for removed directories

Posted by kf...@collab.net.
Ben Reser <be...@reser.org> writes:
> Yes but I don't think it's going ot happen for 1.0.1.  Which releases
> tomorrow.

Friday now, actually.  Sorry, my fault for not re-threading the post
that proposed that -- some people saw it and some didn't.  (I've still
gone ahead and changed the status page, etc, since I doubt anyone
would object, given the number of changes going in.)

-Karl


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Fw: SVN: Diffs for removed directories

Posted by Ben Reser <be...@reser.org>.
On Fri, Mar 05, 2004 at 01:53:06PM +0000, Julian Foad wrote:
> '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.

I agree with this.

> 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).

Yes but I don't think it's going ot happen for 1.0.1.  Which releases
tomorrow.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Fw: SVN: Diffs for removed directories

Posted by John Szakmeister <jo...@szakmeister.net>.
On Friday 05 March 2004 08:53, Julian Foad wrote:
[snip]
> > 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.

Agreed.

> 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).

I'm not going to be able to get to this before 1.0.1.  I hope to have a little 
time over the weekend to get some things done though, so maybe for 1.0.2.  
Work has been getting the best of me lately, so I've had little time in the 
evenings for the fun stuff like Subversion. :-)  I'm hoping that situation 
goes away soon.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Fw: SVN: Diffs for removed directories

Posted by Julian Foad <ju...@btopenworld.com>.
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

Re: Fw: SVN: Diffs for removed directories

Posted by John Szakmeister <jo...@szakmeister.net>.
On Thursday 04 March 2004 11:05, Rene Rebe wrote:
> Hi all,
>
> 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.
[snip]
> Hi,
>
> I've found the following bug in subversion: When I 'svn rm' a directory
> with files in it and 'svn commit' that change, an 'svn diff -rN:M' doesn't
> contain the removals of the files in that directory.
>
> If I just 'svn rm' the files (no the directory itself), the patch is ok.

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.

FWIW, diff -u doesn't produce diffs if a directory is missing.  I had the 
following trees set up:

a/
 a/
   1
   2
   3

b/

A 'diff -u a/ b/' produced:
  Only in a/: a

I also tried a few other options (-r and -N to be exact), and still couldn't 
get it to produce diffs when the directory was missing.  So, I'm not sure 
what the right interaction is here.  Can patch handle removing directories?

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org