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

Re: new substitution keyword for global repository revision

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 24 Dec 2009 15:59:38 +0100

On Thu, Dec 24, 2009 at 03:42:38PM +0100, Christian Schoenebeck wrote:
> On Thursday 24 December 2009 14:23:25 Bert Huijben wrote:
> > Currently on a 'svn update' the client receives a list of files from the
> > repository that are updated with the information on how they are updated.
> >
> > E.g. if you call 'svn update' on a working copy with 10000 files, you
> > receive changes for just two files.
> >
> > Then these files are updated and their keywords (if there are any)
> > rewritten based on the new information.
> >
> > With the new keyword you would need an additional step to walk all the
> > other files, to check if they have your new keyword in the svn:keywords
> > property, which is 10000-2 file opens in the current code and 10000-2
> > database reads in WC-NG.
> >
> > And if the property for a file contains this setting the file must be
> > rewritten with the new expansions.
> >
> > Looking at the performance measurements for 1.6.x I performed some time
> > ago, this would be a major slowdown on Windows. (Probably makes the update
> > time 3 to 5 times longer by just opening the property files, if you have a
> > lot of files with any keyword set).
>
> In pratice there are usually only very few files in a repository which would
> use such a global repository revision keyword. So to avoid such slowdowns on
> various operations, I would store a list of files with that keyword as global
> property (e.g.: "svn:globalkeywords"), not by properties on a per file basis.
> E.g.:
>
> svn propset svn:globalkeywords "GlobalRevision: trunk/version.h,
> GlobalRevision: branches/whatever/foo.cpp"
>
> Where "GlobalRevision" might be the new keyword to be substituted by the new
> global repository revision in the listed files.
>
> So the update command would then just retrieve that global property and if it
> exists and contains a valid list of global keywords and files, it will then
> retrieve the latest repository revision and perform the substitution on the
> WC. Should be a cheap operation, no?

What if I do an update which should not update the working copy
root, such as "svn update somefile"?

Stefan
Received on 2009-12-24 16:00:22 CET

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.