Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does "git svn fetch" command seem to be stuck and does nothing?

Tags:

git

git-svn

EDIT: Workaround. Now we understand the issue, here is the solution: do

git svn fetch -r REVISION:HEAD 

where REVISION is the number of the svn commit of the branch creation.


I've been happy using git svn to work on the trunk of my project for a while, but now I need to track branches also.

I've tried to initialize a new repository to do that with

git init git svn init https://svnserver/svn/repository 

Then I edit the local configuration file to reflect the structure of my svn repository:

[svn-remote "svn"]     url = https://svnserver/svn/repository     fetch = path/to/trunk:refs/remotes/trunk     branches = path/to/branches/*:refs/remotes/branches/* 

Then I run

git svn fetch 

And this command just does nothing:

  • It does not terminates
  • It does not write anything in the console output
  • It does not use any CPU, nor create files

I gave up after 10 minutes

I've checked that the svn repository is working, because git svn fetch works perfectly on my git repository where I track only the trunk.

Is this a bug or am I missing something here ?

like image 646
Samuel Rossille Avatar asked Jun 04 '12 09:06

Samuel Rossille


People also ask

What is Git SVN fetch?

DESCRIPTION. git svn is a simple conduit for changesets between Subversion and Git. It provides a bidirectional flow of changes between a Subversion and a Git repository. git svn can track a standard Subversion repository, following the common "trunk/branches/tags" layout, with the --stdlayout option.

Which is Better Git or SVN?

SVN is better than Git for architecture performance, binary files, and usability. And it may be better for access control and auditability, based on your needs.

Is SVN easier than Git?

SVN has one central repository – which makes it easier for managers to have more of a top down approach to control, security, permissions, mirrors and dumps. Additionally, many say SVN is easier to use than Git. For example, it is easier to create a new feature. With Git, it takes an extra step to create a new feature.


1 Answers

It becomes verbose after fetching the first relevant commit.

But until it fetches that commit, you can ensure the command is working properly by checking the .git\svn\.metadata file. The lines branches-maxRev = 123 and tags-maxRev = 123 will keep updating and increasing their numbers as it works.

like image 127
Benjamin Toueg Avatar answered Sep 30 '22 14:09

Benjamin Toueg