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

Re: svn commit: r39233 - trunk/subversion/libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 11 Sep 2009 00:03:53 -0400

While you're considering the conflict descriptor, could I suggest making it
opaque instead? I traced most of the members once, and they are actually
used *very* rarely. I'm not sure that a struct like this makes sense,
especially given the difficulty of rev'ing structs.

Also, it has been considered that the conflict_* columns could move into the
CONFLICT table, which could imply moving into this struct, too.

Cheers,
-g

On Sep 10, 2009 5:44 PM, "Hyrum K. Wright" <hyrum_at_hyrumwright.org> wrote:

Author: hwright
Date: Thu Sep 10 20:37:58 2009
New Revision: 39233

Log:
A couple of improvements to the tree conflict descriptor handling.

* subversion/libsvn_wc/util.c
 (svn_wc_conflict_description_create_text2,
  svn_wc_conflict_description_create_prop2,
  svn_wc_conflict_description_create_tree2): Assert we are passed an
absolute
    path.
 (svn_wc_conflict_version_dup): Allow dup'ing a NULL value.

Modified:
  trunk/subversion/libsvn_wc/util.c

Modified: trunk/subversion/libsvn_wc/util.c
URL:
http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/util.c?pathrev=39233&r1=39232&r2=39233
==============================================================================
--- trunk/subversion/libsvn_wc/util.c Thu Sep 10 18:33:02 2009
 (r39232)
+++ trunk/subversion/libsvn_wc/util.c Thu Sep 10 20:37:58 2009
 (r39233)
@@ -325,6 +325,8 @@ svn_wc_conflict_description_create_text2
 {
  svn_wc_conflict_description2_t *conflict;

+ SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
  conflict->node_kind = svn_node_file;
@@ -342,6 +344,8 @@ svn_wc_conflict_description_create_prop2
 {
  svn_wc_conflict_description2_t *conflict;

+ SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
  conflict->node_kind = node_kind;
@@ -361,6 +365,8 @@ svn_wc_conflict_description_create_tree2
 {
  svn_wc_conflict_description2_t *conflict;

+ SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
+
  conflict = apr_pcalloc(result_pool, sizeof(*conflict));
  conflict->local_abspath = apr_pstrdup(result_pool, local_abspath);
  conflict->node_kind = node_kind;
@@ -471,6 +477,9 @@ svn_wc_conflict_version_dup(const svn_wc

  svn_wc_conflict_version_t *new_version;

+ if (version == NULL)
+ return NULL;
+
  new_version = apr_pcalloc(pool, sizeof(*new_version));

  /* Shallow copy all members. */

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2393504

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2393506
Received on 2009-09-11 06:04:13 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.