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

Re: [PATCH] Make sparse-directories checkouts/updates work with old servers

From: Vlad Georgescu <vgeorgescu_at_gmail.com>
Date: 2007-05-04 07:35:06 CEST

Karl Fogel wrote:
[...]
> It seems we have a problem here. The client needs to do two separate
> things:
>
> 1) Describe the working copy (including depth) to the server.
> 2) Tell the server what depth the client *wants* to have.
>
> Have we been carelessly confusing these two things?
>
> The reporter set_path() calls are about (1), and the 'depth' parameter
> to (for example) svn_ra_do_update2() is about (2).
>
> (I know you know all this, I'm just stating everything very carefully
> here to make sure my own understanding is correct!)
>
> Now, (2) is a single depth, sent exactly once during the update. It
> doesn't really matter if it's sent early or late in the request -- I
> lean toward early, because in some future full-duplex universe, that
> might allow the server to start sending back answers sooner.
>
> I think this means that r24493, r24468, and r24453 were mistaken. We
> should be transmitting a depth from client to server, and remembering
> it on the server side as the *requested* depth, not confusing it with
> the *described* (default) depth.
>
> Does this analysis sound right to you?
>

Yes, that's pretty much what I was thinking.

>> With old servers it gets more complicated. You'd probably have to call
>> delete-path on each file or directory that's missing, except that a
>> working copy doesn't actually have that information.
>
> I don't think that's necessary, we're just going to have the client
> ignore unwanted portions of the update (cf. Mike Pilato's recent
> patch to the RA layers).
>

How does this support the "upgrade" scenario? If you want to upgrade a
working copy from, e.g, svn_depth_files to svn_depth_infinity, you have
to get the (old) server to send you the complete subdirectories, not
just updates. That's why I suggested the need to call delete-path on
the missing stuff (to mark the subdirectories as missing in the working
copy, telling the server to send fulltexts, not deltas).

The problem here is that the depth-files working copy doesn't know the
names of the subdirectories that it's missing, so you wouldn't be able
to call delete-path on them.

Hope I'm making sense here, the caffeine hasn't kicked in yet :).

>> And, of course, whatever solution we come up with must simultaneously
>> work for both old and new servers, because we don't currently
>> distinguish between them.
>
> Oh, I think we're just going to have different solutions for the
> different situations.
>
> For old servers, the client sends a requested depth (which the server
> ignores) and per-path depth information (which the server also
> ignores), and then the client ignores extra information the server
> sends back.
>
> For new servers, the client doesn't need to ignore anything, because
> the server doesn't send any extra information anyway. But if it did,
> the client would just ignore it :-).

Sure, this works fine for "normal" updates, it's upgrades that I was
worried about...

-- 
Vlad
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 4 07:35:25 2007

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