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

Re: svn commit: r921445 - in /subversion/trunk/subversion: include/private/svn_wc_private.h include/svn_wc.h libsvn_client/commit.c libsvn_wc/entries.c

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 11 Mar 2010 01:23:24 -0500

On Thu, Mar 11, 2010 at 01:06, Joe Swatosh <joe.swatosh_at_gmail.com> wrote:
> On Wed, Mar 10, 2010 at 9:15 PM, Greg Stein <gstein_at_gmail.com> wrote:
>> On Wed, Mar 10, 2010 at 21:23, Joe Swatosh <joe.swatosh_at_gmail.com> wrote:
>>> Hi Philip
>>>
>>> On Wed, Mar 10, 2010 at 8:47 AM,  <philip_at_apache.org> wrote:
>>>> Author: philip
>>>> Date: Wed Mar 10 16:47:27 2010
>>>> New Revision: 921445
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=921445&view=rev
>>>> Log:
>>>> Remove some access batons from post-commit processing.
>>>
>>> Since this patch the Ruby bindings test has been failing on the Ubuntu
>>> build bot (and locally for me).  I haven't looked at the patch closely
>>> so I'm not sure what's up, but the relevant part of the test is:
>>>
>>>      Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
>>>        assert_raises(Svn::Error::WcPathFound) do
>>>          access.mark_missing_deleted(path1)
>>>        end
>>>        FileUtils.rm(path1)
>>>        access.mark_missing_deleted(path1)  ### This line raises
>>> Svn::Wc::WcPathFound ###
>>>        access.maybe_set_repos_root(path2, @repos_uri)
>>>      end
>>>
>>> Judging by the name of the function, it appears to me that the test is
>>> correct....
>>> I double checked, the rm is removing the file before the call.  Could
>>> you check this please, or suggest how the test should be modified?
>>
>> The problem is that svn_wc__temp_mark_missing_not_present() now does a
>> call to read_info(), whereas before it simply checked the disk. The
>> function is verifying more state before progressing. In particular,
>> you must have a directory that is scheduled for deletion before
>> calling that function. Does your test properly set that up?
>>
>> Cheers,
>> -g
>>
>
> Here is the current doc string for svn_wc_mark_missing_deleted:
> /** Mark missing @a path as 'deleted' in its @a parent's list of entries.
>  *
>  * Return #SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing.
>  *
>  * @deprecated Provided for backward compatibility with the 1.6 API.
>  */
>
> I want to make sure I'm understanding correctly.  It sounds like I need to
> svn del 'path's parent' before calling svn_wc_mark_missing_deleted on 'path.'
> Did I follow?  If so, then no the test doesn't set that up.

Sorry I wasn't clear. The function is only useful for situations like:

$ svn rm path/some-subdir
$ rm -r path/some-subdir

... and then calling the function on path/some-subdir. It will record
(in path/.svn/) that some-subdir is "not-present" in the working copy.

The function is used as part of the commit code. Post-commit, we are
allowed to mark that subdir as "not-present" in the new revision of
path/... since we know it was deleted as part of the commit. We don't
mind that the subdir is missing because that recording is in the stub
located in path/.svn/

That said, the function is bogus because this kind of recording should
happen during commit processing naturally. And it should bump the
revision on that directory, rather than just alter the presence value
stashed away in the stub. We should be able to eliminate the function
today, and fold it into commit processing (and then it *may* further
simplify during the single-db move).

Cheers,
-g
Received on 2010-03-11 07:23:54 CET

This is an archived mail posted to the Subversion Dev mailing list.