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

Re: [PATCH]remove adm_access batons in svn_client__do_commit

From: HuiHuang <yellow.flying_at_yahoo.com.cn>
Date: Thu, 6 Aug 2009 14:48:08 +0800

Hey,

As you suggested, I make a new patch which does not include while-space changes.
After this patch is commited, I will make another patch about format later.

See below: Thank you:)

Index: subversion/libsvn_client/client.h
===================================================================
--- subversion/libsvn_client/client.h (revision 38574)
+++ subversion/libsvn_client/client.h (working copy)
@@ -940,7 +940,6 @@
 svn_error_t *
 svn_client__do_commit(const char *base_url,
                       apr_array_header_t *commit_items,
- svn_wc_adm_access_t *adm_access,
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
                       const char *notify_path_prefix,
Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c (revision 38574)
+++ subversion/libsvn_client/commit.c (working copy)
@@ -1649,10 +1649,9 @@
   notify_prefix = svn_dirent_get_longest_ancestor(current_dir, base_dir, pool);
 
   /* Perform the commit. */
- cmt_err = svn_client__do_commit(base_url, commit_items, base_dir_access,
- editor, edit_baton,
- notify_prefix,
- &tempfiles, &checksums, ctx, pool);
+ cmt_err = svn_client__do_commit(base_url, commit_items, editor, edit_baton,
+ notify_prefix, &tempfiles, &checksums, ctx,
+ pool);
 
   /* Handle a successful commit. */
   if ((! cmt_err)
Index: subversion/libsvn_client/commit_util.c
===================================================================
--- subversion/libsvn_client/commit_util.c (revision 38574)
+++ subversion/libsvn_client/commit_util.c (working copy)
@@ -1274,12 +1274,14 @@
   void *file_baton = NULL;
   const char *copyfrom_url = NULL;
   apr_pool_t *file_pool = NULL;
- svn_wc_adm_access_t *adm_access = cb_baton->adm_access;
   const svn_delta_editor_t *editor = cb_baton->editor;
   apr_hash_t *file_mods = cb_baton->file_mods;
   svn_client_ctx_t *ctx = cb_baton->ctx;
   svn_error_t *err = SVN_NO_ERROR;
+ const char *local_abspath;
 
+ SVN_ERR(svn_dirent_get_absolute(&local_abspath, item->path, pool));
+
   /* Do some initializations. */
   *dir_baton = NULL;
   if (item->copyfrom_url)
@@ -1342,10 +1344,7 @@
           if (item->kind == svn_node_file)
             {
               const svn_string_t *propval;
- const char *local_abspath;
 
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, item->path,
- pool));
               SVN_ERR(svn_wc_prop_get2(&propval, ctx->wc_ctx, local_abspath,
                                        SVN_PROP_MIME_TYPE, pool, pool));
             
@@ -1435,8 +1434,6 @@
   /* Now handle property mods. */
   if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_PROP_MODS)
     {
- const svn_wc_entry_t *tmp_entry;
-
       if (kind == svn_node_file)
         {
           if (! file_baton)
@@ -1469,26 +1466,20 @@
             }
         }
 
- /* Ensured by harvest_committables(), item->path will never be an
- excluded path. However, will it be deleted/absent items? I think
- committing an modification on a deleted/absent item does not make
- sense. So it's probably safe to turn off the show_hidden flag here.*/
- SVN_ERR(svn_wc_entry(&tmp_entry, item->path, adm_access, FALSE, pool));
-
       /* When committing a directory that no longer exists in the
          repository, a "not found" error does not occur immediately
          upon opening the directory. It appears here during the delta
          transmisssion. */
- err = svn_wc_transmit_prop_deltas
- (item->path, adm_access, tmp_entry, editor,
- (kind == svn_node_dir) ? *dir_baton : file_baton, NULL, pool);
+ err = svn_wc_transmit_prop_deltas2(
+ ctx->wc_ctx, local_abspath, editor,
+ (kind == svn_node_dir) ? *dir_baton : file_baton, pool);
 
       if (err)
         return fixup_out_of_date_error(path, kind, err);
 
- SVN_ERR(svn_wc_transmit_prop_deltas
- (item->path, adm_access, tmp_entry, editor,
- (kind == svn_node_dir) ? *dir_baton : file_baton, NULL, pool));
+ SVN_ERR(svn_wc_transmit_prop_deltas2(
+ ctx->wc_ctx, local_abspath, editor,
+ (kind == svn_node_dir) ? *dir_baton : file_baton, pool));
 
       /* Make any additional client -> repository prop changes. */
       if (item->outgoing_prop_changes)
@@ -1562,7 +1553,6 @@
 svn_error_t *
 svn_client__do_commit(const char *base_url,
                       apr_array_header_t *commit_items,
- svn_wc_adm_access_t *adm_access,
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
                       const char *notify_path_prefix,
@@ -1610,7 +1600,6 @@
     }
 
   /* Setup the callback baton. */
- cb_baton.adm_access = adm_access;
   cb_baton.editor = editor;
   cb_baton.edit_baton = edit_baton;
   cb_baton.file_mods = file_mods;
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 38574)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -1288,7 +1288,7 @@
                                     pool));
 
   /* Perform the commit. */
- SVN_ERR_W(svn_client__do_commit(top_dst_url, commit_items, adm_access,
+ SVN_ERR_W(svn_client__do_commit(top_dst_url, commit_items,
                                   editor, edit_baton,
                                   0, /* ### any notify_path_offset needed? */
                                   NULL, NULL, ctx, pool),

Best~
Huihuang

------------------
yellow.flying
2009-08-06

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2380707
Received on 2009-08-06 08:50:04 CEST

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