You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@wandisco.com> on 2010/10/07 19:34:32 UTC

[RFC] WC APIs for adding and copying

I'm planning to remove/deprecate svn_wc_add4(), the many-headed beast,
and provide replacement functions that have more focused tasks.

I reached this point from trying to understand the different kinds of
add and copy in order to sort out the "operation depth" field for the
NODES table.

I drew out the call graph of all WC add and copy calls; it's attached as
a PDF and visible at
<https://docs.google.com/drawings/edit?id=1Up_5tvnKjShQL2F8GGtoIefiBDp5k4ODf1_ZxrgBJ1U&hl=en>.

Plan:

  * Remove svn_wc_add4().  Keep the deprecated svn_wc_add3() for
backward compatibility.  Probably re-implement it in terms of the new
simpler functions.

  * For an add without 'copyfrom', a new function:

    svn_wc_add[4|_tree|something](depth)   # any node kind

  * For a repo->WC copy:

    svn_wc_add_repos_file4()     # existing function
    svn_wc_add_repos_dir(depth)  # new function

  * For a WC-to-WC copy:

    svn_wc_copy3()        # existing function

  * Reorganize svn_wc_copy3() internally:

    If the target should be a simple add (if the source is itself a
simple add or from a different repos), call the simple-add function.
    Copying a repository node from the WC



Any thoughts?

- Julian


Re: [RFC] WC APIs for adding and copying

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 10/07/2010 03:34 PM, Julian Foad wrote:
> I'm planning to remove/deprecate svn_wc_add4(), the many-headed beast,
> and provide replacement functions that have more focused tasks.

[...]

> Any thoughts?

Anything that can be done to make that multi-headed beast more maintainable
would be a welcome change, IMO.  Goforit.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: [RFC] WC APIs for adding and copying

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Oct 7, 2010 at 15:34, Julian Foad <ju...@wandisco.com> wrote:
>...
>  * For a repo->WC copy:
>
>    svn_wc_add_repos_file4()     # existing function
>    svn_wc_add_repos_dir(depth)  # new function

Please use "copy" in their name to better reflect the operation. Let's
never use the term "add-with-history" and stick to just "copy".

Note that svn_wc_add_repos_file3() would then be implemented in terms
of (say) svn_wc_copy_repos_file().

>...

Cheers,
-g