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

Re: [PATCH] Fix for issue #2982

From: Senthil Kumaran S <senthil_at_collab.net>
Date: 2007-11-14 10:56:08 CET

Hi Kamesh,

Thanks for your comments. I am attaching an updated patch along with this email.

[[[
Fix issue #2982.

  Reflect dropped/renumbered revisions in modified svn:mergeinfo data

  * subversion/svndumpfilter/main.c
    (): Include svn_mergeinfo.h
    (parse_baton_t): Add skip_missing_merge_sources boolean for the new option
    (renumber_merge_source_rev_range): New function to renumber revs or skip
     missing merge sources in mergeinfo
    (set_node_property): If we have svn:mergeinfo then renumber revisions for
     valid merge sources in mergeinfo.
    (svn_opt_subcommand_t): Add --skip-missing-merge-sources option
    (options_table): Add description for --skip-missing-merge-sources option
    (cmd_table): Add the new option --skip-missing-merge-sources
    (svndumpfilter_opt_state): Add skip_missing_merge_sources boolean for the
     new option
    (parse_baton_initialize): Initialize skip_missing_merge_sources
    (main): Add svndumpfilter__skip_missing_merge_sources to switch case

Patch by: Senthil Kumaran <senthil@collab.net>
]]]

Thank You.

--
Senthil Kumaran S
http://www.stylesen.org/
Kamesh Jayachandran wrote:
> Hi Senthil,
> 
>  >+/* Skip missing merge sources and renumber revision ranges in 
> mergeinfo. */
> 
> Fix this doc string as it only conditionally skips 'missing merge 
> sources' i.e not a default behaviour.
> 
>  >+ else
>  >+ return svn_error_createf(SVN_ERR_INCOMPLETE_DATA, 0,
>  >+ _("Invalid merge source path '%s'"),
>  >+ (const char *)merge_source);
> 
> You can give a hint about '--skip-missing-merge-sources', so that user 
> can reattempt the filter again.
> 
> 
> 
> + if (strcmp(name, SVN_PROP_MERGE_INFO) == 0)
> + {
> + apr_pool_t *subpool = svn_pool_create(apr_hash_pool_get(rb->props));
> + /* Skip missing merge sources and renumber mergeinfo revs. */
> + const char *mergeinfo_val;
> + SVN_ERR(renumber_merge_source_rev_range(&mergeinfo_val, value->data, rb,
> + subpool));
> + value = svn_string_create(mergeinfo_val, subpool);
> + svn_pool_destroy(subpool);
> 
> Accessing 'value' beyond this point is problematic(that is precisely 
> what you do) as you have destroyed the pool.
> 
> 
> With regards
> Kamesh Jayachandran


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Wed Nov 14 10:56:21 2007

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.