You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2007/08/01 14:21:59 UTC

svn diff --no-diff-deleted doesn't affect deleted directories

svn_client_diff4 has a 'no_diff_deleted' option, which corresponds to
the 'svn diff --no-diff-deleted' flag.  Based on the documentation of
the parameter and flag, there's no reason to suspect that it only
controls output for the deletion of files which are deleted because
the editor called 'delete_entry' on the file itself, as opposed to
those which are recursively deleted because a parent was deleted.
That is, given a flag documented as

 * If @a no_diff_deleted is true, then no diff output will be
 * generated on deleted files.

one would assume that when the flag is false, diff output is generated
for *all* deleted files, not just non-recursively deleted files.

This comes up because a user on #svn was confused that

$ svn log -vr2732 https://reductivelabs.com/svn/puppet/trunk/

had the following changed paths:
   M /trunk/CHANGELOG
   A /trunk/lib/puppet/provider/interface
   A /trunk/lib/puppet/provider/interface/linux.rb
   A /trunk/lib/puppet/provider/interface/sunos.rb
   A /trunk/lib/puppet/type/interface.rb

and that

$ svn diff -c2732 https://reductivelabs.com/svn/puppet/trunk/

showed all of the files being added, but that

$ svn diff -r2732:2731 https://reductivelabs.com/svn/puppet/trunk/

only showed interface.rb being deleted, and not interface/{linux,sunos}.rb.

I'm not sure if this is worth changing at this point; it's possible
that it should be documented explicitly in svn_client_diff4.  (And for
the purposes of "making applicable patches", hopefully Charles' work
will fix that.)  But does this seem strange to anyone else?

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

Re: svn diff --no-diff-deleted doesn't affect deleted directories

Posted by David Glasser <gl...@davidglasser.net>.
On 8/1/07, David Glasser <gl...@davidglasser.net> wrote:
> svn_client_diff4 has a 'no_diff_deleted' option, which corresponds to
> the 'svn diff --no-diff-deleted' flag.  Based on the documentation of
> the parameter and flag, there's no reason to suspect that it only
> controls output for the deletion of files which are deleted because
> the editor called 'delete_entry' on the file itself, as opposed to
> those which are recursively deleted because a parent was deleted.
> That is, given a flag documented as
>
>  * If @a no_diff_deleted is true, then no diff output will be
>  * generated on deleted files.
>
> one would assume that when the flag is false, diff output is generated
> for *all* deleted files, not just non-recursively deleted files.

Charles pointed out on IRC that this is only true for repos-related
diffs, not wc-wc diffs; if you schedule-delete a directory, 'svn diff'
will happily tell you about all the files you've deleted.  This is
because the wc diff driver *never* calls the dir_deleted diff
callback.  I'm not sure which behavior is better.

--dave


-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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