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

Re: Question on svnsync - want to quickly start from rev 800000

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 04 Feb 2010 11:44:47 +0000

On Wed, 2010-02-03, Karl Heinz Marbaise wrote:
> Hi,
> i have observed a strange behaviour of svnsync in partially replicating
> a repository (In my opinion)..
> Created a local repository (svnadmin create...) change the
> pre-revprop-change hook to accept changes...and then
> i initialized svnsync like the following:
> svnsync init file:///usr/local/test/t
> http://svn.apache.org/repos/asf/subversion
> Now i started svnsync sync file e:///usr/local/test/t ....
> And based on that it seemed to be that all revision properties from
> 1...to whatever revision the real information starts will be copied into
> this repository...and in this case it would take a looooonnnnngggg time...
> So that means that the replicated repository has all revision properties
> (log messages etc.) of about 800000 revisions...and after that all
> information is coming which interesting for me...

Yes, this is just what it does. The support in svnsync for "partial"
copying simply ignores the uninteresting parts of each revision tree. It
does not have a mode of operation in which some revisions can be omitted
(or extra ones added in). It assumes that the revision numbers will be
identical in the two repositories.

> So my suggestion is to think about an option for svnsync sync -r
> StartRev where to start with the synchronization or may be let svnsync
> analyze itself where the first revision is in which the folder
> /subversion exist ?
> So what do you think?
> I understand that if svnsync wouldn't replicate the revision properties
> the revision numbers of the replicated repository will change ...but for
> a partially replicated repository might that not be a problem ?

I suppose it would be possible to extend svnsync to support that sort of
thing - a bit like what "svndumpfilter" and "svnadmin load" can do.

> But what about just creating the revision properties in an other way (by
> svnsync itself) without content wouldn't that be faster?

Yes. To solve your problem quickly, you could perhaps do this outside

  * run "svnsync init"
  * fill the repository with 800000 empty revisions
  * run "svn ps --revprop -r 0 svn:sync-last-merged-rev 800000 $REPO"
  * run "svnsync sync"

(How to quickly generate empty revisions? Using the bindings should be
fast and might let you commit a completely empty revision. "svnmucc" and
"svn" do not let you commit an empty revision, but committing a revision
with some small change might be OK for your purpose. Maybe something
  seq 1 800000 |
    while read N; do
      echo $N > foo
      svnmucc -m "" put foo

I have not tried this method, so I am not sure whether it would work.
Does it sound like it would be worth trying, for you?

- Julian
Received on 2010-02-04 12:45:27 CET

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