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

[PATCH] Re: The new svn_wc_adm_*2 functions.

From: D.J. Heap <dj_at_shadyvale.net>
Date: 2004-03-13 02:16:15 CET

New patch using the '2' style for the new functions.

Log:
Rename the new *_depth functions, update call sites (and some
comments), and mark the old functions as deprecated.

* subversion\include\svn_wc.h
   Rename new svn_wc_adm_*_depth functions to svn_wc_adm_*2 and
   mark the old functions as deprecated.

* subversion\libsvn_wc\wc.h
* subversion\libsvn_wc\copy.c
* subversion\libsvn_wc\log.c
* subversion\libsvn_wc\adm_ops.c
* subversion\libsvn_wc\status.c
* subversion\libsvn_wc\adm_files.c
* subversion\libsvn_wc\lock.c
* subversion\libsvn_wc\update_editor.c
* subversion\libsvn_client\relocate.c
* subversion\libsvn_client\switch.c
* subversion\libsvn_client\delete.c
* subversion\libsvn_client\externals.c
* subversion\libsvn_client\export.c
* subversion\libsvn_client\revisions.c
* subversion\libsvn_client\status.c
* subversion\libsvn_client\prop_commands.c
* subversion\libsvn_client\url.c
* subversion\libsvn_client\checkout.c
* subversion\libsvn_client\revert.c
* subversion\libsvn_client\diff.c
* subversion\libsvn_client\copy.c
* subversion\libsvn_client\log.c
* subversion\libsvn_client\update.c
* subversion\libsvn_client\resolved.c
* subversion\libsvn_client\commit_util.c
* subversion\libsvn_client\add.c
* subversion\libsvn_client\commit.c
* subversion\clients\cmdline\switch-cmd.c
* subversion\clients\cmdline\main.c
* subversion\clients\cmdline\propedit-cmd.c
* subversion\clients\cmdline\info-cmd.c
   Update svn_wc_adm_* calls and comments to the new depth aware
   versions of those functions.

Index: subversion/include/svn_wc.h
===================================================================
--- subversion/include/svn_wc.h (revision 9026)
+++ subversion/include/svn_wc.h (working copy)
@@ -99,18 +99,18 @@
  * the longest lifetime of all the batons in the set. This implies it must be
  * the root of the hierarchy.
  */
-svn_error_t *svn_wc_adm_open_depth (svn_wc_adm_access_t **adm_access,
- svn_wc_adm_access_t *associated,
- const char *path,
- svn_boolean_t write_lock,
- int depth,
- apr_pool_t *pool);
+svn_error_t *svn_wc_adm_open2 (svn_wc_adm_access_t **adm_access,
+ svn_wc_adm_access_t *associated,
+ const char *path,
+ svn_boolean_t write_lock,
+ int depth,
+ apr_pool_t *pool);
 
 /**
- * Similar to svn_wc_adm_open_depth(). @a depth is set to -1 if @a tree_lock is
- * @c TRUE, else 0.
+ * @deprecated Provided for backward compatibility with the 1.0.0 API.
  *
- * Provided for backward compatibility with the Subversion 1.0.0 API.
+ * Similar to svn_wc_adm_open2(). @a depth is set to -1 if @a tree_lock
+ * is @c TRUE, else 0.
  */
 svn_error_t *svn_wc_adm_open (svn_wc_adm_access_t **adm_access,
                               svn_wc_adm_access_t *associated,
@@ -121,26 +121,26 @@
 
 /** Checks the working copy to determine the node type of @a path. If
  * @a path is a versioned directory then the behaviour is like that of
- * @c svn_wc_adm_open_depth, otherwise, if @a path is a file or does not
- * exist, then the behaviour is like that of @c svn_wc_adm_open_depth with
+ * @c svn_wc_adm_open2, otherwise, if @a path is a file or does not
+ * exist, then the behaviour is like that of @c svn_wc_adm_open2 with
  * @a path replaced by the parent directory of @a path. If @a path is
  * an unversioned directory, the behaviour is also like that of
- * @c svn_wc_adm_open_depth on the parent, except that if the open fails,
+ * @c svn_wc_adm_open2 on the parent, except that if the open fails,
  * then the returned SVN_ERR_WC_NOT_DIRECTORY error refers to @a path,
  * not to @a path's parent.
  */
-svn_error_t *svn_wc_adm_probe_open_depth (svn_wc_adm_access_t **adm_access,
- svn_wc_adm_access_t *associated,
- const char *path,
- svn_boolean_t write_lock,
- int depth,
- apr_pool_t *pool);
+svn_error_t *svn_wc_adm_probe_open2 (svn_wc_adm_access_t **adm_access,
+ svn_wc_adm_access_t *associated,
+ const char *path,
+ svn_boolean_t write_lock,
+ int depth,
+ apr_pool_t *pool);
 
 /**
- * Similar to svn_wc_adm_probe_open_depth(). @a depth is set to -1 if
+ * @deprecated Provided for backward compatibility with the 1.0.0 API.
+ *
+ * Similar to svn_wc_adm_probe_open2(). @a depth is set to -1 if
  * @a tree_lock is @c TRUE, else 0.
- *
- * Provided for backward compatibility with the Subversion 1.0.0 API.
  */
 svn_error_t *svn_wc_adm_probe_open (svn_wc_adm_access_t **adm_access,
                                     svn_wc_adm_access_t *associated,
@@ -179,7 +179,7 @@
  *
  * First, try to obtain @a *adm_access via @c svn_wc_adm_probe_retrieve(),
  * but if this fails because @a associated can't give a baton for
- * @a path or @a path's parent, then try @c svn_wc_adm_probe_open_depth(),
+ * @a path or @a path's parent, then try @c svn_wc_adm_probe_open2(),
  * this time passing @a write_lock and @a depth. If there is
  * still no access because @a path is not a versioned directory, then
  * just set @a *adm_access to null and return success. But if it is
@@ -193,18 +193,18 @@
  *
  * Use @a pool only for local processing, not to allocate @a *adm_access.
  */
-svn_error_t *svn_wc_adm_probe_try_depth (svn_wc_adm_access_t **adm_access,
- svn_wc_adm_access_t *associated,
- const char *path,
- svn_boolean_t write_lock,
- int depth,
- apr_pool_t *pool);
+svn_error_t *svn_wc_adm_probe_try2 (svn_wc_adm_access_t **adm_access,
+ svn_wc_adm_access_t *associated,
+ const char *path,
+ svn_boolean_t write_lock,
+ int depth,
+ apr_pool_t *pool);
 
 /**
- * Similar to svn_wc_adm_probe_try_depth(). @a depth is set to -1 if
+ * @deprecated Provided for backward compatibility with the 1.0.0 API.
+ *
+ * Similar to svn_wc_adm_probe_try2(). @a depth is set to -1 if
  * @a tree_lock is @c TRUE, else 0.
- *
- * Provided for backward compatibility with the Subversion 1.0.0 API.
  */
 svn_error_t *svn_wc_adm_probe_try (svn_wc_adm_access_t **adm_access,
                                    svn_wc_adm_access_t *associated,
Index: subversion/libsvn_wc/copy.c
===================================================================
--- subversion/libsvn_wc/copy.c (revision 9026)
+++ subversion/libsvn_wc/copy.c (working copy)
@@ -319,7 +319,8 @@
      After the commit, ra_dav should regenerate them and re-store them as
      an optimization. Note we use the normal locking mechanism here, even
      though this directory has not yet been added to the parent. */
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, dst_path, TRUE, TRUE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, dst_path, TRUE, -1,
+ pool));
   SVN_ERR (svn_wc__remove_wcprops (adm_access, TRUE, pool));
   SVN_ERR (svn_wc_adm_close (adm_access));
 
@@ -359,8 +360,8 @@
   svn_wc_adm_access_t *adm_access;
   svn_node_kind_t src_kind;
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, src_path, FALSE, TRUE,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, src_path, FALSE, -1,
+ pool));
 
   SVN_ERR (svn_io_check_path (src_path, &src_kind, pool));
   
Index: subversion/libsvn_wc/wc.h
===================================================================
--- subversion/libsvn_wc/wc.h (revision 9026)
+++ subversion/libsvn_wc/wc.h (working copy)
@@ -171,7 +171,7 @@
 
 /* Return an access baton for PATH in *ADM_ACCESS. This function is used
    to lock the working copy during construction of the admin area, it
- necessarily does less checking than svn_wc_adm_open. */
+ necessarily does less checking than svn_wc_adm_open2. */
 svn_error_t *svn_wc__adm_pre_open (svn_wc_adm_access_t **adm_access,
                                    const char *path,
                                    apr_pool_t *pool);
Index: subversion/libsvn_wc/log.c
===================================================================
--- subversion/libsvn_wc/log.c (revision 9026)
+++ subversion/libsvn_wc/log.c (working copy)
@@ -1061,7 +1061,7 @@
     if (err && (err->apr_err == SVN_ERR_WC_NOT_LOCKED))
       {
         svn_error_clear (err);
- SVN_ERR (svn_wc_adm_open (&paccess, NULL, pdir, TRUE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&paccess, NULL, pdir, TRUE, 0, pool));
         unassociated = TRUE;
       }
     else if (err)
Index: subversion/libsvn_wc/adm_ops.c
===================================================================
--- subversion/libsvn_wc/adm_ops.c (revision 9026)
+++ subversion/libsvn_wc/adm_ops.c (working copy)
@@ -740,8 +740,8 @@
   svn_node_kind_t was_kind;
   svn_boolean_t was_deleted = FALSE; /* Silence a gcc uninitialized warning */
 
- SVN_ERR (svn_wc_adm_probe_try (&dir_access, adm_access, path,
- TRUE, TRUE, pool));
+ SVN_ERR (svn_wc_adm_probe_try2 (&dir_access, adm_access, path,
+ TRUE, -1, pool));
   if (dir_access)
     SVN_ERR (svn_wc_entry (&entry, path, dir_access, FALSE, pool));
   else
@@ -902,8 +902,9 @@
      Note that this is one of the few functions that is allowed to see
     'deleted' entries; it's totally fine to have an entry that is
      scheduled for addition and still previously 'deleted'. */
- SVN_ERR (svn_wc_adm_probe_try (&adm_access, parent_access, path,
- TRUE, copyfrom_url != NULL, pool));
+ SVN_ERR (svn_wc_adm_probe_try2 (&adm_access, parent_access, path,
+ TRUE, copyfrom_url != NULL ? -1 : 0,
+ pool));
   if (adm_access)
     SVN_ERR (svn_wc_entry (&orig_entry, path, adm_access, TRUE, pool));
   else
@@ -1022,9 +1023,12 @@
       
       /* We want the locks to persist, so use the access baton's pool */
       if (! orig_entry || orig_entry->deleted)
- SVN_ERR (svn_wc_adm_open (&adm_access, parent_access, path,
- TRUE, copyfrom_url != NULL,
- svn_wc_adm_access_pool (parent_access)));
+ {
+ apr_pool_t* access_pool = svn_wc_adm_access_pool (parent_access);
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, parent_access, path,
+ TRUE, copyfrom_url != NULL ? -1 : 0,
+ access_pool));
+ }
 
       /* We're making the same mods we made above, but this time we'll
          force the scheduling. Also make sure to undo the
Index: subversion/libsvn_wc/status.c
===================================================================
--- subversion/libsvn_wc/status.c (revision 9026)
+++ subversion/libsvn_wc/status.c (working copy)
@@ -1682,8 +1682,8 @@
         {
           const char *parent_path = svn_path_dirname (path, pool);
           svn_wc_adm_access_t *parent_access;
- SVN_ERR (svn_wc_adm_open (&parent_access, NULL, parent_path,
- FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&parent_access, NULL, parent_path,
+ FALSE, 0, pool));
           SVN_ERR (svn_wc_entry (&parent_entry, parent_path, parent_access,
                                  FALSE, pool));
         }
Index: subversion/libsvn_wc/adm_files.c
===================================================================
--- subversion/libsvn_wc/adm_files.c (revision 9026)
+++ subversion/libsvn_wc/adm_files.c (working copy)
@@ -913,7 +913,8 @@
       svn_wc_adm_access_t *adm_access;
       const svn_wc_entry_t *entry;
 
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, path, FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, path, FALSE, 0,
+ pool));
       SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
       SVN_ERR (svn_wc_adm_close (adm_access));
       if (!entry)
Index: subversion/libsvn_wc/lock.c
===================================================================
--- subversion/libsvn_wc/lock.c (revision 9026)
+++ subversion/libsvn_wc/lock.c (working copy)
@@ -322,7 +322,7 @@
   return SVN_NO_ERROR;
 }
 
-/* This is essentially the guts of svn_wc_adm_open, with the additional
+/* This is essentially the guts of svn_wc_adm_open2, with the additional
  * parameter UNDER_CONSTRUCTION that gets set TRUE only when locking the
  * admin directory during initial creation.
  */
@@ -509,17 +509,17 @@
                  svn_boolean_t tree_lock,
                  apr_pool_t *pool)
 {
- return svn_wc_adm_open_depth (adm_access, associated, path, write_lock,
- (tree_lock ? -1 : 0), pool);
+ return svn_wc_adm_open2 (adm_access, associated, path, write_lock,
+ (tree_lock ? -1 : 0), pool);
 }
 
 svn_error_t *
-svn_wc_adm_open_depth (svn_wc_adm_access_t **adm_access,
- svn_wc_adm_access_t *associated,
- const char *path,
- svn_boolean_t write_lock,
- int depth,
- apr_pool_t *pool)
+svn_wc_adm_open2 (svn_wc_adm_access_t **adm_access,
+ svn_wc_adm_access_t *associated,
+ const char *path,
+ svn_boolean_t write_lock,
+ int depth,
+ apr_pool_t *pool)
 {
   return do_open (adm_access, associated, path, write_lock, depth, FALSE,
                   pool);
@@ -543,18 +543,18 @@
                        svn_boolean_t tree_lock,
                        apr_pool_t *pool)
 {
- return svn_wc_adm_probe_open_depth (adm_access, associated, path,
- write_lock, (tree_lock ? -1 : 0), pool);
+ return svn_wc_adm_probe_open2 (adm_access, associated, path,
+ write_lock, (tree_lock ? -1 : 0), pool);
 }
 
 
 svn_error_t *
-svn_wc_adm_probe_open_depth (svn_wc_adm_access_t **adm_access,
- svn_wc_adm_access_t *associated,
- const char *path,
- svn_boolean_t write_lock,
- int depth,
- apr_pool_t *pool)
+svn_wc_adm_probe_open2 (svn_wc_adm_access_t **adm_access,
+ svn_wc_adm_access_t *associated,
+ const char *path,
+ svn_boolean_t write_lock,
+ int depth,
+ apr_pool_t *pool)
 {
   svn_error_t *err;
   const char *dir;
@@ -569,8 +569,8 @@
   if (dir != path)
     depth = 0;
 
- err = svn_wc_adm_open_depth (adm_access, associated, dir, write_lock,
- depth, pool);
+ err = svn_wc_adm_open2 (adm_access, associated, dir, write_lock,
+ depth, pool);
   if (err)
     {
       svn_error_t *err2;
@@ -676,17 +676,17 @@
                       svn_boolean_t tree_lock,
                       apr_pool_t *pool)
 {
- return svn_wc_adm_probe_try_depth (adm_access, associated, path, write_lock,
- (tree_lock ? -1 : 0), pool);
+ return svn_wc_adm_probe_try2 (adm_access, associated, path, write_lock,
+ (tree_lock ? -1 : 0), pool);
 }
 
 svn_error_t *
-svn_wc_adm_probe_try_depth (svn_wc_adm_access_t **adm_access,
- svn_wc_adm_access_t *associated,
- const char *path,
- svn_boolean_t write_lock,
- int depth,
- apr_pool_t *pool)
+svn_wc_adm_probe_try2 (svn_wc_adm_access_t **adm_access,
+ svn_wc_adm_access_t *associated,
+ const char *path,
+ svn_boolean_t write_lock,
+ int depth,
+ apr_pool_t *pool)
 {
   svn_error_t *err;
 
@@ -698,9 +698,9 @@
   if (err && (err->apr_err == SVN_ERR_WC_NOT_LOCKED))
     {
       svn_error_clear (err);
- err = svn_wc_adm_probe_open_depth (adm_access, associated,
- path, write_lock, depth,
- svn_wc_adm_access_pool (associated));
+ err = svn_wc_adm_probe_open2 (adm_access, associated,
+ path, write_lock, depth,
+ svn_wc_adm_access_pool (associated));
 
       /* If the path is not a versioned directory, we just return a
          null access baton with no error. Note that of the errors we
Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c (revision 9026)
+++ subversion/libsvn_wc/update_editor.c (working copy)
@@ -609,8 +609,8 @@
         ? svn_wc_adm_access_pool (db->edit_baton->adm_access)
         : db->edit_baton->pool;
 
- SVN_ERR (svn_wc_adm_open (&adm_access, db->edit_baton->adm_access,
- db->path, TRUE, FALSE, adm_access_pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, db->edit_baton->adm_access,
+ db->path, TRUE, 0, adm_access_pool));
       if (!db->edit_baton->adm_access)
         db->edit_baton->adm_access = adm_access;
     }
@@ -2665,8 +2665,8 @@
   /* If we cannot get an entry for PATH's parent, PATH is a WC root. */
   p_entry = NULL;
   svn_path_split (path, &parent, &base_name, pool);
- err = svn_wc_adm_probe_open (&adm_access, NULL, parent, FALSE, FALSE,
- pool);
+ err = svn_wc_adm_probe_open2 (&adm_access, NULL, parent, FALSE, 0,
+ pool);
   if (! err)
     err = svn_wc_entry (&p_entry, parent, adm_access, FALSE, pool);
   if (err || (! p_entry))
@@ -2717,7 +2717,8 @@
   svn_boolean_t is_wc_root;
   svn_node_kind_t kind;
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path, FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path, FALSE, 0,
+ pool));
   SVN_ERR (check_wc_root (&is_wc_root, &kind, path, adm_access, pool));
   SVN_ERR (svn_wc_adm_close (adm_access));
 
Index: subversion/libsvn_client/relocate.c
===================================================================
--- subversion/libsvn_client/relocate.c (revision 9026)
+++ subversion/libsvn_client/relocate.c (working copy)
@@ -129,8 +129,8 @@
   struct validator_baton_t vb;
 
   /* Get an access baton for PATH. */
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path,
- TRUE, recurse, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path,
+ TRUE, recurse ? -1 : 0, pool));
 
   /* Now, populate our validator callback baton, and call the relocate code. */
   SVN_ERR (svn_ra_init_ra_libs (&(vb.ra_baton), pool));
Index: subversion/libsvn_client/switch.c
===================================================================
--- subversion/libsvn_client/switch.c (revision 9026)
+++ subversion/libsvn_client/switch.c (working copy)
@@ -98,7 +98,8 @@
      it needs a full tree lock to do so. If someday the RA layer gets
      smarter about this, then we can start passing `recurse' below
      again. See issue #1000 and related commits for details. */
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path, TRUE, TRUE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path, TRUE, -1,
+ pool));
   SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
   
   if (! entry)
Index: subversion/libsvn_client/delete.c
===================================================================
--- subversion/libsvn_client/delete.c (revision 9026)
+++ subversion/libsvn_client/delete.c (working copy)
@@ -257,8 +257,8 @@
             SVN_ERR (ctx->cancel_func (ctx->cancel_baton));
 
           /* Let the working copy library handle the PATH. */
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, parent_path,
- TRUE, FALSE, subpool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, parent_path,
+ TRUE, 0, subpool));
           SVN_ERR (svn_client__wc_delete (path, adm_access, force,
                                           FALSE, ctx, subpool));
           SVN_ERR (svn_wc_adm_close (adm_access));
Index: subversion/libsvn_client/externals.c
===================================================================
--- subversion/libsvn_client/externals.c (revision 9026)
+++ subversion/libsvn_client/externals.c (working copy)
@@ -103,7 +103,7 @@
   svn_error_t *err;
   svn_wc_adm_access_t *adm_access;
 
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, path, TRUE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, path, TRUE, 0, pool));
   err = svn_wc_remove_from_revision_control (adm_access,
                                              SVN_WC_ENTRY_THIS_DIR,
                                              TRUE, FALSE,
@@ -262,8 +262,8 @@
       svn_error_t *err;
       svn_wc_adm_access_t *adm_access;
 
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, path, TRUE, TRUE,
- ib->pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, path, TRUE, -1,
+ ib->pool));
 
       /* We don't use relegate_external() here, because we know that
          nothing else in this externals description (at least) is
@@ -336,8 +336,8 @@
       SVN_ERR (svn_io_check_path (path, &kind, ib->pool));
       if (kind == svn_node_dir)
         {
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, path, TRUE, TRUE,
- ib->pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, path, TRUE, -1,
+ ib->pool));
           SVN_ERR (svn_wc_entry (&ext_entry, path, adm_access,
                                  FALSE, ib->pool));
           SVN_ERR (svn_wc_adm_close (adm_access));
Index: subversion/libsvn_client/export.c
===================================================================
--- subversion/libsvn_client/export.c (revision 9026)
+++ subversion/libsvn_client/export.c (working copy)
@@ -75,8 +75,8 @@
   apr_hash_index_t *hi;
   apr_finfo_t finfo;
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, from, FALSE,
- FALSE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, from, FALSE,
+ 0, pool));
   err = svn_wc_entry (&entry, from, adm_access, FALSE, pool);
   if (err)
     {
Index: subversion/libsvn_client/revisions.c
===================================================================
--- subversion/libsvn_client/revisions.c (revision 9026)
+++ subversion/libsvn_client/revisions.c (working copy)
@@ -80,8 +80,8 @@
         return svn_error_create
           (SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, NULL, NULL);
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path, FALSE, FALSE,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path, FALSE,
+ 0, pool));
       SVN_ERR (svn_wc_entry (&ent, path, adm_access, FALSE, pool));
       SVN_ERR (svn_wc_adm_close (adm_access));
 
Index: subversion/libsvn_client/status.c
===================================================================
--- subversion/libsvn_client/status.c (revision 9026)
+++ subversion/libsvn_client/status.c (working copy)
@@ -103,8 +103,8 @@
 
   /* First checks do not require a lock on the working copy. We will
      reopen the working copy with a lock later. */
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path,
- FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path,
+ FALSE, 0, pool));
 
   /* Get the entry for this path so we can determine our anchor and
      target. If the path is unversioned, and the caller requested
@@ -130,8 +130,8 @@
      ### is a performance bug. (But this is better than locking too
      ### little, which would be a correctness bug).
    */
- SVN_ERR (svn_wc_adm_probe_open_depth (&adm_access, NULL, anchor,
- FALSE, (descend ? -1 : 2), pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, anchor,
+ FALSE, (descend ? -1 : 2), pool));
 
   /* Get the status edit, and use our wrapping status function/baton
      as the callback pair. */
@@ -155,8 +155,8 @@
       /* Using pool cleanup to close it. This needs to be recursive so that
          auth data can be stored. */
       if (strlen (anchor) != strlen (path))
- SVN_ERR (svn_wc_adm_open (&anchor_access, NULL, anchor, FALSE,
- TRUE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&anchor_access, NULL, anchor, FALSE,
+ -1, pool));
       else
         anchor_access = adm_access;
 
Index: subversion/libsvn_client/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c (revision 9026)
+++ subversion/libsvn_client/prop_commands.c (working copy)
@@ -156,7 +156,8 @@
     return svn_error_createf (SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
                               "Bad property name: '%s'", propname);
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target, TRUE, TRUE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target, TRUE,
+ -1, pool));
   SVN_ERR (svn_wc_entry (&node, target, adm_access, FALSE, pool));
   if (!node)
     return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
@@ -369,7 +370,8 @@
       else
         pdir = target;
       
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, pdir, FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, pdir, FALSE,
+ 0, pool));
       SVN_ERR (svn_wc_entry (&entry, target, adm_access, FALSE, pool));
       if (! entry)
         return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
@@ -554,8 +556,8 @@
     {
       svn_boolean_t pristine;
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target, FALSE, TRUE,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target,
+ FALSE, -1, pool));
       SVN_ERR (svn_wc_entry (&node, target, adm_access, FALSE, pool));
       if (! node)
         return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
@@ -911,8 +913,8 @@
     {
       svn_boolean_t pristine;
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target, FALSE, TRUE,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target,
+ FALSE, -1, pool));
       SVN_ERR (svn_wc_entry (&node, target, adm_access, FALSE, pool));
       if (! node)
         return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
Index: subversion/libsvn_client/url.c
===================================================================
--- subversion/libsvn_client/url.c (revision 9026)
+++ subversion/libsvn_client/url.c (working copy)
@@ -46,8 +46,8 @@
     }
   else
     {
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path_or_url,
- FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path_or_url,
+ FALSE, 0, pool));
       SVN_ERR (svn_wc_entry (&entry, path_or_url, adm_access, FALSE, pool));
       SVN_ERR (svn_wc_adm_close (adm_access));
       
Index: subversion/libsvn_client/checkout.c
===================================================================
--- subversion/libsvn_client/checkout.c (revision 9026)
+++ subversion/libsvn_client/checkout.c (working copy)
@@ -129,8 +129,8 @@
             }
 
           /* Get PATH's entry. */
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, path,
- FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, path,
+ FALSE, 0, pool));
           SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
           SVN_ERR (svn_wc_adm_close (adm_access));
 
Index: subversion/libsvn_client/revert.c
===================================================================
--- subversion/libsvn_client/revert.c (revision 9026)
+++ subversion/libsvn_client/revert.c (working copy)
@@ -49,8 +49,8 @@
 
   /* We need to open the parent of PATH, if PATH is not a wc root, but we
      don't know if path is a directory. It gets a bit messy. */
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path, TRUE, recursive,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path, TRUE,
+ recursive ? -1 : 0, pool));
   if ((err = svn_wc_is_wc_root (&wc_root, path, adm_access, pool)))
     goto out;
   if (! wc_root)
@@ -71,11 +71,12 @@
                  is no way to close such a set. */
               svn_wc_adm_access_t *dir_access;
               if ((err = svn_wc_adm_close (adm_access))
- || (err = svn_wc_adm_open (&adm_access, NULL,
- svn_path_dirname (path, pool),
- TRUE, FALSE, pool))
- || (err = svn_wc_adm_open (&dir_access, adm_access, path,
- TRUE, recursive, pool)))
+ || (err = svn_wc_adm_open2 (&adm_access, NULL,
+ svn_path_dirname (path, pool),
+ TRUE, 0, pool))
+ || (err = svn_wc_adm_open2 (&dir_access, adm_access,
+ path, TRUE,
+ recursive ? -1 : 0, pool)))
                 goto out;
             }
         }
Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 9026)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -1196,7 +1196,8 @@
     }
 
   /* ### This may not be a good idea, see issue 880 */
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path, FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2(&adm_access, NULL, path, FALSE,
+ 0, pool));
   SVN_ERR (svn_wc_entry (&entry, path, adm_access, FALSE, pool));
   SVN_ERR (svn_wc_adm_close (adm_access));
   if (! entry)
@@ -1500,8 +1501,8 @@
 
   SVN_ERR (svn_wc_get_actual_target (path1, &anchor, &target, pool));
   SVN_ERR (svn_io_check_path (path1, &kind, pool));
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, anchor, FALSE,
- (recurse && (! *target)), pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, anchor, FALSE,
+ (recurse && (! *target)) ? -1 : 0, pool));
 
   if (*target && (kind == svn_node_dir))
     {
@@ -1511,8 +1512,8 @@
          in adm_access's set of associated batons, where the diff
          editor can find it. */
       svn_wc_adm_access_t *target_access;
- SVN_ERR (svn_wc_adm_open (&target_access, adm_access, path1,
- FALSE, recurse, pool));
+ SVN_ERR (svn_wc_adm_open2 (&target_access, adm_access, path1,
+ FALSE, recurse ? -1 : 0, pool));
     }
 
   /* Resolve named revisions to real numbers. */
@@ -1732,8 +1733,8 @@
                                         ctx, pool));
       
   /* Set up diff editor according to path2's anchor/target. */
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, anchor2, FALSE,
- (recurse && (! *target2)), pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, anchor2, FALSE,
+ (recurse && (! *target2)) ? -1 : 0, pool));
   if (*target2 && (kind == svn_node_dir))
     {
       /* Associate a potentially tree-locked access baton for the
@@ -1742,8 +1743,8 @@
          in adm_access's set of associated batons, where the diff
          editor can find it. */
       svn_wc_adm_access_t *target_access;
- SVN_ERR (svn_wc_adm_open (&target_access, adm_access, path2,
- FALSE, recurse, pool));
+ SVN_ERR (svn_wc_adm_open2 (&target_access, adm_access, path2,
+ FALSE, recurse ? -1 : 0, pool));
     }
 
   SVN_ERR (svn_wc_get_diff_editor (adm_access, target2,
@@ -2006,8 +2007,8 @@
   else
     merge_cmd_baton.path = source2;
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target_wcpath,
- ! dry_run, recurse, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target_wcpath,
+ ! dry_run, recurse ? -1 : 0, pool));
 
   SVN_ERR (svn_wc_entry (&entry, target_wcpath, adm_access, FALSE, pool));
   if (entry == NULL)
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 9026)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -104,9 +104,9 @@
 
       svn_path_split (src_path, &src_parent, NULL, pool);
 
- SVN_ERR (svn_wc_adm_open (&src_access, NULL, src_parent, TRUE,
- src_kind == svn_node_dir,
- pool));
+ SVN_ERR (svn_wc_adm_open2 (&src_access, NULL, src_parent, TRUE,
+ src_kind == svn_node_dir ? -1 : 0,
+ pool));
 
       /* Need to avoid attempting to open the same dir twice when source
          and destination overlap. */
@@ -129,8 +129,8 @@
             }
           else
             {
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, dst_parent,
- TRUE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, dst_parent,
+ TRUE, 0, pool));
             }
         }
 
@@ -141,8 +141,8 @@
     }
   else
     {
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, dst_parent, TRUE, FALSE,
- pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, dst_parent, TRUE,
+ 0, pool));
     }
                               
   /* Perform the copy and (optionally) delete. */
@@ -594,8 +594,8 @@
      paths everywhere. */
   SVN_ERR (svn_path_get_absolute (&base_path, src_path, pool));
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, base_path, FALSE, TRUE,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, base_path,
+ FALSE, -1, pool));
 
   /* Split the DST_URL into an anchor and target. */
   svn_path_split (dst_url, &anchor, &target, pool);
@@ -831,8 +831,8 @@
     return svn_error_createf (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
                               "'%s' is in the way", dst_path);
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, dst_path, TRUE, FALSE,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, dst_path, TRUE,
+ 0, pool));
 
   /* We've already checked for physical obstruction by a working file.
      But there could also be logical obstruction by an entry whose
@@ -902,8 +902,8 @@
              should be the copyfrom_revision when we commit later. */
           const svn_wc_entry_t *d_entry;
           svn_wc_adm_access_t *dst_access;
- SVN_ERR (svn_wc_adm_open (&dst_access, adm_access, dst_path,
- TRUE, TRUE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&dst_access, adm_access, dst_path,
+ TRUE, -1, pool));
           SVN_ERR (svn_wc_entry (&d_entry, dst_path, dst_access, FALSE, pool));
           src_revnum = d_entry->revision;
         }
@@ -1042,8 +1042,9 @@
                  entries file. */
               svn_wc_adm_access_t *adm_access; /* ### FIXME local */
               const svn_wc_entry_t *entry;
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, src_path,
- FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL,
+ src_path, FALSE, 0,
+ pool));
               SVN_ERR (svn_wc_entry (&entry, src_path, adm_access, FALSE,
                                      pool));
               SVN_ERR (svn_wc_adm_close (adm_access));
Index: subversion/libsvn_client/log.c
===================================================================
--- subversion/libsvn_client/log.c (revision 9026)
+++ subversion/libsvn_client/log.c (working copy)
@@ -121,8 +121,8 @@
           const svn_wc_entry_t *entry;
           const char *URL;
           const char *target = APR_ARRAY_IDX(targets, i, const char *);
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target,
- FALSE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target,
+ FALSE, 0, pool));
           SVN_ERR (svn_wc_entry (&entry, target, adm_access, FALSE, pool));
           if (! entry)
             {
Index: subversion/libsvn_client/update.c
===================================================================
--- subversion/libsvn_client/update.c (revision 9026)
+++ subversion/libsvn_client/update.c (working copy)
@@ -74,7 +74,8 @@
 
   /* Use PATH to get the update's anchor and targets and get a write lock */
   SVN_ERR (svn_wc_get_actual_target (path, &anchor, &target, pool));
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, anchor, TRUE, TRUE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, anchor, TRUE, -1,
+ pool));
 
   /* Get full URL from the ANCHOR. */
   SVN_ERR (svn_wc_entry (&entry, anchor, adm_access, FALSE, pool));
Index: subversion/libsvn_client/resolved.c
===================================================================
--- subversion/libsvn_client/resolved.c (revision 9026)
+++ subversion/libsvn_client/resolved.c (working copy)
@@ -42,8 +42,8 @@
 {
   svn_wc_adm_access_t *adm_access;
 
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, path, TRUE, recursive,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, path, TRUE,
+ recursive ? -1 : 0, pool));
 
   SVN_ERR (svn_wc_resolved_conflict (path, adm_access, TRUE, TRUE, recursive,
                                      ctx->notify_func, ctx->notify_baton, pool));
Index: subversion/libsvn_client/commit_util.c
===================================================================
--- subversion/libsvn_client/commit_util.c (revision 9026)
+++ subversion/libsvn_client/commit_util.c (working copy)
@@ -607,8 +607,8 @@
           if (err && err->apr_err == SVN_ERR_WC_NOT_LOCKED)
             {
               svn_error_clear (err);
- SVN_ERR (svn_wc_adm_open (&parent_access, NULL, parent,
- FALSE, FALSE, subpool));
+ SVN_ERR (svn_wc_adm_open2 (&parent_access, NULL, parent,
+ FALSE, 0, subpool));
             }
           else if (err)
             {
Index: subversion/libsvn_client/add.c
===================================================================
--- subversion/libsvn_client/add.c (revision 9026)
+++ subversion/libsvn_client/add.c (working copy)
@@ -367,8 +367,8 @@
   svn_wc_adm_access_t *adm_access;
   const char *parent_path = svn_path_dirname (path, pool);
 
- SVN_ERR (svn_wc_adm_open (&adm_access, NULL, parent_path,
- TRUE, FALSE, pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, NULL, parent_path,
+ TRUE, 0, pool));
 
   err = add (path, recursive, adm_access, ctx, pool);
   
Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c (revision 9026)
+++ subversion/libsvn_client/commit.c (working copy)
@@ -1163,10 +1163,10 @@
       svn_pool_destroy (subpool);
     }
 
- SVN_ERR (svn_wc_adm_open (&base_dir_access, NULL, base_dir,
- TRUE, /* Write lock */
- lock_base_dir_recursive, /* Tree lock */
- pool));
+ SVN_ERR (svn_wc_adm_open2 (&base_dir_access, NULL, base_dir,
+ TRUE, /* Write lock */
+ lock_base_dir_recursive ? -1 : 0, /* Depth */
+ pool));
 
   if (!lock_base_dir_recursive)
     {
@@ -1200,10 +1200,11 @@
             {
               target = APR_ARRAY_IDX (dirs_to_lock, i, const char *);
 
- SVN_ERR (svn_wc_adm_open (&adm_access, base_dir_access, target,
- TRUE, /* Write lock */
- FALSE, /* Tree lock */
- pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, base_dir_access,
+ target,
+ TRUE, /* Write lock */
+ 0, /* Depth */
+ pool));
             }
         }
 
@@ -1214,10 +1215,11 @@
             {
               target = APR_ARRAY_IDX (dirs_to_lock_recursive, i, const char *);
 
- SVN_ERR (svn_wc_adm_open (&adm_access, base_dir_access, target,
- TRUE, /* Write lock */
- TRUE, /* Tree lock */
- pool));
+ SVN_ERR (svn_wc_adm_open2 (&adm_access, base_dir_access,
+ target,
+ TRUE, /* Write lock */
+ -1, /* Depth */
+ pool));
             }
         }
     }
Index: subversion/clients/cmdline/switch-cmd.c
===================================================================
--- subversion/clients/cmdline/switch-cmd.c (revision 9026)
+++ subversion/clients/cmdline/switch-cmd.c (working copy)
@@ -124,8 +124,8 @@
   switch_url = svn_path_canonicalize (switch_url, pool);
 
   /* Validate the target */
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target, FALSE, FALSE,
- pool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target, FALSE, 0,
+ pool));
   SVN_ERR (svn_wc_entry (&entry, target, adm_access, FALSE, pool));
   if (! entry)
     return svn_error_createf
Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c (revision 9026)
+++ subversion/clients/cmdline/main.c (working copy)
@@ -1035,8 +1035,8 @@
           svn_wc_adm_access_t *adm_access;
           const svn_wc_entry_t *e;
           const char *fname_utf8 = svn_path_internal_style (dash_F_arg, pool);
- err = svn_wc_adm_probe_open (&adm_access, NULL, fname_utf8,
- FALSE, FALSE, pool);
+ err = svn_wc_adm_probe_open2 (&adm_access, NULL, fname_utf8,
+ FALSE, 0, pool);
           if (! err)
             err = svn_wc_entry (&e, fname_utf8, adm_access, FALSE, pool);
           if ((err == SVN_NO_ERROR) && e)
Index: subversion/clients/cmdline/propedit-cmd.c
===================================================================
--- subversion/clients/cmdline/propedit-cmd.c (revision 9026)
+++ subversion/clients/cmdline/propedit-cmd.c (working copy)
@@ -209,8 +209,8 @@
             propval = svn_string_create ("", subpool);
           
           /* Split the path if it is a file path. */
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target,
- FALSE, FALSE, subpool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target,
+ FALSE, 0, subpool));
           SVN_ERR (svn_wc_entry (&entry, target, adm_access, FALSE, subpool));
           if (! entry)
             return svn_error_createf
Index: subversion/clients/cmdline/info-cmd.c
===================================================================
--- subversion/clients/cmdline/info-cmd.c (revision 9026)
+++ subversion/clients/cmdline/info-cmd.c (working copy)
@@ -276,8 +276,9 @@
 
       svn_pool_clear (subpool);
       SVN_ERR (svn_cl__check_cancel (ctx->cancel_baton));
- SVN_ERR (svn_wc_adm_probe_open (&adm_access, NULL, target, FALSE,
- opt_state->recursive, subpool));
+ SVN_ERR (svn_wc_adm_probe_open2 (&adm_access, NULL, target, FALSE,
+ opt_state->recursive ? -1 : 0,
+ subpool));
       SVN_ERR (svn_wc_entry (&entry, target, adm_access, FALSE, subpool));
       if (! entry)
         {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 13 02:16:57 2004

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.