{"thread":{"id":"11156","subject":"[RFC] Mirroring svn","startedAt":"2007-12-06T06:22:33Z","lastAt":"2007-12-06T12:18:51Z","messageCount":5,"participants":["Harvey Harrison","Jeff King","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"62114","messageId":"1196922153.10408.101.camel@brick","threadId":"11156","inReplyTo":null,"subject":"[RFC] Mirroring svn","fromName":"Harvey Harrison","fromEmail":"harvey.harrison@gmail.com","sentAt":"2007-12-06T06:22:33Z","receivedAt":"2007-12-06T06:22:33Z","isPatch":false,"sender":{"key":"harvey.harrison@gmail.com","avatar":null},"body":"After the discussions lately regarding the gcc svn mirror.  I'm coming\nup with a recipe to set up your own git-svn mirror.  Suggestions on the\nfollowing.\n\n// Create directory and initialize git\nmkdir gcc\ncd gcc\ngit init\n// add the remote site that currently mirrors gcc\n// I have chosen the name gcc.gnu.org *1* as my local name to refer to\n// this choose something else if you like\ngit remote add gcc.gnu.org git://git.infradead.org/gcc.git\n// fetching someone else's remote branches is not a standard thing to do\n// so we'll need to edit our .git/config file\n// you should have a section that looks like:\n[remote \"gcc.gnu.org\"]\n\turl = git://git.infradead.org/gcc.git\n\tfetch = +refs/heads/*:refs/remotes/gcc.gnu.org/*\n// infradead's mirror puts the gcc svn branches in its own namespace\n// refs/remotes/gcc.gnu.org/*\n// change our fetch line accordingly\n[remote \"gcc.gnu.org\"]\n\turl = git://git.infradead.org/gcc.git\n\tfetch = +refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*\n// fetch the remote data from the mirror site\ngit remote update\n// set up git-svn\n// gcc has the standard trunk/branches/tags naming so use -s\n// add a prefix so git-svn uses the metadata we just got from the\n// mirror so we don't have to get everything from the svn server\n// the --prefix must match whatever you chose in *1*, the trailing\n// slash is important.\ngit svn init -s --prefix=gcc.gnu.org/ svn://gcc.gnu.org/svn/gcc\n// your config should look like this now:\n[core]\n\trepositoryformatversion = 0\n\tfilemode = true\n\tbare = false\n\tlogallrefupdates = true\n[remote \"gccmirror\"]\n\turl = git://git.infradead.org/gcc.git\n\tfetch = +refs/heads/*:refs/remotes/gccmirror/*\n[svn-remote \"svn\"]\n\turl = svn://gcc.gnu.org/svn/gcc\n\tfetch = trunk:refs/remotes/gcc.gnu.org/trunk\n\tbranches = branches/*:refs/remotes/gcc.gnu.org/*\n\ttags = tags/*:refs/remotes/gcc.gnu.org/tags/*\n// Try and get more revisions from the svn server\n// this may take a little while the first time as git-svn builds\n// metadata to allow bi-directional operation\ngit svn fetch\n\n\nHappy Hacking\n\nHarvey Harrison\n"},{"id":"62119","messageId":"20071206064317.GC18698@coredump.intra.peff.net","threadId":"11156","inReplyTo":"1196922153.10408.101.camel@brick","subject":"Re: [RFC] Mirroring svn","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-06T06:43:17Z","receivedAt":"2007-12-06T06:43:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Dec 05, 2007 at 10:22:33PM -0800, Harvey Harrison wrote:\n\n> // fetching someone else's remote branches is not a standard thing to do\n> // so we'll need to edit our .git/config file\n> // you should have a section that looks like:\n> [remote \"gcc.gnu.org\"]\n> \turl = git://git.infradead.org/gcc.git\n> \tfetch = +refs/heads/*:refs/remotes/gcc.gnu.org/*\n> // infradead's mirror puts the gcc svn branches in its own namespace\n> // refs/remotes/gcc.gnu.org/*\n> // change our fetch line accordingly\n> [remote \"gcc.gnu.org\"]\n> \turl = git://git.infradead.org/gcc.git\n> \tfetch = +refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*\n\nFWIW, if you are writing a shell recipe for other people to cut and\npaste, you can say this as:\n\n  git config remote.gcc.gnu.org.fetch \\\n    '+refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*'\n\n-Peff\n"},{"id":"62120","messageId":"1196923525.10408.103.camel@brick","threadId":"11156","inReplyTo":"20071206064317.GC18698@coredump.intra.peff.net","subject":"Re: [RFC] Mirroring svn","fromName":"Harvey Harrison","fromEmail":"harvey.harrison@gmail.com","sentAt":"2007-12-06T06:45:25Z","receivedAt":"2007-12-06T06:45:25Z","isPatch":false,"sender":{"key":"harvey.harrison@gmail.com","avatar":null},"body":"On Thu, 2007-12-06 at 01:43 -0500, Jeff King wrote:\n> On Wed, Dec 05, 2007 at 10:22:33PM -0800, Harvey Harrison wrote:\n> \n> > // fetching someone else's remote branches is not a standard thing to do\n> > // so we'll need to edit our .git/config file\n> > // you should have a section that looks like:\n> > [remote \"gcc.gnu.org\"]\n> > \turl = git://git.infradead.org/gcc.git\n> > \tfetch = +refs/heads/*:refs/remotes/gcc.gnu.org/*\n> > // infradead's mirror puts the gcc svn branches in its own namespace\n> > // refs/remotes/gcc.gnu.org/*\n> > // change our fetch line accordingly\n> > [remote \"gcc.gnu.org\"]\n> > \turl = git://git.infradead.org/gcc.git\n> > \tfetch = +refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*\n> \n> FWIW, if you are writing a shell recipe for other people to cut and\n> paste, you can say this as:\n> \n>   git config remote.gcc.gnu.org.fetch \\\n>     '+refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*'\n\nI thought about that, but I like to encourage people to actually look at\nthe config file, it's pretty easy to understand.\n\nHarvey\n"},{"id":"62139","messageId":"Pine.LNX.4.64.0712061214340.27959@racer.site","threadId":"11156","inReplyTo":"1196923525.10408.103.camel@brick","subject":"Re: [RFC] Mirroring svn","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-12-06T12:15:47Z","receivedAt":"2007-12-06T12:15:47Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 5 Dec 2007, Harvey Harrison wrote:\n\n> On Thu, 2007-12-06 at 01:43 -0500, Jeff King wrote:\n> > On Wed, Dec 05, 2007 at 10:22:33PM -0800, Harvey Harrison wrote:\n> > \n> > > // fetching someone else's remote branches is not a standard thing to do\n> > > // so we'll need to edit our .git/config file\n> > > // you should have a section that looks like:\n> > > [remote \"gcc.gnu.org\"]\n> > > \turl = git://git.infradead.org/gcc.git\n> > > \tfetch = +refs/heads/*:refs/remotes/gcc.gnu.org/*\n> > > // infradead's mirror puts the gcc svn branches in its own namespace\n> > > // refs/remotes/gcc.gnu.org/*\n> > > // change our fetch line accordingly\n> > > [remote \"gcc.gnu.org\"]\n> > > \turl = git://git.infradead.org/gcc.git\n> > > \tfetch = +refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*\n> > \n> > FWIW, if you are writing a shell recipe for other people to cut and\n> > paste, you can say this as:\n> > \n> >   git config remote.gcc.gnu.org.fetch \\\n> >     '+refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*'\n> \n> I thought about that, but I like to encourage people to actually look at \n> the config file, it's pretty easy to understand.\n\nI agree that people should be encouraged to edit their .git/config.  But a \nrecipe is something easy-to-follow IMHO, so I would write this as a shell \nscript (with #-comments, not //-comments).\n\nCiao,\nDscho\n"},{"id":"62140","messageId":"1196943531.13311.0.camel@brick","threadId":"11156","inReplyTo":"Pine.LNX.4.64.0712061214340.27959@racer.site","subject":"Re: [RFC] Mirroring svn","fromName":"Harvey Harrison","fromEmail":"harvey.harrison@gmail.com","sentAt":"2007-12-06T12:18:51Z","receivedAt":"2007-12-06T12:18:51Z","isPatch":false,"sender":{"key":"harvey.harrison@gmail.com","avatar":null},"body":"On Thu, 2007-12-06 at 12:15 +0000, Johannes Schindelin wrote:\n> Hi,\n> \n> On Wed, 5 Dec 2007, Harvey Harrison wrote:\n> \n> > On Thu, 2007-12-06 at 01:43 -0500, Jeff King wrote:\n> > > On Wed, Dec 05, 2007 at 10:22:33PM -0800, Harvey Harrison wrote:\n> > > \n> > > > // fetching someone else's remote branches is not a standard thing to do\n> > > > // so we'll need to edit our .git/config file\n> > > > // you should have a section that looks like:\n> > > > [remote \"gcc.gnu.org\"]\n> > > > \turl = git://git.infradead.org/gcc.git\n> > > > \tfetch = +refs/heads/*:refs/remotes/gcc.gnu.org/*\n> > > > // infradead's mirror puts the gcc svn branches in its own namespace\n> > > > // refs/remotes/gcc.gnu.org/*\n> > > > // change our fetch line accordingly\n> > > > [remote \"gcc.gnu.org\"]\n> > > > \turl = git://git.infradead.org/gcc.git\n> > > > \tfetch = +refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*\n> > > \n> > > FWIW, if you are writing a shell recipe for other people to cut and\n> > > paste, you can say this as:\n> > > \n> > >   git config remote.gcc.gnu.org.fetch \\\n> > >     '+refs/remotes/gcc.gnu.org/*:refs/remotes/gcc.gnu.org/*'\n> > \n> > I thought about that, but I like to encourage people to actually look at \n> > the config file, it's pretty easy to understand.\n> \n> I agree that people should be encouraged to edit their .git/config.  But a \n> recipe is something easy-to-follow IMHO, so I would write this as a shell \n> script (with #-comments, not //-comments).\n\nI'll probably turn it into such eventually, this was more of a\nhand-holding exercise for people who would like to try git in gcc-land.\n\nHarvey\n"}]}