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

[PATCH] Make sparse-directories checkouts/updates work with old servers

From: Vlad Georgescu <vgeorgescu_at_gmail.com>
Date: 2007-03-24 14:56:37 CET

Hi,

This patch makes checkouts and updates at svn_depth_empty and
svn_depth_immediates work with servers that do not understand the new
reporter changes, by making the update editor ignore edits on paths below
the edit depth.

With this patch, I can successfully run the depth tests against a 1.4
svnserve. As this is my first attempt at sparse-directories related work,
I'm posting the patch here for review.

[[[
Make updates and checkouts at 'empty' or 'immediates' depth work with old
servers.

* subversion/include/svn_types.h
  (svn_depth_t): Remove comment about svn_depth_exclude being potentially
   unnecessary.

* subversion/libsvn_ra_svn/client.c
  (ra_svn_update): Don't use the SVN_DEPTH_TO_RECURSE macro, because we
   don't want svn_depth_immediates mapped to FALSE in this case. Use a
   custom check instead.

* subversion/libsvn_wc/update_editor.c
  (dir_baton): New member 'depth'.
  (file_baton.skipped): Update comment to reflect new usage.
  (prep_directory): Remove 'depth' parameter, it is stored in the dir_baton
   now. Use db->depth instead of depth when creating the administrative area.
  (open_root): Initialize the returned dir_baton's depth to the default
   depth of the edit.
  (delete_entry): For svn_depth_empty and svn_depth_files, ignore deletions
   of children that haven't been explicitly brought in.
  (add_directory): If the directory is the target of the edit, set its
   depth to that of the edit. Otherwise, initialize the returned dir_baton's
   depth based on the depth of the parent. Remove the old depth calculation
   code, and update the call to prep_directory.
  (open_directory): If the directory is the target of the edit, set its
   depth to that of the edit. Otherwise, initialize the returned dir_baton's
   depth based on the depth of the parent. If the entry exists on disk, allow
   its depth to override svn_depth_infinity.
  (change_dir_prop, close_directory): Don't do anything if the directory is
   at svn_depth_exclude.
  (absent_file_or_dir): Don't do anything if the parent is empty or excluded,
   or if it is at svn_depth_files and the absent entry is a directory.
  (add_or_open_file): If parent is at svn_depth_empty or svn_depth_exclude,
   skip this file.
]]]

-- 
Vlad


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

Received on Sat Mar 24 14:56:56 2007

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.