Greg Stein <gstein_at_gmail.com> writes:
> On Tue, Mar 16, 2010 at 13:11, <philip_at_apache.org> wrote:
>>...
>> +++ subversion/trunk/subversion/libsvn_client/copy.c Tue Mar 16 17:11:15 2010
>>...
>> @@ -1150,15 +1149,13 @@ wc_to_repos_copy(svn_commit_info_t **com
>> Â apr_hash_t *commit_revprops;
>> Â int i;
>>
>> - Â /* Find the common root of all the source paths, and probe the wc. */
>> + Â /* Find the common root of all the source paths */
>> Â get_copy_pair_ancestors(copy_pairs, &top_src_path, NULL, NULL, pool);
>> - Â SVN_ERR(svn_wc__adm_probe_in_context(&adm_access, ctx->wc_ctx, top_src_path,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â FALSE, -1, ctx->cancel_func,
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ctx->cancel_baton, pool));
>> -
>> - Â /* The commit process uses absolute paths, so we need to open the access
>> - Â Â baton using absolute paths, and so we really need to use absolute
>> - Â Â paths everywhere. */
>> +
>> + Â /* Do we need to lock the working copy? Â 1.6 didn't take a write
>> + Â Â lock, but what happens if the working copy changes during the copy
>> + Â Â operation? */
>
> I'd switch this to a ### comment saying "we should lock the working
> copy to prevent changes while we perform the copy to the repository."
>
> But when we do that... aren't we starting a commit? and doesn't the
> commit lock the working copy?
No, it calls the lower level function svn_client__do_commit that does
no locking. I think I'll change it to take locks, assuming that doing
so doesn't cause regression tests failures. I don't suppose anybody
relies on wc-to-repo copy "working" when the wc is already locked :)
--
Philip
Received on 2010-03-16 21:00:06 CET