git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 9, 2007, 19:37 UTC
Message-ID
<20070809193759.GA4545@untitled>
In-Reply-To
<1186388203181-git-send-email-aroben@apple.com>
Adam Roben <aroben@apple.com> wrote:
Show 48 quoted lines
> These instructions tell you how to create a clone of a repository created with
> git-svn, that can in turn be used with git-svn.
> 
> Signed-off-by: Adam Roben <aroben@apple.com>
> ---
> > gitster: (3) you prepare one git-svn managed git repository, allow others to
> > clone it via git, and have each of these cloned git repositories to interact
> > with svn via git-svn -- this third mode of operation is not supported.
> > 
> > spearce: be nice if someone who cared about git-svn supporting (3) either wrote
> > a patch for the documentation, or taught the tool how to do this more
> > automatically.
> 
> Here's that patch. Maybe I'll get around to Shawn's second (far more ideal)
> suggestion sometime.
> 
>  Documentation/git-svn.txt |   19 +++++++++++++++++++
>  1 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
> index 0a210e4..3e3b597 100644
> --- a/Documentation/git-svn.txt
> +++ b/Documentation/git-svn.txt
> @@ -435,6 +435,25 @@ Tracking and contributing to an entire Subversion-managed project
>  # of dcommit/rebase/show-ignore should be the same as above.
>  ------------------------------------------------------------------------
>  
> +The initial 'git-svn clone' Subversion can be quite time-consuming (especially
> +for large repositories). If multiple people (or one person with multiple
> +machines) want to use git-svn to interact with the same Subversion repository,
> +you can do the initial 'git-svn clone' to a repository on a server and have
> +each person clone that repository with 'git clone':
> +
> +------------------------------------------------------------------------
> +# Do the initial import on a server
> +	ssh server "cd /pub && git-svn clone http://svn.foo.org/project
> +# Clone locally
> +	git clone server:/pub/project
> +# Tell git-svn which branch contains the Subversion commits
> +	git update-ref refs/remotes/git-svn origin/master
> +# Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
> +	git-svn init http://svn.foo.org/project
> +# Pull the latest changes from Subversion
> +	git-svn rebase
> +------------------------------------------------------------------------
> +
>  REBASE VS. PULL/MERGE
>  ---------------------

This method won't get branches and tags under the refs/remotes/ namespace, will it?

I personally believe using rsync to clone repositories created with git-svn is the simplest and best method for now.

-- 
Eric Wong
Previous: Junio C HamanoNext: Steven Grimm
Message 3 of 5 in “Documentation/git-svn: Instructions for cloning a git-svn-created repository”
  1. Documentation/git-svn: Instructions for cloning a git-svn-created repositoryAdam Roben, Aug 6, 2007
  2. Junio C HamanoAug 6, 2007
  3. Eric WongAug 9, 2007
  4. Steven GrimmAug 10, 2007
  5. Eric WongAug 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.