Subject: Re: git-svn and SVK mirror between two repositories

From: Sam Vilain <[email-masked]>
Date: Fri, 25 May 2007 14:13:31 +1200

Vinubalaji,

You should be able to track both of the svn repositories as different
git-svn remotes.  You can then move patches between them with
git-format-patch and git-apply (or git-cherry-pick).

git-merge-base calculations won't work when operating like this - so
git-merge won't work - however the simple merge base token used by SVK
to track this would be easy to implement using git-tag and
git-update-ref, so you could get yourself something as useful as svk
smerge (which is really just mass cherry picking, using a token to
remember what it last picked).

A better implementation would be to allow git-svn to spot that the
repositories are tracking the same history and make sure they end up
with the same commits, then git-merge could work.

However, you are in a relatively obscure use case, most projects
wouldn't do this.  Note also that the merge tickets SVK would use are
not portable between different SVK mirrors so the merge information is
not retrievable for anyone other than the person who did the merge.  Use
"svn pg svk:merge svn://svn.paris.fr/" if you don't believe me... the
UUID and revision numbers in the property will not refer to revisions in
svn://svn.paris.fr/ but to the (private) SVN repository in the SVK depot.

Sam.

Vinubalaji Gopal wrote:
> Hi all,
>     I have been trying hard to find if it is possible to mirror (or
> clone in git-svn terms) two svn repositories and update changes from
> one to other or do even more complex operations with these two
> repositories. I did check the git-svn man page, but was lost without a
> proper example. Can someone please provide me with an example of using
> two svn repositories in git-svn and doing merge operations, etc .
> 
> I have used SVK for a long time and it was very much possible to use
> two svn repositories using the SVK FAQ entry as shown below:
> 
> Repository ONE in Paris, repository TWO in London and be able to
> create 2 mirrors then smerge both, doing it on a node in Berlin and
> using the mirror function?
> Sure. Simply do this:
> 
> svk mirror svn://svn.paris.fr/ //paris
> svk mirror svn://svn.london.uk/ //london
> 
> # pick a sensible base, or use --baseless
> svk smerge --base=1234 //paris //london
> 
> # ... and smerge between them normally ...
> svk smerge -I //london //paris
> svk smerge -I //paris //london
> 
> 
>