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

Subversion 1.6 update --set-depth bug?

From: Greg Lutz <greg_at_nearspace.com>
Date: Tue, 12 May 2009 11:49:28 -0700
Here's a proposed bug in svn 1.6.1.  I haven't tested it in 1.6.2, but the source file responsible hasn't changed.

Description: If you check out a working copy of a repository directory that includes subdirectories, then remove one of the subdirectories with "svn update --set-depth exclude", then try to get that subdirectory back sparsely with "svn update --set-depth empty", the command fails with the message "svn: Can only crop directories". This is unexpected; expected behavior is for the command to succeed and create the desired directory within the working copy, with depth "empty".

Replication steps (for Windows):
From a cmd prompt, enter these commands:

svn co http://svn.collab.net/repos/svn/tags/1.6.1/subversion/svn/ wc
cd wc
svn update --set-depth exclude schema
svn update --set-depth empty schema

The last command fails with the message "svn: Can only crop directories".

A closely related sequence of commands succeeds:
svn co -N http://svn.collab.net/repos/svn/tags/1.6.1/subversion/svn/ wc
cd wc
svn update --set-depth empty schema

Environmental information:

Operating system: Windows Vista Business, Service Pack 1
Subversion 1.6.1, from prebuilt binary (CollabNetSubversion-client-1.6.1-2.win32.exe)

-----------------------------------------

The error message is generated by function svn_wc_crop_tree() in crop.c (that's http://svn.collab.net/repos/svn/trunk/subversion/libsvn_wc/crop.c), this block of code:

  /* Only makes sense to crop a dir target. */
  full_path = svn_path_join(svn_wc_adm_access_path(anchor), target, pool);
  SVN_ERR(svn_wc_entry(&entry, full_path, anchor, FALSE, pool));
  if (!entry || entry->kind != svn_node_dir)
    return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
      _("Can only crop directories"));


--Greg Lutz
Received on 2009-05-12 20:52:57 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.