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

Re: svn up --depth empty breaks working copy

From: David Glasser <glasser_at_davidglasser.net>
Date: Wed, 28 May 2008 23:51:40 -0700

On Wed, May 28, 2008 at 11:42 PM, Stefan Küng <tortoisesvn_at_gmail.com> wrote:
> David Glasser wrote:
>> I can reproduce this with 1.4.x svnserve but not trunk svnserve.
>> Note that the actual over-the-wire communication seems identical,
>> which is kind of wacky. But maybe the lack of depth capability is
>> triggering some compat code, which is broken?
> Finally got the svn.exe built here.
> I can reproduce the problem from here too (on XP SP3) with svn.exe built
> from the 1.5.x branch.
> Since you already got a reproduction recipe, I'm not trying to create
> another one. But just as an additional info: my repository is on apache, not
> svnserve (svn version 1.4.6 on the apache server). So it's nothing to do
> with svnserve.

The same problem code is in all three remote ra layers. This fixes
the issue; currently running tests to see if it does any harm.

cmpilato, any insight into why you wrote the code this way originally?
 (Also, why libsvn_ra_svn/client.c(ra_svn_get_reporter) uses
svn_error_clear in its call to svn_delta_depth_filter_editor?)

When using the depth filter editor to filter out entries that are
deeper than requested,
make sure not to filter out a file which is the target of a
depth-empty edit; otherwise
the working copy will be corrupted when the target's revision is
updated but nothing else
is changed.

(This bit of code is run when doing an update --depth=empty against a
1.4.x or older
server, which interprets recurse=False like depth-files.)

* subversion/libsvn_delta/depth_filter_editor.c
  (okay_to_edit): Don't special-case directories when figuring out
whether or not to filter
   with requested depth empty.

Index: subversion/libsvn_delta/depth_filter_editor.c
--- subversion/libsvn_delta/depth_filter_editor.c (revision 31453)
+++ subversion/libsvn_delta/depth_filter_editor.c (working copy)
@@ -68,7 +68,7 @@
   switch (eb->requested_depth)
     case svn_depth_empty:
- return (kind == svn_node_dir && effective_depth <= 0);
+ return (effective_depth <= 0);
     case svn_depth_files:
       return ((effective_depth <= 0)
               || (kind == svn_node_file && effective_depth == 1));

David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-29 08:51:54 CEST

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.