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

Re: "svn commit" performance

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-07-08 22:00:02 CEST

Chia-liang Kao <clkao@clkao.org> writes:

> Ok, now I'm looking at this.
>
> so what we need to do is lock the grandparent non-recursively and
> each target recursively, also checks if all target are from the same
> repository.

What's a "grandparent", how does it relate to a target? Is it the
common ancestor?

> right now i'm using svn_wc_admin_probe_try to tree lock the target
> associated with grandparent access. and by checking if the url of the
> targets' entry we could tell if they are of the same wc.

I'm not clear what you are trying to achieve. Do you want to support
commits from multiple working copies? I believe the commit code was
originally intended to support commits from multiple working copies.
If you are going to rework this it may be simpler to go directly to
multiple working copy commits (although since those haven't worked for
some time I don't know what problems may arise).

> but I'm wondering if svn_wc_admin_probe_try should just fail when
> the new path and association are not of the same wc.

Hmm, it appears you only want to support a single working copy. In
that case I would avoid the probe functions and simply use the wc
entries to identify directories, and simply generate some error if a
directory is obstructed or missing.

How about a function like

  svn_error_t *
  svn_wc_adm_open_descendant (svn_wc_adm_access_t *adm_access,
                              const char *descendant,
                              svn_boolean_t write_lock,
                              apr_pool_t *pool);

  Get P the path for adm_access
  Get R the relative path of descendant and P
  Split R into components.
  For each component C in R
    Get the access baton for P
    If no access baton then error
    Get the entry for C in P
    If no entry for C then error
    If C is not a directory return
    Construct new P = P/C
    Get access baton for P
    If no access baton
      Open new access baton for P
      If that fails then error

So given

   svn ci foo/xxx/yyy/alpha foo/xxx/zzz/beta foo/aaa/bbb/gamma

First open foo/ non-recursively, then svn_wc_adm_open_descendant each
of the targets.

This will fail if foo/ is not a working copy and foo/xxx/ and foo/aaa/
are two different working copies, but that's not a regression as the
current code will also fail in this case.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 8 22:01:38 2003

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.