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

[PATCH] incremental checkout (#695)

From: Chia-liang Kao <clkao_at_clkao.org>
Date: 2003-06-29 16:29:10 CEST

Hi,

attached is the patch. this should make Andrew's scenario work
(http://www.contactor.se/~dast/svn/archive-2003-04/0555.shtml)

change message:

* libsvn_wc/adm_ops.c, adm_ops.h
  (svn_wc_putback_dir): new function to putback directories not
    checked out by checkout -N.

* libsvn_client/checkout.c
  (_check_for_putback): new function to check if the checkout
    url and the target are commonly rooted, thus allowed to
    be putback.
  (svn_client__checkout_internal): hook up the putback
    functionality for svn_node_none now.

some notes:
the svn_wc_putback_dir creates directory and adm files except the
leaf dir. the admin files contains only this-dir and the subdir
entries. let update fix the rest.

this only works for target that doesn't exists in the wc, since
it requires the leaf directroy not to exist (see below about the
incomplete flag), and we definitely don't want to rm the wc for that.

also it should be fixed to allow the target to be a existing wc so
the following would work:

# svn co -N http://server/repo mycheckout
# svn co http://server/repo/trunk/projectA mycheckout/trunk/projectA
(later on we want to checkout the parent for some reasons)
# svn co http://server/repo/trunk mycheckout/trunk

I thought the right way is to use the incomplete flag, which doesn't
seem to DWIM. maybe its sematic is not what i guessed. the behaviour of
incomplete this-dir is a bit weird to me. if we have foo/bar:

- if foo and bar are both incomplete: svn up updates bar, but not foo
- if only bar is incomplete: svn up claims updated but nothing is
  really done.
- if foo is incomplete and there's no bar in wc: svn up claims updated
  but nothing is really done; but it updates we do: cd foo; svn up

I know the Right solution should be using --depth as previously
discussed, but it simply involves too much work. I'd suggest using
this patch to make -N less-broken before we have depth implemented.

Cheers,
CLK

On Fri, Jun 27, 2003 at 05:42:26PM +0800, Chia-liang Kao wrote:
> I was thinking about the following:
>
> # svn co http://server/path/to/dir/subdir path/to/wc/subdir
>
> 1. if the target directory does not exist,
> 2. iterate over the parents of the url and path,
> 3. if the parent of path we are checking is a wc and has the
> same url as the corresponding parent of url,
> 4. call svn_wc_putback_dir to put the hierarchy under the
> putback_root, and have client_update to fix everything else.
>
> Is this behaviour reasonable?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sun Jun 29 16:29:47 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.