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

Re: git-svn questions: how to clone/init non-standard layout branches/tags?

From
LLLuke Lu <git@vicaya.com>
Date
Nov 7, 2007, 22:56 UTC
Message-ID
<D7E592C6-964E-467C-828F-81BA35275F42@vicaya.com>
In-Reply-To
<B0D0BB75-58AF-4E4E-8C3F-6E615870016A@vicaya.com>
In case others encounter this problem and want to find a solution...
On Nov 3, 2007, at 2:26 PM, Luke Lu wrote:
Show 44 quoted lines
> On Nov 3, 2007, at 1:52 PM, Lars Hjemli wrote:
>> On Nov 3, 2007 9:41 PM, Luke Lu <git@vicaya.com> wrote:
>>> On Nov 3, 2007, at 1:32 PM, Lars Hjemli wrote:
>>>> On Nov 3, 2007 9:01 PM, Luke Lu <git@vicaya.com> wrote:
>>>>> I did try to add a "fetch" line for the production branch like  
>>>>> this:
>>>>>
>>>>> [svn-remote "svn"]
>>>>>          url = svn+ssh://host/svn/project
>>>>>          fetch = production:refs/remotes/svn-prod
>>>>>          fetch = trunk:refs/remotes/git-svn
>>>>>
>>>>> which is modeled after http://lists-archives.org/git/420712-git- 
>>>>> svn-
>>>>> remote-tracking-branch-question.html
>>>>>
>>>> Did you forget to run 'git svn fetch' after modifying your .git/
>>>> config?
>>>
>>> Yes, I did. It didn't seem to do anything.
>>
>> Hmm, it works for me, I've been adding and removing branches like  
>> this
>> for months, but my .git/config is slightly different:
>>
>> [svn-remote "svn"]
>>         url = svn://example.org
>>         fetch = project/trunk:refs/remotes/svn/trunk
>>         fetch = project/branches/topic:refs/remotes/svn/topic
>>
>> I don't know if this difference is important, though...
>
> I tried to test this on a local repository like file:///path/ 
> project. It seems to work and get everything properly upon git svn  
> fetch. However it doesn't work for the production branch. If I  
> modify the fetch line a bit to svn/prod instead of svn-prod and try  
> git svn fetch again. It would hang for about 2 minutes and return 0  
> and show nothing in progress. A .git/svn/svn/prod directory is  
> created but it's empty.
>
> One thing that might be special for this branch is that it gets  
> deleted and recreated/copied all the time from trunk. I wonder if  
> git-svn use some kind of heuristics to determine if there is  
> anything to fetch and silently failing...
After some permutations, this is the config that worked for me:
[svn-remote "svn"]
	url = svn+ssh://host/svn
	fetch = project/trunk:refs/remotes/git-svn
	fetch = project/production:refs/remotes/svn/production

The primary difference is that I moved 'project' from url to the fetch specs. My original single trunk config looked like this:

[svn-remote "svn"]
	url = svn+ssh://host/svn/project/trunk
	fetch = :refs/remotes/git-svn

I wish that "git svn fetch" could be more verbose about what's going on in this case.

__Luke
Previous: Luke Lu
Message 9 of 9 in “git-svn questions: how to clone/init non-standard layout branches/tags?”
  1. Luke LuNov 3, 2007
  2. Benoit SIGOURENov 3, 2007
  3. Lars HjemliNov 3, 2007
  4. Luke LuNov 3, 2007
  5. Lars HjemliNov 3, 2007
  6. Luke LuNov 3, 2007
  7. Lars HjemliNov 3, 2007
  8. Luke LuNov 3, 2007
  9. Luke LuNov 7, 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.