git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-svn-problem: Unnecessary  downloading entire branch?
@ 2009-09-16 11:53 Martin Larsson
  2009-09-23  6:55 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Larsson @ 2009-09-16 11:53 UTC (permalink / raw)
  To: git

I have a local git-copy of the company svn-repository. The git-copy is
up-to-date (git svn fetch). I then add a new branch in the
svn-repository (svn cp http://.../trunk http://...branches/JIRA-4444).
When I then do 'git svn fetch' again, it pulls all the files from the
svn-repository. 

I was expecting it to only pull the fact that a new branch was made
(taking milliseconds), not all the files in the branch (taking more than
half an hour to complete). Why does it need to transfer all the files?

I did have problems getting the original svn-repository. It took several
days and stopped several times in the process. Each time it stopped, I
just issued 'git svn fetch' again and it seemed to continue. Could this
be related? How could I make a better copy?

M.

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

* Re: git-svn-problem: Unnecessary  downloading entire branch?
  2009-09-16 11:53 git-svn-problem: Unnecessary downloading entire branch? Martin Larsson
@ 2009-09-23  6:55 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2009-09-23  6:55 UTC (permalink / raw)
  To: Martin Larsson; +Cc: git

Martin Larsson <martin.liste.larsson@gmail.com> wrote:
> I have a local git-copy of the company svn-repository. The git-copy is
> up-to-date (git svn fetch). I then add a new branch in the
> svn-repository (svn cp http://.../trunk http://...branches/JIRA-4444).
> When I then do 'git svn fetch' again, it pulls all the files from the
> svn-repository. 
> 
> I was expecting it to only pull the fact that a new branch was made
> (taking milliseconds), not all the files in the branch (taking more than
> half an hour to complete). Why does it need to transfer all the files?

Are some branches at a different depth in the repository?  E.g:

	project/trunk
	project/branches/feature-a
	project/branches/martin/feature-b
	project/branches/martin/feature-c
	project/branches/feature-d
	project/branches/feature-e

Basically a refs layout like this in your $GIT_CONFIG:

	fetch = project/trunk:refs/remotes/trunk
	branches = project/branches/*:refs/remotes/*

Is going to get git svn confused and think "martin" is a branch when
it is rather a container of a branch.


However if you have a consistent depth and two branch containers
("martin" and his evil twin, "nitram"):

	project/trunk
	project/branches/martin/feature-b
	project/branches/martin/feature-c
	project/branches/nitram/feature-a
	project/branches/nitram/feature-d
	project/branches/nitram/feature-e


As of git v1.6.4, you can repeat "branches" or "tags" lines in
$GIT_CONFIG thanks to Marc Branchaud:

	fetch = project/trunk:refs/remotes/trunk
	branches = project/branches/martin/*:refs/remotes/martin/*
	branches = project/branches/nitram/*:refs/remotes/nitram/*

This is a known problem with the (extremely flexible and therefore
inconsistent) way SVN repositories can be laid out.

> I did have problems getting the original svn-repository. It took several
> days and stopped several times in the process. Each time it stopped, I
> just issued 'git svn fetch' again and it seemed to continue. Could this
> be related? How could I make a better copy?

It could be the server disconnecting you or a bad Internet connection.
Resuming "git svn fetch" should be perfectly safe, though.

-- 
Eric Wong

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

end of thread, other threads:[~2009-09-23  6:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 11:53 git-svn-problem: Unnecessary downloading entire branch? Martin Larsson
2009-09-23  6:55 ` 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).