{"thread":{"id":"8298","subject":"git-svn and SVK mirror between two repositories","startedAt":"2007-05-24T17:04:46Z","lastAt":"2007-05-26T23:48:25Z","messageCount":6,"participants":["Vinubalaji Gopal","Sam Vilain","Steven Grimm"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"43150","messageId":"7d8fb81e0705241004u1c52fa7aub42d3793d4bfeaa7@mail.gmail.com","threadId":"8298","inReplyTo":null,"subject":"git-svn and SVK mirror between two repositories","fromName":"Vinubalaji Gopal","fromEmail":"vinubalaji@gmail.com","sentAt":"2007-05-24T17:04:46Z","receivedAt":"2007-05-24T17:04:46Z","isPatch":false,"sender":{"key":"vinubalaji@gmail.com","avatar":null},"body":"Hi all,\n    I have been trying hard to find if it is possible to mirror (or\nclone in git-svn terms) two svn repositories and update changes from\none to other or do even more complex operations with these two\nrepositories. I did check the git-svn man page, but was lost without a\nproper example. Can someone please provide me with an example of using\ntwo svn repositories in git-svn and doing merge operations, etc .\n\nI have used SVK for a long time and it was very much possible to use\ntwo svn repositories using the SVK FAQ entry as shown below:\n\nRepository ONE in Paris, repository TWO in London and be able to\ncreate 2 mirrors then smerge both, doing it on a node in Berlin and\nusing the mirror function?\nSure. Simply do this:\n\nsvk mirror svn://svn.paris.fr/ //paris\nsvk mirror svn://svn.london.uk/ //london\n\n# pick a sensible base, or use --baseless\nsvk smerge --base=1234 //paris //london\n\n# ... and smerge between them normally ...\nsvk smerge -I //london //paris\nsvk smerge -I //paris //london\n\n\n\n-- \nVinu\n\nIn a world without fences who needs Gates?\n"},{"id":"43208","messageId":"4656464B.7010101@vilain.net","threadId":"8298","inReplyTo":"7d8fb81e0705241004u1c52fa7aub42d3793d4bfeaa7@mail.gmail.com","subject":"Re: git-svn and SVK mirror between two repositories","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2007-05-25T02:13:31Z","receivedAt":"2007-05-25T02:13:31Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Vinubalaji,\n\nYou should be able to track both of the svn repositories as different\ngit-svn remotes.  You can then move patches between them with\ngit-format-patch and git-apply (or git-cherry-pick).\n\ngit-merge-base calculations won't work when operating like this - so\ngit-merge won't work - however the simple merge base token used by SVK\nto track this would be easy to implement using git-tag and\ngit-update-ref, so you could get yourself something as useful as svk\nsmerge (which is really just mass cherry picking, using a token to\nremember what it last picked).\n\nA better implementation would be to allow git-svn to spot that the\nrepositories are tracking the same history and make sure they end up\nwith the same commits, then git-merge could work.\n\nHowever, you are in a relatively obscure use case, most projects\nwouldn't do this.  Note also that the merge tickets SVK would use are\nnot portable between different SVK mirrors so the merge information is\nnot retrievable for anyone other than the person who did the merge.  Use\n\"svn pg svk:merge svn://svn.paris.fr/\" if you don't believe me... the\nUUID and revision numbers in the property will not refer to revisions in\nsvn://svn.paris.fr/ but to the (private) SVN repository in the SVK depot.\n\nSam.\n\n\nVinubalaji Gopal wrote:\n> Hi all,\n>     I have been trying hard to find if it is possible to mirror (or\n> clone in git-svn terms) two svn repositories and update changes from\n> one to other or do even more complex operations with these two\n> repositories. I did check the git-svn man page, but was lost without a\n> proper example. Can someone please provide me with an example of using\n> two svn repositories in git-svn and doing merge operations, etc .\n> \n> I have used SVK for a long time and it was very much possible to use\n> two svn repositories using the SVK FAQ entry as shown below:\n> \n> Repository ONE in Paris, repository TWO in London and be able to\n> create 2 mirrors then smerge both, doing it on a node in Berlin and\n> using the mirror function?\n> Sure. Simply do this:\n> \n> svk mirror svn://svn.paris.fr/ //paris\n> svk mirror svn://svn.london.uk/ //london\n> \n> # pick a sensible base, or use --baseless\n> svk smerge --base=1234 //paris //london\n> \n> # ... and smerge between them normally ...\n> svk smerge -I //london //paris\n> svk smerge -I //paris //london\n> \n> \n> \n"},{"id":"43287","messageId":"46574C23.3080500@midwinter.com","threadId":"8298","inReplyTo":"7d8fb81e0705241004u1c52fa7aub42d3793d4bfeaa7@mail.gmail.com","subject":"Re: git-svn and SVK mirror between two repositories","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-05-25T20:50:43Z","receivedAt":"2007-05-25T20:50:43Z","isPatch":false,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Vinubalaji Gopal wrote:\n> Hi all,\n>    I have been trying hard to find if it is possible to mirror (or\n> clone in git-svn terms) two svn repositories and update changes from\n> one to other or do even more complex operations with these two\n> repositories. \n\nI don't know how svk would change things, but I did something similar \nand wrote it up here:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/45060\n\n-Steve\n"},{"id":"43319","messageId":"7d8fb81e0705252026q46b7f58dx25f249e8e888c150@mail.gmail.com","threadId":"8298","inReplyTo":"4656464B.7010101@vilain.net","subject":"Re: git-svn and SVK mirror between two repositories","fromName":"Vinubalaji Gopal","fromEmail":"vinubalaji@gmail.com","sentAt":"2007-05-26T03:26:31Z","receivedAt":"2007-05-26T03:26:31Z","isPatch":false,"sender":{"key":"vinubalaji@gmail.com","avatar":null},"body":"Hi Sam,\n\nOn 5/24/07, Sam Vilain <sam@vilain.net> wrote:\n> However, you are in a relatively obscure use case, most projects\n> wouldn't do this.  Note also that the merge tickets SVK would use are\n\nhm I am not looking for a complete bidirectional flow. I have a\nproject (say my great open source project) in svn for which I have\nonly read access.  Since I don't have a write access, I have a\npersonal svn sandbox for which I have complete read-write access and I\nbranch the trunk into this svn sandbox. I commit all my changes to my\nsandbox so that I don't loose all my data in case my system fails! I\nalso setup a local branch to which I can commit when I don't have a\nnetwork access.\n\nWith Svk it has been (skipping the local branch step for now)\nsvk mirror <myproject_svn_url>/trunk //trunk\nsvk mirror <myproject_svn_sandbox_url>/mybranch //mybranch\nsvk smerge --baseless //trunk //mybranch -m 'first merge'\n\nI also have a local branch in svk: (local branch setup)\nsvk copy //mybranch //localbranch -m 'local svk branch'\n\nand occasionally enter the following commands to get the latest in trunk:\nsvk smerge //trunk //mybranch\nor\nsvk smerge //mybranch //localbranch\n\n>the UUID and revision numbers in the property will not refer to revisions in\n>svn://svn.paris.fr/ but to the (private) SVN repository in the SVK depot.\nthat is scary since I am not sure if I still have that local repository now.\n\nI would look into your patch suggestion for sure, but also open for\nother suggestions . I am thinking if I should host the project in a\ndifferent public git server  (for now) instead of my svn sandbox and\nit will be easier :).\n\n-- \nVinu\n\nIn a world without fences who needs Gates?\n"},{"id":"43381","messageId":"7d8fb81e0705261634o503850bcn6fef3a94f90cdfc2@mail.gmail.com","threadId":"8298","inReplyTo":"46574C23.3080500@midwinter.com","subject":"Re: git-svn and SVK mirror between two repositories","fromName":"Vinubalaji Gopal","fromEmail":"vinubalaji@gmail.com","sentAt":"2007-05-26T23:34:06Z","receivedAt":"2007-05-26T23:34:06Z","isPatch":false,"sender":{"key":"vinubalaji@gmail.com","avatar":null},"body":"On 5/25/07, Steven Grimm <koreth@midwinter.com> wrote:\n> I don't know how svk would change things, but I did something similar\n> and wrote it up here:\n> http://thread.gmane.org/gmane.comp.version-control.git/45060\n\nLooks good and I am almost looking for the same thing. I just want to\nget rid of svk and use only git to manage the same thing. It would be\ngreat if you could share the commands you used to have that kind of\nsetup.\n\n-- \nVinu\n\nIn a world without fences who needs Gates?\n"},{"id":"43384","messageId":"7d8fb81e0705261648l44a3835u1f64bea4e772acc@mail.gmail.com","threadId":"8298","inReplyTo":"4657B49D.4060807@vilain.net","subject":"Re: git-svn and SVK mirror between two repositories","fromName":"Vinubalaji Gopal","fromEmail":"vinubalaji@gmail.com","sentAt":"2007-05-26T23:48:25Z","receivedAt":"2007-05-26T23:48:25Z","isPatch":false,"sender":{"key":"vinubalaji@gmail.com","avatar":null},"body":"On 5/25/07, Sam Vilain <sam@vilain.net> wrote:\n> Sounds a bit simpler than I thought - check out my tutorial on this\n> http://utsl.gen.nz/talks/git-svn/intro.html\nI did go through that link before posting here. I don't have my svk\ndepotmap now and I want to skip the svk initialization again. I reread\nthat tutorial again to see if I missed something, but could not find\nanything that I could use.\n\nHere is how it is now - I had a project which I branched using svk.\nSay the project I branched was at revision r1000. I added a lot of\nchanges to r1000 in my local svk branch. I committed all this changes\nto my svn sandbox using smerge. At times I also updated from the trunk\nusing smerge. So the svn sandbox has  all my local changes and the\nlatest from the trunk upto some point.\n\nNow I have a different machine with no svk  - I have my svn sandbox\nwith all my changes and changes from the trunk upto some point (say\nr1500 and the trunk is now at r1650). How do I setup git to use my svn\nsandbox and the svn trunk with no svk anywhere now and have the same\nkind of setup?\n\n\n-- \nVinu\n\nIn a world without fences who needs Gates?\n"}]}