[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: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Fri, 11 Sep 2009 13:14:52 +0200

The conflict descriptor is the primary information container used by
interactive merge handlers. As such it is used in most GUI tools that help
with resolving merge conflicts.

 

I know at least Eclipse, TortoiseSVN, Collabnets merge clients and AnkhSVN
implement their own interactive merge handlers based on the information
inside. There are probably more.

 

 

But providing an api that can be called while inside the callback to
retrieve the information would probably handle things better than the
current descriptor (keeping an access baton. Yikes)).

 

I wouldn't mind if I would have the same information as in the callback
later on :)

 

Currently the information on which property is conflicted is only stored in
the property conflict file; so clients can't retrieve it after the conflict
handler returns.

 

                Bert

 

From: Greg Stein [mailto:gstein_at_gmail.com]
Sent: vrijdag 11 september 2009 6:04
To: dev_at_subversion.tigris.org
Subject: Re: svn commit: r39233 - trunk/subversion/libsvn_wc

 

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=3
9233
<http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/util.c?pathrev=
39233&r1=39232&r2=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
<http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=23
93504> &dsMessageId=2393504

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