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

Re: [PATCH] add adm_access to svn_client_commit_item3_t

From: HuiHuang <yellow.flying_at_yahoo.com.cn>
Date: Wed, 24 Jun 2009 16:00:15 +0800

Hey,

>I see from the patch you are adding a field to
>svn_client_commit_item3_t. It wasn't obvious before r38160, but
>adding new members of a public structure should be done at the end of
>the structure. You should also update any constructors or copy
>functions to account for the new member.
I have moved the new member to the end of the structure.

>Note that making a copy of and adm_access_t may not make sense.
>So I think the _dup() function should *not* make a newly allocated
>copy of the adm_access_t. Rather, it should just copy the pointer
>value, and the docstring needs to be changed from:
svn_client_commit_item3_create() and svn_client_commit_item3_dup()
do not need to be changed according what you said. Original implement
of svn_client_commit_item3_dup() already share adm_access. So I just
modifed the docstring of it.

>In the future, could you make sure your patches are attached
>with the correct mime-type, as requested by HACKING? Using a mime-
>type of text/x-diff, text/x-patch, or text/plain makes it possible to
>view and review the patch inline in a mail reader, and increases the
>likelihood it will get good review.
following is new patch i make. Does this satisfies above requirement?

>So let's just use an adm_access_t for now. If we need to change
>this, we can still do so.
agree:)

Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h (version 38138)
+++ subversion/include/svn_client.h (working copy)
@@ -462,6 +462,9 @@
    * same lifetime as this data structure.
    */
   apr_array_header_t *outgoing_prop_changes;
+
+ /** record adm_access of this item */
+ svn_wc_adm_access_t *adm_access;
 } svn_client_commit_item3_t;
 
 /** The commit candidate structure.
@@ -551,8 +554,9 @@
                               apr_pool_t *pool);
 
 /**
- * Return a duplicate of @a item, allocated in @a pool. No part of the new
- * structure will be shared with @a item.
+ * Return a duplicate of @a item, allocated in @a pool. No part of the
+ * new structure will be shared with @a item, except for the adm_access
+ * member.
  *
  * @since New in 1.5.
  */

log message:
     
    [[[
      
       * subversion/include/svn_client.h
         (adm_access): new variable of svn_client_commit_item3_t.
         It store svn_wc_adm_access_t of the commit item, so every
         item can refer to its adm_access easily.
         (svn_client_commit_item3_dup): change its docstring to indicate
         that the adm_access member will be shared.
    ]]]
------------------
yellow.flying
2009-06-24

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

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2364822
Received on 2009-06-24 10:00:40 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.