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

Mirroring subtree of a repo into subtree of another repo (was Re: Help with Python SWIG bindings and callbacks)

From: Lawrence Stewart <lstewart_at_room52.net>
Date: Tue, 26 Aug 2008 12:16:12 +1000

Hi Blair,

(I'm changing the subject to reflect the different question we're now
discussing)

Blair Zajac wrote:
> Lawrence Stewart wrote:
>> As a bit of background, I'm trying to create a script that allows me
>> to mirror a portion of a remote repo into my own development repo as a
>> vendor branch. The existing tools just don't seem to cut it for this
>> use case and hacking the svn C code seemed a bit extreme to get
>> something working relatively quickly. Given the trouble I'm having
>> with the bindings perhaps I should have just dived straight into
>> writing a small C app. I'm willing to be told otherwise if someone
>> here has/knows such a tool in which case my need for python bindings
>> disappears :)
>
> Have you taken a look at svk? This does most of this already.
>
> http://svk.bestpractical.com/view/HomePage

Yes I've used SVK and it is indeed a great tool. However it requires me
to mirror the entire remote repo which is a pain and it doesn't allow us
to keep our centralised svn infrastructure ticking along.

To paint a picture of the use case I'm trying to work towards... I do
FreeBSD development work and run a svnsync mirror of the offial FreeBSD
svn repo (180000+ commits) at work. Because of the way svnsync works,
this repo is obviously read only. I (along with other colleagues) have
various projects related to FreeBSD we're working on so we have a second
repo which we do our freebsd development work in. It's structured as:

/
|
|-project1/
| |
| |-trunk/
| |
| |-8.x
| |
| |-7.x
|
|-project2/
| |
| |-trunk/
| |
| |-8.x
|
|-vendor/
| |
| |-freebsd/
| |
| |-8.x
| |
| |-7.x

We create projects by branching off the appropriate freebsd X.X vendor
branch, and create our patches to pass upstream to the freebsd guys by
diffing our branch against the vendor branch we branched off.

The freebsd source code is very large (100+MB and thousands of files) so
having a shared vendor branch between all our freebsd projects is a huge
win.

We periodically import snapshots of our freebsd mirror repo into our
local development repo's vendor subtree and merge changes back into our
project branches, but this is a pain and we loose granularity of
information in the FreeBSD commits, the ability to roll back/forward etc
etc. What I want is a script I can run that will do a blow-by-blow
replay of commits into each vendor branch so I can track each commit
that went on in the upstream FreeBSD repository.

I currently use a ruby tool called Piston (http://piston.rubyforge.org/)
which is the best I've found so far. It is however not ideal for working
on code bases the size of FreeBSD. It also only does batched commits
which is a pain (yes, I can make it "batch" on a commit by commit basis
but it's incredibly slow and is fragile because it parses the output of
the svn cmd line tools instead of usng the APIs). A tool that made use
of the SVN APIs directly would do a much better job, hence my attempt to
try and hack up a script to do this.

Alternatively, if there is work in progress to allow an svnsync mirror
to become read/write capable e.g. define a subdir that is the read only
mirror of the upstream repo and all other parts of the local repo can be
written to, I'd be happy to contribute to that effort.

Cheers,
Lawrence

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-26 04:16:31 CEST

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