git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Vilain <sam@vilain.net>
To: Dennis Schridde <devurandom@gmx.net>
Cc: Git Mailing List <git@vger.kernel.org>,
	Eric Wong <normalperson@yhbt.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: Odd number of elements in anonymous hash
Date: Fri, 25 Jan 2008 12:10:02 +1300	[thread overview]
Message-ID: <47991ACA.7010507@vilain.net> (raw)
In-Reply-To: <200801241513.45088.devurandom@gmx.net>

Dennis Schridde wrote:
>>> Server: git config:
>>> ------
 [...]
>>> [svn-remote "svn"]
>>>         useSvnsyncProps = 1
>>>         url = file:///var/svn/warzone2100
>>>         fetch = trunk:refs/remotes/trunk
>>>         branches = branches/*:refs/remotes/*
>>>         tags = tags/*:refs/remotes/tags/*
>>> ------
 [...]
>>> Local config:
>>> ------
 [...]
>>> [remote "origin"]
>>>         url = git://git.kynes.de/org.gna.warzone2100.git
>>>         fetch = +refs/heads/*:refs/remotes/origin/*
>> You need to make that:
>>
>>   fetch = refs/remotes/*:refs/remotes/*
>>
>> And re-run 'git fetch' to use git-svn fetch on the cloned repository.
>> git-svn is expecting the refs/ space to be populated in the same way
>> that it is on the repository doing the initial fetch.
> Thanks a lot!
> That worked!
> 
> Possibly you should update the manpage, so no others run into this.
> It currently just says:
>        # Tell git-svn which branch contains the Subversion commits
>                git update-ref refs/remotes/git-svn origin/master
> Which is apparently not sufficient (or outdated?).

Indeed, that would be helpful.

Subject: [PATCH] git-svn(1): update instructions for resuming a git-svn clone

git-svn expects its references under refs/remotes/*; but these will
not be copied or set by "git clone"; put in this man page the manual
fiddling that is required with current git-svn to get this to work.

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
---
 Documentation/git-svn.txt |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index e1a1d46..b1d527f 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -456,10 +456,13 @@ 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
+# Clone locally - make sure the refs/remotes/ space matches the server
+	mkdir project
+	cd project
+	git-init
+	git remote add origin server:/pub/project
+	git config --add remote.origin.fetch=+refs/remotes/*:refs/remotes/*
+	git fetch
 # 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
-- 
1.5.3.5

      parent reply	other threads:[~2008-01-24 23:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 16:38 Odd number of elements in anonymous hash Dennis Schridde
2008-01-08 17:21 ` Junio C Hamano
2008-01-08 17:30   ` Dennis Schridde
2008-01-10  8:38     ` Eric Wong
2008-01-10 11:04       ` Dennis Schridde
2008-01-10 17:13         ` Dennis Schridde
2008-01-10 20:08           ` Junio C Hamano
2008-01-10 21:13             ` Dennis Schridde
2008-01-10 21:45               ` Junio C Hamano
2008-01-12  7:13                 ` [PATCH] git-svn: handle leading/trailing whitespace from svnsync revprops Eric Wong
2008-01-12  7:57                   ` Junio C Hamano
2008-01-12  9:12                     ` Eric Wong
2008-01-12  9:55                       ` Björn Steinbrink
2008-01-12 18:57                       ` Junio C Hamano
2008-01-12 19:31                         ` Junio C Hamano
2008-01-12 12:34                   ` Dennis Schridde
2008-01-09 22:58   ` Odd number of elements in anonymous hash Eric Wong
     [not found] ` <200801240037.33908.devurandom@gmx.net>
     [not found]   ` <4797E894.8060706@vilain.net>
     [not found]     ` <200801241513.45088.devurandom@gmx.net>
2008-01-24 23:10       ` Sam Vilain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47991ACA.7010507@vilain.net \
    --to=sam@vilain.net \
    --cc=devurandom@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).