* git-svn and SVK mirror between two repositories
@ 2007-05-24 17:04 Vinubalaji Gopal
2007-05-25 2:13 ` Sam Vilain
2007-05-25 20:50 ` Steven Grimm
0 siblings, 2 replies; 6+ messages in thread
From: Vinubalaji Gopal @ 2007-05-24 17:04 UTC (permalink / raw)
To: git
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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-svn and SVK mirror between two repositories
2007-05-24 17:04 git-svn and SVK mirror between two repositories Vinubalaji Gopal
@ 2007-05-25 2:13 ` Sam Vilain
2007-05-26 3:26 ` Vinubalaji Gopal
2007-05-25 20:50 ` Steven Grimm
1 sibling, 1 reply; 6+ messages in thread
From: Sam Vilain @ 2007-05-25 2:13 UTC (permalink / raw)
To: Vinubalaji Gopal; +Cc: git
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
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-svn and SVK mirror between two repositories
2007-05-25 2:13 ` Sam Vilain
@ 2007-05-26 3:26 ` Vinubalaji Gopal
[not found] ` <4657B49D.4060807@vilain.net>
0 siblings, 1 reply; 6+ messages in thread
From: Vinubalaji Gopal @ 2007-05-26 3:26 UTC (permalink / raw)
To: Sam Vilain; +Cc: git
Hi Sam,
On 5/24/07, Sam Vilain <sam@vilain.net> 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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: git-svn and SVK mirror between two repositories
2007-05-24 17:04 git-svn and SVK mirror between two repositories Vinubalaji Gopal
2007-05-25 2:13 ` Sam Vilain
@ 2007-05-25 20:50 ` Steven Grimm
2007-05-26 23:34 ` Vinubalaji Gopal
1 sibling, 1 reply; 6+ messages in thread
From: Steven Grimm @ 2007-05-25 20:50 UTC (permalink / raw)
To: Vinubalaji Gopal; +Cc: git
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-26 23:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-24 17:04 git-svn and SVK mirror between two repositories Vinubalaji Gopal
2007-05-25 2:13 ` Sam Vilain
2007-05-26 3:26 ` Vinubalaji Gopal
[not found] ` <4657B49D.4060807@vilain.net>
2007-05-26 23:48 ` Vinubalaji Gopal
2007-05-25 20:50 ` Steven Grimm
2007-05-26 23:34 ` Vinubalaji Gopal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).