{"thread":{"id":"18686","subject":"How to sync two svn repositories via git?","startedAt":"2009-04-01T22:30:52Z","lastAt":"2009-04-02T10:36:59Z","messageCount":3,"participants":["Josef Wolf","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"110170","messageId":"20090401223052.GA28619@raven.wolf.lan","threadId":"18686","inReplyTo":null,"subject":"How to sync two svn repositories via git?","fromName":"Josef Wolf","fromEmail":"jw@raven.inka.de","sentAt":"2009-04-01T22:30:52Z","receivedAt":"2009-04-01T22:30:52Z","isPatch":false,"sender":{"key":"jw@raven.inka.de","avatar":null},"body":"Hello,\n\nI have two subversion repositories which I would like to synchronize via\ngit-svn.  For this, I have set up a git repository and configured two\nbranches to track the subversion repositories via git-svn:\n\n    mkdir test-sync\n    cd    test-sync\n    git svn init --stdlayout file://$REPOSDIR/svn-first\n\n    for repos in svn-first svn-second; do\n        git config svn-remote.$repos.url      file://$REPOSDIR/$repos\n        git config svn-remote.$repos.fetch    trunk:refs/remotes/$repos/trunk\n        git config svn-remote.$repos.branches branches/*:refs/remotes/$repos/*\n        git config svn-remote.$repos.tags     tags/*:refs/remotes/$repos/tags/*\n        git svn fetch -R $repos\n        git checkout -b $repos $repos/trunk\n    done\n    git gc\n\nThis gives me two remote and two local branches:\n\n    master                                                                                    \n    svn-first                                                                                 \n  * svn-second                                                                                \n    svn-first/trunk                                                                           \n    svn-second/trunk                                                                          \n\nThe first step I'd like to do is to \"mirror\" the manual merges that were\ndone between the subversion repositories in the past:\n\n    git checkout svn-first\n    git merge -s ours --log commit-of-the-first-merge-in-svn-second\n\n    git checkout svn-second\n    git merge -s ours --log commit-of-the-first-merge-in-svn-first\n\nThis seems to work, but git-gui shows conflicts.  How can I get conflicts\nwhen I use the \"-s ours\" merge strategy?\n"},{"id":"110199","messageId":"49D46C2B.3080100@drmicha.warpmail.net","threadId":"18686","inReplyTo":"20090401223052.GA28619@raven.wolf.lan","subject":"Re: How to sync two svn repositories via git?","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-04-02T07:41:31Z","receivedAt":"2009-04-02T07:41:31Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Josef Wolf venit, vidit, dixit 02.04.2009 00:30:\n> Hello,\n> \n> I have two subversion repositories which I would like to synchronize via\n> git-svn.  For this, I have set up a git repository and configured two\n> branches to track the subversion repositories via git-svn:\n> \n>     mkdir test-sync\n>     cd    test-sync\n>     git svn init --stdlayout file://$REPOSDIR/svn-first\n> \n>     for repos in svn-first svn-second; do\n>         git config svn-remote.$repos.url      file://$REPOSDIR/$repos\n>         git config svn-remote.$repos.fetch    trunk:refs/remotes/$repos/trunk\n>         git config svn-remote.$repos.branches branches/*:refs/remotes/$repos/*\n>         git config svn-remote.$repos.tags     tags/*:refs/remotes/$repos/tags/*\n>         git svn fetch -R $repos\n>         git checkout -b $repos $repos/trunk\n>     done\n>     git gc\n> \n> This gives me two remote and two local branches:\n> \n>     master                                                                                    \n>     svn-first                                                                                 \n>   * svn-second                                                                                \n>     svn-first/trunk                                                                           \n>     svn-second/trunk                                                                          \n> \n> The first step I'd like to do is to \"mirror\" the manual merges that were\n> done between the subversion repositories in the past:\n> \n>     git checkout svn-first\n>     git merge -s ours --log commit-of-the-first-merge-in-svn-second\n> \n>     git checkout svn-second\n>     git merge -s ours --log commit-of-the-first-merge-in-svn-first\n> \n> This seems to work, but git-gui shows conflicts.  How can I get conflicts\n> when I use the \"-s ours\" merge strategy?\n\nWhat do git status and git diff (--stat, --combined) say?\n"},{"id":"110204","messageId":"20090402103659.GB28619@raven.wolf.lan","threadId":"18686","inReplyTo":"49D46C2B.3080100@drmicha.warpmail.net","subject":"Re: How to sync two svn repositories via git?","fromName":"Josef Wolf","fromEmail":"jw@raven.inka.de","sentAt":"2009-04-02T10:36:59Z","receivedAt":"2009-04-02T10:36:59Z","isPatch":false,"sender":{"key":"jw@raven.inka.de","avatar":null},"body":"On Thu, Apr 02, 2009 at 09:41:31AM +0200, Michael J Gruber wrote:\n> Josef Wolf venit, vidit, dixit 02.04.2009 00:30:\n[ ... ]\n> > The first step I'd like to do is to \"mirror\" the manual merges that were\n> > done between the subversion repositories in the past:\n> > \n> >     git checkout svn-first\n> >     git merge -s ours --log commit-of-the-first-merge-in-svn-second\n> > \n> >     git checkout svn-second\n> >     git merge -s ours --log commit-of-the-first-merge-in-svn-first\n> > \n> > This seems to work, but git-gui shows conflicts.  How can I get conflicts\n> > when I use the \"-s ours\" merge strategy?\n> \n> What do git status and git diff (--stat, --combined) say?\n\nUmm, that's somewhat odd.\n\nDirectly after the merge commands, gitk says there are local modifications.\nThen I run \"git status\" which says the working directory is clean.  Then\nI re-run gitk, which _now_ shows no local modifications any more.\n"}]}