All of lore.kernel.org
 help / color / mirror / Atom feed
* git-svn: follow parent after the fact?
@ 2006-12-19  1:14 Steven Grimm
  2006-12-19  7:47 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Grimm @ 2006-12-19  1:14 UTC (permalink / raw)
  To: git

One of the other git users here just noticed that his git-svn clone of a 
particular svn repo has an inconsistent set of files compared to the svn 
client. Turns out the repo has had its trunk moved around in the past. A 
fresh clone with --follow-parent (which he didn't use) produces the 
correct results.

Obviously he can blow away his current repo and make a new one, but it'd 
be nicer if he could preserve his local change history. Is there any way 
to retroactively apply the additional changes --follow-parent would have 
applied if it had been used on the initial fetch?

It would be better, IMO, if you didn't have to figure out whether or not 
a given remote svn repository has had branch renames in the past in 
order to figure out if you need to provide an extra option to git-svn 
fetch. Maybe --follow-parent should be the default behavior and there 
should be an option to turn it off? Or is there a good reason to not 
want that behavior most of the time? My assumption is that it's not the 
default simply because it's a recent addition.

By the way, I'm completely in favor of renaming commit to set-tree. +1 
for that change.


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

* Re: git-svn: follow parent after the fact?
  2006-12-19  1:14 git-svn: follow parent after the fact? Steven Grimm
@ 2006-12-19  7:47 ` Eric Wong
  2006-12-19 21:36   ` Steven Grimm
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2006-12-19  7:47 UTC (permalink / raw)
  To: Steven Grimm; +Cc: git

Steven Grimm <koreth@midwinter.com> wrote:
> One of the other git users here just noticed that his git-svn clone of a 
> particular svn repo has an inconsistent set of files compared to the svn 
> client. Turns out the repo has had its trunk moved around in the past. A 
> fresh clone with --follow-parent (which he didn't use) produces the 
> correct results.

The final set of files at the latest (svn) revision was inconsistent?
That should never happen...  If so, I'd very much like to look into this.

> Obviously he can blow away his current repo and make a new one, but it'd 
> be nicer if he could preserve his local change history. Is there any way 
> to retroactively apply the additional changes --follow-parent would have 
> applied if it had been used on the initial fetch?

git-svn graft-branches can probably work (if he imported the parent
separately).

> It would be better, IMO, if you didn't have to figure out whether or not 
> a given remote svn repository has had branch renames in the past in 
> order to figure out if you need to provide an extra option to git-svn 
> fetch. Maybe --follow-parent should be the default behavior and there 
> should be an option to turn it off? Or is there a good reason to not 
> want that behavior most of the time? My assumption is that it's not the 
> default simply because it's a recent addition.

It may behave unpredictably on some poorly organized repositories.  I
haven't quite debugged this problem fully as the current code to handle
multiple repositories is a hacked-on mess.

I'm currently refactoring git-svn to work better on multi-remote
operations and --follow-parent should be easier to debug as a result.

> By the way, I'm completely in favor of renaming commit to set-tree. +1 
> for that change.

Noted, thanks for the input.

-- 

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

* Re: git-svn: follow parent after the fact?
  2006-12-19  7:47 ` Eric Wong
@ 2006-12-19 21:36   ` Steven Grimm
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Grimm @ 2006-12-19 21:36 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Eric Wong wrote:
> The final set of files at the latest (svn) revision was inconsistent?
> That should never happen...  If so, I'd very much like to look into this.
>   

Yes, that's right; there are about 50 files that were in the original 
trunk before it was renamed but weren't in the branch that became the 
new trunk. Those files are present in the git repo if I use plain 
git-svn fetch, but they're not there in an svn client or in a git repo 
where I've used --follow-parent.

So far I haven't been able to come up with a from-scratch test case to 
demonstrate this behavior. The svn repository in question, 
unfortunately, isn't a public one. I've asked the person in charge of 
the repo if he remembers what exactly he did at the time of the branch 
reorganization; so far every permutation I've tried in my test repo has 
worked fine and not had the problem, so something odd must have happened 
in that repo's history.

I'll follow up if/when I manage to get a good test case.


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

end of thread, other threads:[~2006-12-19 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-19  1:14 git-svn: follow parent after the fact? Steven Grimm
2006-12-19  7:47 ` Eric Wong
2006-12-19 21:36   ` Steven Grimm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.