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

Re: svn commit: r35578 - trunk/subversion/libsvn_client

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 30 Jan 2009 15:17:55 +0200 (Jerusalem Standard Time)

Greg Stein wrote on Fri, 30 Jan 2009 at 13:39 +0100:
> Seems like the right answer is:
>
> * compare URLs
> * if that fails, get the zero, one, or two UUIDs from the WC
> * fetch any missing UUIDs from the server
> * shove the UUIDs back into the WC if a write-lock exists
> * compare the two UUIDs
>

So, you first use the cache maintained (globally) by libsvn_wc, and only
then ask the server. [1] But if the UUID of a given URL changed, how
would libsvn_wc's cached URL <-> UUID mapping get updated?

Daniel

[1] Presumably, when you ask the server, you also try to re-use existing
sessions, since those should have the UUID cached.

> I would suggest a general utility function in libsvn_wc.
>
> Cheers,
> -g
>
> On Fri, Jan 30, 2009 at 13:20, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
> >> -----Original Message-----
> >> From: Senthil Kumaran S [mailto:senthil_at_collab.net]
> >> Sent: vrijdag 30 januari 2009 12:51
> >> To: svn_at_subversion.tigris.org
> >> Subject: svn commit: r35578 - trunk/subversion/libsvn_client
> >>
> >> Author: stylesen
> >> Date: Fri Jan 30 03:51:17 2009
> >> New Revision: 35578
> >>
> >> Log:
> >> Partially fix issue #3361.
> >>
> >> * subversion/libsvn_client/merge.c
> >> (merge_cousins_and_supplement_mergeinfo, svn_client_merge3,
> >> svn_client_merge_peg3): Determine same repositories by comparing
> >> UUIDs
> >> of the repositories instead of doing a URL match.
> >>
> >> Found by: Miles Crawford <mcrawfor_at_u.washington.edu>
> >>
> >> Modified:
> >> trunk/subversion/libsvn_client/merge.c
> >>
> >> Modified: trunk/subversion/libsvn_client/merge.c
> >> URL:
> >> http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/merge.c
> >> ?pathrev=35578&r1=35577&r2=35578
> >> =======================================================================
> >> =======
> >> --- trunk/subversion/libsvn_client/merge.c Fri Jan 30 01:55:04 2009
> >> (r35577)
> >> +++ trunk/subversion/libsvn_client/merge.c Fri Jan 30 03:51:17 2009
> >> (r35578)
> >> @@ -6688,8 +6688,16 @@ merge_cousins_and_supplement_mergeinfo(c
> >> apr_array_header_t *remove_sources, *add_sources, *ranges;
> >> svn_opt_revision_t peg_revision;
> >> const char *old_url;
> >> + const char *source_repos_uuid;
> >> + const char *wc_repos_uuid;
> >> +
> >> + SVN_ERR(svn_client_uuid_from_url(&source_repos_uuid,
> >> source_repos_root,
> >> + ctx, pool));
> >> + SVN_ERR(svn_client_uuid_from_url(&wc_repos_uuid, wc_repos_root,
> >> + ctx, pool));
> >> +
> >> svn_boolean_t same_repos =
> >> - (strcmp(wc_repos_root, source_repos_root) == 0) ? TRUE : FALSE;
> >> + (strcmp(wc_repos_uuid, source_repos_uuid) == 0) ? TRUE : FALSE;
> >
> > Could you do this only when the repository root doesn't match?
> >
> > This creates two RA sessions just to get their UUIDs. (And for at least one
> > of them we should have this value in our working copy and probably the other
> > could be cached in its ra session).
> >
> > So only this change makes just merging a revision in the subversion
> > repository for us Europeans at least a few seconds slower than it currently
> > is. (Just opening a HTTPv1 ra session including authentication takes about 2
> > seconds)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1074397
Received on 2009-01-30 18:41:34 CET

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