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

[PATCH]Fix for Bug in merge-tracking parse_merge_info

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-07-01 22:42:25 CEST

Hi All,
In pursuit to know about the range_list and its consolidation.
I came across the following defect,
For the cases I could think about, I always found target_mergeinfo(Set
by parse_merge_info) to be NULL in do_merge.

This patch fixes this.

With regards
Kamesh Jayachandran

[[[
Patch by: Kamesh Jayachandran <kamesh@collab.net>

'parse_merge_info' always sets mergeinfo to NULL.

svn_client__get_prop_from_wc when invoked with specific 'propname'
sets the first argument hash of the following form,
'node_name w.r.to wcentry' Vs 'propval of type svn_string_t*'.
The current parse_merge_info misunderstands this as of form
'SVN_PROP_MERGE_INFO' Vs 'revisionline'.

* subversion/libsvn_client/diff.c
  (parse_merge_info):
   Change of propval's type from 'const char*' to 'const svn_string_t*'.
   Removed the Todo comment for the task already completed.
   Changing the key to 'props' hash from 'SVN_PROP_MERGE_INFO' to 'wcpath'

]]]

Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 20337)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -1643,7 +1643,7 @@
                  apr_pool_t *pool)
 {
   apr_hash_t *props = apr_hash_make(pool);
- const char *propval;
+ const svn_string_t *propval;
   const svn_wc_entry_t *entry;
 
   SVN_ERR(svn_wc_entry(&entry, wcpath, adm_access, FALSE, pool));
@@ -1652,16 +1652,13 @@
                              _("'%s' is not under version control"),
                              svn_path_local_style(wcpath, pool));
 
- /* ### For now, we should use svn_wc_prop_get() instead. Later,
- ### DannyB thinks we'll want something like
- ### svn_client__get_prop_from_wc(). */
   SVN_ERR(svn_client__get_prop_from_wc(props, SVN_PROP_MERGE_INFO,
                                        wcpath, FALSE, entry, adm_access,
                                        TRUE, ctx, pool));
- propval = apr_hash_get(props, SVN_PROP_MERGE_INFO,
- strlen(SVN_PROP_MERGE_INFO));
+ propval = apr_hash_get(props, wcpath, strlen(wcpath));
+
   if (propval)
- SVN_ERR(svn_mergeinfo_parse(propval, mergeinfo, pool));
+ SVN_ERR(svn_mergeinfo_parse(propval->data, mergeinfo, pool));
   else
     *mergeinfo = apr_hash_make(pool);
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 1 22:41:47 2006

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.