git-svn and SVK mirror between two repositories

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

git-svn and SVK mirror between two repositories

From: Vinubalaji Gopal <hidden>
Date: 2016-06-15 22:43:12

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



-- 
Vinu

In a world without fences who needs Gates?

Re: git-svn and SVK mirror between two repositories

From: Sam Vilain <hidden>
Date: 2016-06-15 22:43:12

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

Re: git-svn and SVK mirror between two repositories

From: Steven Grimm <hidden>
Date: 2016-06-15 22:43:12

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 don't know how svk would change things, but I did something similar 
and wrote it up here:

http://thread.gmane.org/gmane.comp.version-control.git/45060

-Steve

Re: git-svn and SVK mirror between two repositories

From: Vinubalaji Gopal <hidden>
Date: 2016-06-15 22:43:12

Hi Sam,

On 5/24/07, Sam Vilain [off-list ref] wrote:
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
hm I am not looking for a complete bidirectional flow. I have a
project (say my great open source project) in svn for which I have
only read access.  Since I don't have a write access, I have a
personal svn sandbox for which I have complete read-write access and I
branch the trunk into this svn sandbox. I commit all my changes to my
sandbox so that I don't loose all my data in case my system fails! I
also setup a local branch to which I can commit when I don't have a
network access.

With Svk it has been (skipping the local branch step for now)
svk mirror <myproject_svn_url>/trunk //trunk
svk mirror <myproject_svn_sandbox_url>/mybranch //mybranch
svk smerge --baseless //trunk //mybranch -m 'first merge'

I also have a local branch in svk: (local branch setup)
svk copy //mybranch //localbranch -m 'local svk branch'

and occasionally enter the following commands to get the latest in trunk:
svk smerge //trunk //mybranch
or
svk smerge //mybranch //localbranch
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.
that is scary since I am not sure if I still have that local repository now.

I would look into your patch suggestion for sure, but also open for
other suggestions . I am thinking if I should host the project in a
different public git server  (for now) instead of my svn sandbox and
it will be easier :).

-- 
Vinu

In a world without fences who needs Gates?

Re: git-svn and SVK mirror between two repositories

From: Vinubalaji Gopal <hidden>
Date: 2016-06-15 22:43:12

On 5/25/07, Steven Grimm [off-list ref] wrote:
I don't know how svk would change things, but I did something similar
and wrote it up here:
http://thread.gmane.org/gmane.comp.version-control.git/45060
Looks good and I am almost looking for the same thing. I just want to
get rid of svk and use only git to manage the same thing. It would be
great if you could share the commands you used to have that kind of
setup.

-- 
Vinu

In a world without fences who needs Gates?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help