{"thread":{"id":"9403","subject":"[PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository","startedAt":"2007-08-06T08:16:43Z","lastAt":"2007-08-10T01:43:12Z","messageCount":5,"participants":["Adam Roben","Junio C Hamano","Eric Wong","Steven Grimm"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"49993","messageId":"1186388203181-git-send-email-aroben@apple.com","threadId":"9403","inReplyTo":null,"subject":"[PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository","fromName":"Adam Roben","fromEmail":"aroben@apple.com","sentAt":"2007-08-06T08:16:43Z","receivedAt":"2007-08-06T08:16:43Z","isPatch":true,"sender":{"key":"aroben@apple.com","avatar":"https://gravatar.com/avatar/9d3697e1de53890adf241331f4b970bdd2b18962b2ff0b8028ebb00e085807f8?d=mp&s=160"},"body":"These instructions tell you how to create a clone of a repository created with\ngit-svn, that can in turn be used with git-svn.\n\nSigned-off-by: Adam Roben <aroben@apple.com>\n---\n> gitster: (3) you prepare one git-svn managed git repository, allow others to\n> clone it via git, and have each of these cloned git repositories to interact\n> with svn via git-svn -- this third mode of operation is not supported.\n> \n> spearce: be nice if someone who cared about git-svn supporting (3) either wrote\n> a patch for the documentation, or taught the tool how to do this more\n> automatically.\n\nHere's that patch. Maybe I'll get around to Shawn's second (far more ideal)\nsuggestion sometime.\n\n Documentation/git-svn.txt |   19 +++++++++++++++++++\n 1 files changed, 19 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex 0a210e4..3e3b597 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -435,6 +435,25 @@ Tracking and contributing to an entire Subversion-managed project\n # of dcommit/rebase/show-ignore should be the same as above.\n ------------------------------------------------------------------------\n \n+The initial 'git-svn clone' Subversion can be quite time-consuming (especially\n+for large repositories). If multiple people (or one person with multiple\n+machines) want to use git-svn to interact with the same Subversion repository,\n+you can do the initial 'git-svn clone' to a repository on a server and have\n+each person clone that repository with 'git clone':\n+\n+------------------------------------------------------------------------\n+# Do the initial import on a server\n+\tssh server \"cd /pub && git-svn clone http://svn.foo.org/project\n+# Clone locally\n+\tgit clone server:/pub/project\n+# Tell git-svn which branch contains the Subversion commits\n+\tgit update-ref refs/remotes/git-svn origin/master\n+# Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)\n+\tgit-svn init http://svn.foo.org/project\n+# Pull the latest changes from Subversion\n+\tgit-svn rebase\n+------------------------------------------------------------------------\n+\n REBASE VS. PULL/MERGE\n ---------------------\n \n-- \n1.5.2.2\n"},{"id":"49996","messageId":"7v643tdptt.fsf@assigned-by-dhcp.cox.net","threadId":"9403","inReplyTo":"1186388203181-git-send-email-aroben@apple.com","subject":"Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-06T08:34:06Z","receivedAt":"2007-08-06T08:34:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n\nAs I said on #git, I was just saying I got the impression that\nthis mode of operation is not supported from the #git traffic\nduring the past few days, without knowing if it is myself.\n\nMaking it clear how to do this in our documentation would help\nthose people who come to #git and ask about it, as it seems that\nmany people want to clone and share a git repository created by\ngit-svn.\n"},{"id":"50339","messageId":"20070809193759.GA4545@untitled","threadId":"9403","inReplyTo":"1186388203181-git-send-email-aroben@apple.com","subject":"Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-08-09T19:37:59Z","receivedAt":"2007-08-09T19:37:59Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Adam Roben <aroben@apple.com> wrote:\n> These instructions tell you how to create a clone of a repository created with\n> git-svn, that can in turn be used with git-svn.\n> \n> Signed-off-by: Adam Roben <aroben@apple.com>\n> ---\n> > gitster: (3) you prepare one git-svn managed git repository, allow others to\n> > clone it via git, and have each of these cloned git repositories to interact\n> > with svn via git-svn -- this third mode of operation is not supported.\n> > \n> > spearce: be nice if someone who cared about git-svn supporting (3) either wrote\n> > a patch for the documentation, or taught the tool how to do this more\n> > automatically.\n> \n> Here's that patch. Maybe I'll get around to Shawn's second (far more ideal)\n> suggestion sometime.\n> \n>  Documentation/git-svn.txt |   19 +++++++++++++++++++\n>  1 files changed, 19 insertions(+), 0 deletions(-)\n> \n> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\n> index 0a210e4..3e3b597 100644\n> --- a/Documentation/git-svn.txt\n> +++ b/Documentation/git-svn.txt\n> @@ -435,6 +435,25 @@ Tracking and contributing to an entire Subversion-managed project\n>  # of dcommit/rebase/show-ignore should be the same as above.\n>  ------------------------------------------------------------------------\n>  \n> +The initial 'git-svn clone' Subversion can be quite time-consuming (especially\n> +for large repositories). If multiple people (or one person with multiple\n> +machines) want to use git-svn to interact with the same Subversion repository,\n> +you can do the initial 'git-svn clone' to a repository on a server and have\n> +each person clone that repository with 'git clone':\n> +\n> +------------------------------------------------------------------------\n> +# Do the initial import on a server\n> +\tssh server \"cd /pub && git-svn clone http://svn.foo.org/project\n> +# Clone locally\n> +\tgit clone server:/pub/project\n> +# Tell git-svn which branch contains the Subversion commits\n> +\tgit update-ref refs/remotes/git-svn origin/master\n> +# Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)\n> +\tgit-svn init http://svn.foo.org/project\n> +# Pull the latest changes from Subversion\n> +\tgit-svn rebase\n> +------------------------------------------------------------------------\n> +\n>  REBASE VS. PULL/MERGE\n>  ---------------------\n\nThis method won't get branches and tags under the refs/remotes/\nnamespace, will it?\n\nI personally believe using rsync to clone repositories created with\ngit-svn is the simplest and best method for now.\n\n-- \nEric Wong\n"},{"id":"50360","messageId":"46BBADBB.6070502@midwinter.com","threadId":"9403","inReplyTo":"20070809193759.GA4545@untitled","subject":"Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-08-10T00:13:47Z","receivedAt":"2007-08-10T00:13:47Z","isPatch":true,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Eric Wong wrote:\n> I personally believe using rsync to clone repositories created with\n> git-svn is the simplest and best method for now.\n\nBut then you don't get to use alternates -- one of the things I like \nabout the idea of doing a \"git clone\" of a git-svn repository is that \nyou could do \"git clone -s\" and get the full svn history with a tiny \n.git directory.\n\n-Steve\n"},{"id":"50369","messageId":"20070810014312.GE9764@hand.yhbt.net","threadId":"9403","inReplyTo":"46BBADBB.6070502@midwinter.com","subject":"Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-08-10T01:43:12Z","receivedAt":"2007-08-10T01:43:12Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Steven Grimm <koreth@midwinter.com> wrote:\n> Eric Wong wrote:\n> >I personally believe using rsync to clone repositories created with\n> >git-svn is the simplest and best method for now.\n> \n> But then you don't get to use alternates -- one of the things I like \n> about the idea of doing a \"git clone\" of a git-svn repository is that \n> you could do \"git clone -s\" and get the full svn history with a tiny \n> .git directory.\n\nIf I'm working on multiple directories  on the same machine, I have\nlibflcow in my LD_PRELOAD and use cp -al (GNU-specific) to make hardlink\nimages of my working directory.  I've been using fl-cow with cp -al\nsince long before I used git.\n\nThe new-ish git-new-workdir command could probably be a replacement\nfor git-clone / flcow + cp -al / rsync in these situations as well.\n\n-- \nEric Wong\n"}]}