threads / discuss / 16426

git-svn and svn branches

Subject: git-svn and svn branches

## tl;dr

3 messages between Nov 21, 2008 and Nov 27, 2008.

replies: 2people: 3as markdown or json

Ryan Phillips· Nov 21, 2008, 19:58 UTC · lore

I followed the following instructions on adding a remote svn branch to my local git-svn repository. http://www.dmo.ca/blog/20070608113513

Are these still accurate?
I started the repository with
  # git svn init [url/trunk]`
  # cd project.git
  # git svn fetch -r[HEAD revision]
which works fine. I added something like Snippet 1 to the .git/config and
issued a `git svn fetch -r[HEAD revision of the branch]` and nothing
happens. It takes git-svn a few seconds to run, but the git-remote svn
branch doesn't get initialized.

Does this procedure only work with a full mirror of a git-svn repository? or perhaps I'm doing something wrong. Any help would be appreciated.

Thanks, Ryan

Snippet 1 =========

[svn-remote "svn34"] url = svn+ssh://your-server/home/svn/project-name/branches/3.4.x fetch = :refs/remotes/git-svn-3.4

Eric Wong· Nov 25, 2008, 23:08 UTC · re: Ryan Phillips · lore

Re: git-svn and svn branches

Ryan Phillips <ryan@trolocsis.com> wrote:
Show 26 quoted lines
> I followed the following instructions on adding a remote svn branch to my
> local git-svn repository. http://www.dmo.ca/blog/20070608113513
> 
> Are these still accurate?
> 
> I started the repository with
>   # git svn init [url/trunk]`
>   # cd project.git
>   # git svn fetch -r[HEAD revision]
> which works fine. I added something like Snippet 1 to the .git/config and
> issued a `git svn fetch -r[HEAD revision of the branch]` and nothing
> happens. It takes git-svn a few seconds to run, but the git-remote svn
> branch doesn't get initialized.
> 
> Does this procedure only work with a full mirror of a git-svn repository?
> or perhaps I'm doing something wrong. Any help would be appreciated.
> 
> Thanks,
> Ryan
> 
> Snippet 1
> =========
> 
> [svn-remote "svn34"]
> url = svn+ssh://your-server/home/svn/project-name/branches/3.4.x
> fetch = :refs/remotes/git-svn-3.4
Try this:
  git svn fetch -i svn34

It's been a while since I've used this, but I believe a test case covers it so it probably still works :)

-- 
Eric Wong
Michael J Gruber· Nov 27, 2008, 10:02 UTC · re: Eric Wong · lore

Re: git-svn and svn branches

Eric Wong venit, vidit, dixit 26.11.2008 00:08:
Show 35 quoted lines
> Ryan Phillips <ryan@trolocsis.com> wrote:
>> I followed the following instructions on adding a remote svn branch to my
>> local git-svn repository. http://www.dmo.ca/blog/20070608113513
>>
>> Are these still accurate?
>>
>> I started the repository with
>>   # git svn init [url/trunk]`
>>   # cd project.git
>>   # git svn fetch -r[HEAD revision]
>> which works fine. I added something like Snippet 1 to the .git/config and
>> issued a `git svn fetch -r[HEAD revision of the branch]` and nothing
>> happens. It takes git-svn a few seconds to run, but the git-remote svn
>> branch doesn't get initialized.
>>
>> Does this procedure only work with a full mirror of a git-svn repository?
>> or perhaps I'm doing something wrong. Any help would be appreciated.
>>
>> Thanks,
>> Ryan
>>
>> Snippet 1
>> =========
>>
>> [svn-remote "svn34"]
>> url = svn+ssh://your-server/home/svn/project-name/branches/3.4.x
>> fetch = :refs/remotes/git-svn-3.4
> 
> Try this:
> 
>   git svn fetch -i svn34
> 
> It's been a while since I've used this, but I believe a test
> case covers it so it probably still works :)
> 

Uhm, I think it's rather "-R svn34" which tells git-svn to use the svn remote config "svn34". -i sets GIT_SVN_ID.

Michael

← back to recent threads