* git-svn not fetching all revisions
@ 2009-11-10 18:08 Marcus Better
2009-11-11 4:00 ` Sam Vilain
0 siblings, 1 reply; 4+ messages in thread
From: Marcus Better @ 2009-11-10 18:08 UTC (permalink / raw)
To: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I have trouble cloning a SVN repository with a somewhat weird history.
Its layout has been reorganised, and is currently using a standard
layout like this:
project/
trunk/
branches/
tags/
otherproject/
...
The problem is that the trunk was replaced by a branch at some point.
When I do "git svn clone -s svn://host/repo/project" it only fetches the
"old" trunk up to the time of the switch, and then stops. Newer
revisions of the "new" trunk are not fetched and cannot be seen with
"find-rev".
The history of the repo is something like this: Initial layout is
trunk/
project/
otherstuff/
branches/
Then we had the following sequence:
1. commit stuff to trunk/project/...
2. create "branches/mybranch" from trunk/project
3. some commits on trunk and branches
4. moved trunk/project to branches/old_trunk
5. moved trunk/otherstuff to /otherstuff. /trunk is now empty (***)
6. removed /trunk directory
7. create /project
8. move branches/mybranch to project/trunk
9. commit stuff on project/trunk
(***) last commit seen in clone.
Now step 5 is the last revision that appears in the git svn clone. It
shows up as the last commit on remotes/trunk.
Apparently git svn has failed to follow the move from branches/mybranch
to trunk. The last commit seen on remotes/mybranch in the clone is from
before the move to trunk (step 3).
I have tried replaying the above steps with some variations in a new svn
repository, but apparently I'm missing something because I couldn't
reproduce the issue. I cannot publish the real svn repo.
I use git and git-svn 1.6.5.2 (Debian amd64 packages).
Cheers,
Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkr5rBkACgkQXjXn6TzcAQnRZQCgrAsQ72wLw/iWx33lHQHi6Di7
wWkAnioEAxJyM/vr802+vzRXq+ZeWjeA
=TW7j
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-svn not fetching all revisions
2009-11-10 18:08 git-svn not fetching all revisions Marcus Better
@ 2009-11-11 4:00 ` Sam Vilain
2009-11-19 12:07 ` Marcus Better
0 siblings, 1 reply; 4+ messages in thread
From: Sam Vilain @ 2009-11-11 4:00 UTC (permalink / raw)
To: Marcus Better; +Cc: git
Marcus Better wrote:
> The problem is that the trunk was replaced by a branch at some point.
> When I do "git svn clone -s svn://host/repo/project" it only fetches the
> "old" trunk up to the time of the switch, and then stops. Newer
> revisions of the "new" trunk are not fetched and cannot be seen with
> "find-rev".
Yeah. Try doing it in parts - fetch the two stages of the history
explicitly using the revision range arguments to 'git svn fetch' - and
then graft the histories together and fix up with git filter-branch. A
bit of a hassle, but unfortunately there's not much other option...
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-svn not fetching all revisions
2009-11-11 4:00 ` Sam Vilain
@ 2009-11-19 12:07 ` Marcus Better
2009-11-20 4:12 ` [spf:guess] " Sam Vilain
0 siblings, 1 reply; 4+ messages in thread
From: Marcus Better @ 2009-11-19 12:07 UTC (permalink / raw)
To: Sam Vilain; +Cc: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sam Vilain wrote:
> Marcus Better wrote:
>> The problem is that the trunk was replaced by a branch at some point.
> Yeah. Try doing it in parts - fetch the two stages of the history
> explicitly using the revision range arguments to 'git svn fetch' - and
> then graft the histories together and fix up with git filter-branch.
Ok, that works, but how can I now sync with the svn repository with git
svn rebase/dcommit? I think the filter-branch rewriting confuses git-svn.
Cheers,
Marcus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAksFNPsACgkQXjXn6TzcAQkr+QCgxQ1r68v2O1Ux7YFoS5IQS1GT
/cgAoLoTgRcIK7vMTJWfmN2XAhcy0eOa
=dnet
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [spf:guess] Re: git-svn not fetching all revisions
2009-11-19 12:07 ` Marcus Better
@ 2009-11-20 4:12 ` Sam Vilain
0 siblings, 0 replies; 4+ messages in thread
From: Sam Vilain @ 2009-11-20 4:12 UTC (permalink / raw)
To: Marcus Better; +Cc: git
Marcus Better wrote:
> Ok, that works, but how can I now sync with the svn repository with git
> svn rebase/dcommit? I think the filter-branch rewriting confuses git-svn.
>
A quick hint: git-svn only relies on the last piece of metadata it can
see in 'git log'; so make sure that one looks right and you should be
fine...
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-20 4:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 18:08 git-svn not fetching all revisions Marcus Better
2009-11-11 4:00 ` Sam Vilain
2009-11-19 12:07 ` Marcus Better
2009-11-20 4:12 ` [spf:guess] " Sam Vilain
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).