You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Daniel L. Rall" <dl...@collab.net> on 2007/10/29 17:23:24 UTC
Re: svn commit: r27455 - trunk/subversion/libsvn_client
On Mon, 29 Oct 2007, kameshj@tigris.org wrote:
> Author: kameshj
> Date: Mon Oct 29 06:02:21 2007
> New Revision: 27455
>
> Log:
> Code refactor.
>
> * subversion/libsvn_client/merge.c
> (svn_client_merge_peg3): Assign iteration independent 'merge_cmd_baton'
> members out of iteration loop.
> Call do_merge with FALSE for 'three way merge' rather than indirectly via
> merge_cmd_baton.
This is inscrutable -- FALSE what?
>
>
> Modified:
> trunk/subversion/libsvn_client/merge.c
>
> Modified: trunk/subversion/libsvn_client/merge.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/merge.c?pathrev=27455&r1=27454&r2=27455
> ==============================================================================
> --- trunk/subversion/libsvn_client/merge.c (original)
> +++ trunk/subversion/libsvn_client/merge.c Mon Oct 29 06:02:21 2007
> @@ -4534,6 +4534,25 @@
> /* Compact the list to remove redundances and such. */
> SVN_ERR(compact_merge_ranges(&merge_range_ts, merge_range_ts, pool));
>
> + merge_cmd_baton.force = force;
> + merge_cmd_baton.record_only = record_only;
> + merge_cmd_baton.dry_run = dry_run;
> + merge_cmd_baton.ctx = ctx;
> + merge_cmd_baton.target_missing_child = FALSE;
> + merge_cmd_baton.target = target_wcpath;
> + merge_cmd_baton.url = URL;
> + merge_cmd_baton.pool = subpool;
> + merge_cmd_baton.merge_options = merge_options;
> + if (dry_run)
> + merge_cmd_baton.dry_run_deletions = apr_hash_make(pool);
> + notify_b.merge_b = &merge_cmd_baton;
> + /* Set up the diff3 command, so various callers don't have to. */
> + cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
> + APR_HASH_KEY_STRING) : NULL;
> + svn_config_get(cfg, &(merge_cmd_baton.diff3_cmd),
> + SVN_CONFIG_SECTION_HELPERS,
> + SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
> +
> for (i = 0; i < merge_range_ts->nelts; i++)
> {
> svn_merge_range_t *mergerange = APR_ARRAY_IDX(merge_range_ts, i,
> @@ -4549,35 +4568,22 @@
> initial_rev2.kind = svn_opt_revision_number;
> initial_rev2.value.number = mergerange->end;
>
> - merge_cmd_baton.force = force;
> - merge_cmd_baton.record_only = record_only;
> - merge_cmd_baton.dry_run = dry_run;
> - merge_cmd_baton.target_missing_child = FALSE;
> - merge_cmd_baton.merge_options = merge_options;
> - merge_cmd_baton.target = target_wcpath;
> - merge_cmd_baton.url = URL;
> merge_cmd_baton.added_path = NULL;
> merge_cmd_baton.add_necessitated_merge = FALSE;
> if (dry_run)
> - merge_cmd_baton.dry_run_deletions = apr_hash_make(subpool);
> + svn_hash__clear(merge_cmd_baton.dry_run_deletions);
> merge_cmd_baton.conflicted_paths = NULL;
> - merge_cmd_baton.ctx = ctx;
> - merge_cmd_baton.pool = subpool;
> merge_cmd_baton.operative_merge = FALSE;
> merge_cmd_baton.target_has_dummy_merge_range = FALSE;
> merge_cmd_baton.override_set = FALSE;
> + /* do_merge and do_single_file_merge makes merge_cmd_baton->ra_session1
> + and merge_cmd_baton->ra_session2 point to memory locations of
> + iteration scope. Reparenting on those temporary locations will cause
> + segfault, So assigning both the sessions with persistent memory. */
> merge_cmd_baton.ra_session1 = ra_session;
> merge_cmd_baton.ra_session2 = NULL;
> - notify_b.merge_b = &merge_cmd_baton;
> SVN_ERR(from_same_repos(&merge_cmd_baton, entry, ctx, subpool));
>
> - /* Set up the diff3 command, so various callers don't have to. */
> - cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
> - APR_HASH_KEY_STRING) : NULL;
> - svn_config_get(cfg, &(merge_cmd_baton.diff3_cmd),
> - SVN_CONFIG_SECTION_HELPERS,
> - SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
> -
> /* Transform the peg-rev syntax into two explicit merge source
> locations. */
> SVN_ERR(svn_client__repos_locations(&URL1, &rev1,
> @@ -4663,7 +4669,7 @@
> URL2,
> range.end,
> is_rollback,
> - merge_cmd_baton.target_missing_child,
> + FALSE,
> target_wcpath,
> adm_access,
> depth,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
--
Daniel Rall
Re: svn commit: r27455 - trunk/subversion/libsvn_client
Posted by Kamesh Jayachandran <ka...@collab.net>.
Daniel L. Rall wrote:
> On Mon, 29 Oct 2007, kameshj@tigris.org wrote:
>
>
>> Author: kameshj
>> Date: Mon Oct 29 06:02:21 2007
>> New Revision: 27455
>>
>> Log:
>> Code refactor.
>>
>> * subversion/libsvn_client/merge.c
>> (svn_client_merge_peg3): Assign iteration independent 'merge_cmd_baton'
>> members out of iteration loop.
>> Call do_merge with FALSE for 'three way merge' rather than indirectly via
>> merge_cmd_baton.
>>
>
> This is inscrutable -- FALSE what?
>
Fixed, it is FALSE for 'target_missing_child' param.
With regards
Kamesh Jayachandran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r27455 - trunk/subversion/libsvn_client
Posted by "C. Michael Pilato" <cm...@collab.net>.
Daniel L. Rall wrote:
> On Mon, 29 Oct 2007, C. Michael Pilato wrote:
>
>> Daniel L. Rall wrote:
>>> On Mon, 29 Oct 2007, kameshj@tigris.org wrote:
>>>
>>>> Author: kameshj
>>>> Date: Mon Oct 29 06:02:21 2007
>>>> New Revision: 27455
>>>>
>>>> Log:
>>>> Code refactor.
>>>>
>>>> * subversion/libsvn_client/merge.c
>>>> (svn_client_merge_peg3): Assign iteration independent 'merge_cmd_baton'
>>>> members out of iteration loop.
>>>> Call do_merge with FALSE for 'three way merge' rather than indirectly via
>>>> merge_cmd_baton.
>>> This is inscrutable -- FALSE what?
>> I think he means, "Pass FALSE as the value of the three_way_merge parameter
>> of do_merge() instead of consulting the merge_cmd_baton", rather the way the
>> diff indicates:
>
> Sure, I looked at the diff and understand what was intended. My point is,
> how can you tell that from the log message? The idea with a log message is
> to get a summary of the change *without* looking at the diff. :P
Fair 'nuff. I "got it" without the diff, but then I've been hanging 'round
these parts of the code lately.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn commit: r27455 - trunk/subversion/libsvn_client
Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
On Mon, 29 Oct 2007, C. Michael Pilato wrote:
> Daniel L. Rall wrote:
> > On Mon, 29 Oct 2007, kameshj@tigris.org wrote:
> >
> >> Author: kameshj
> >> Date: Mon Oct 29 06:02:21 2007
> >> New Revision: 27455
> >>
> >> Log:
> >> Code refactor.
> >>
> >> * subversion/libsvn_client/merge.c
> >> (svn_client_merge_peg3): Assign iteration independent 'merge_cmd_baton'
> >> members out of iteration loop.
> >> Call do_merge with FALSE for 'three way merge' rather than indirectly via
> >> merge_cmd_baton.
> >
> > This is inscrutable -- FALSE what?
>
> I think he means, "Pass FALSE as the value of the three_way_merge parameter
> of do_merge() instead of consulting the merge_cmd_baton", rather the way the
> diff indicates:
Sure, I looked at the diff and understand what was intended. My point is,
how can you tell that from the log message? The idea with a log message is
to get a summary of the change *without* looking at the diff. :P
> >> @@ -4663,7 +4669,7 @@
> >> URL2,
> >> range.end,
> >> is_rollback,
> >> - merge_cmd_baton.target_missing_child,
> >> + FALSE,
> >> target_wcpath,
> >> adm_access,
> >> depth,
Re: svn commit: r27455 - trunk/subversion/libsvn_client
Posted by "C. Michael Pilato" <cm...@collab.net>.
Daniel L. Rall wrote:
> On Mon, 29 Oct 2007, kameshj@tigris.org wrote:
>
>> Author: kameshj
>> Date: Mon Oct 29 06:02:21 2007
>> New Revision: 27455
>>
>> Log:
>> Code refactor.
>>
>> * subversion/libsvn_client/merge.c
>> (svn_client_merge_peg3): Assign iteration independent 'merge_cmd_baton'
>> members out of iteration loop.
>> Call do_merge with FALSE for 'three way merge' rather than indirectly via
>> merge_cmd_baton.
>
> This is inscrutable -- FALSE what?
I think he means, "Pass FALSE as the value of the three_way_merge parameter
of do_merge() instead of consulting the merge_cmd_baton", rather the way the
diff indicates:
>> @@ -4663,7 +4669,7 @@
>> URL2,
>> range.end,
>> is_rollback,
>> - merge_cmd_baton.target_missing_child,
>> + FALSE,
>> target_wcpath,
>> adm_access,
>> depth,
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand