git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository
@ 2007-08-06  8:16 Adam Roben
  2007-08-06  8:34 ` Junio C Hamano
  2007-08-09 19:37 ` Eric Wong
  0 siblings, 2 replies; 5+ messages in thread
From: Adam Roben @ 2007-08-06  8:16 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Shawn O. Pearce, Eric Wong, Adam Roben

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
 ---------------------
 
-- 
1.5.2.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository
  2007-08-06  8:16 [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository Adam Roben
@ 2007-08-06  8:34 ` Junio C Hamano
  2007-08-09 19:37 ` Eric Wong
  1 sibling, 0 replies; 5+ messages in thread
From: Junio C Hamano @ 2007-08-06  8:34 UTC (permalink / raw)
  To: Adam Roben; +Cc: git, Shawn O. Pearce, Eric Wong

Thanks.

As I said on #git, I was just saying I got the impression that
this mode of operation is not supported from the #git traffic
during the past few days, without knowing if it is myself.

Making it clear how to do this in our documentation would help
those people who come to #git and ask about it, as it seems that
many people want to clone and share a git repository created by
git-svn.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository
  2007-08-06  8:16 [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository Adam Roben
  2007-08-06  8:34 ` Junio C Hamano
@ 2007-08-09 19:37 ` Eric Wong
  2007-08-10  0:13   ` Steven Grimm
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Wong @ 2007-08-09 19:37 UTC (permalink / raw)
  To: Adam Roben; +Cc: git, Junio C Hamano, Shawn O. Pearce

Adam Roben <aroben@apple.com> wrote:
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository
  2007-08-09 19:37 ` Eric Wong
@ 2007-08-10  0:13   ` Steven Grimm
  2007-08-10  1:43     ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Grimm @ 2007-08-10  0:13 UTC (permalink / raw)
  To: Eric Wong; +Cc: Adam Roben, git, Junio C Hamano, Shawn O. Pearce

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

But then you don't get to use alternates -- one of the things I like 
about the idea of doing a "git clone" of a git-svn repository is that 
you could do "git clone -s" and get the full svn history with a tiny 
.git directory.

-Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository
  2007-08-10  0:13   ` Steven Grimm
@ 2007-08-10  1:43     ` Eric Wong
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Wong @ 2007-08-10  1:43 UTC (permalink / raw)
  To: Steven Grimm; +Cc: Adam Roben, git, Junio C Hamano, Shawn O. Pearce

Steven Grimm <koreth@midwinter.com> wrote:
> Eric Wong wrote:
> >I personally believe using rsync to clone repositories created with
> >git-svn is the simplest and best method for now.
> 
> But then you don't get to use alternates -- one of the things I like 
> about the idea of doing a "git clone" of a git-svn repository is that 
> you could do "git clone -s" and get the full svn history with a tiny 
> .git directory.

If I'm working on multiple directories  on the same machine, I have
libflcow in my LD_PRELOAD and use cp -al (GNU-specific) to make hardlink
images of my working directory.  I've been using fl-cow with cp -al
since long before I used git.

The new-ish git-new-workdir command could probably be a replacement
for git-clone / flcow + cp -al / rsync in these situations as well.

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-10  1:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-06  8:16 [PATCH] Documentation/git-svn: Instructions for cloning a git-svn-created repository Adam Roben
2007-08-06  8:34 ` Junio C Hamano
2007-08-09 19:37 ` Eric Wong
2007-08-10  0:13   ` Steven Grimm
2007-08-10  1:43     ` Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).