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

when does this code get invoked?

From: vijayaguru <vijay_at_collab.net>
Date: Tue, 05 Oct 2010 13:51:04 +0530

Hi,

I had a chance to look into the code subversion/libsvn_ra_neon/commit.c.
There was a portion of code(commit.c:485) in (checkout_resource)
function that I could not understand in which case it will get executed.
Please let me know when this part of code will get exercised.

<snip>

  if (err == NULL && allow_404 && code == 404)
    {
      locn = NULL;

      /* re-fetch, forcing a query to the server */
      SVN_ERR(get_version_url(cc, NULL, rsrc, TRUE, pool));

      /* do it again, but don't allow a 404 this time */
      err = do_checkout(cc, rsrc->vsn_url, FALSE, token,
                        is_vcc, &code, &locn, pool);
    }

<snip>

Here the duplicate of the resource is getting passed during a call to
checkout_resource in few places.

For example, in (commit_open_file), file_rsrc that is the duplicate of
rsrc is passed to 'checkout_resource'. If the above mentioned portion of
code(allow_404 &&code=404) is exercised in this case, Will it cause any
problem since we are not duplicating the *name of resource* in
'dup_resource'.

<snip>
file->rsrc = dup_resource(rsrc, file_pool);
.
.
SVN_ERR(checkout_resource(parent->cc, file->rsrc, TRUE,
                            file->token, FALSE, workpool));
</snip>

Thanks in Advance!!

Thanks & Regards,
Vijayaguru
Received on 2010-10-05 10:22:17 CEST

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.