Re: git svn v1 migration, avoid re-clone whole repo
- From
Thomas Ferris Nicolaisen <tfnico@gmail.com>
- Date
- Jul 23, 2011, 17:03 UTC
- Message-ID
- <CAEcj5uXUbJGj0Gjji-dRcsQuoQ3kP-LXcXGjtwFiZLFP5c-R6g@mail.gmail.com>
- In-Reply-To
- <CAJs9aZ-h8J_WYC1cXy9HojwArO8EqWSZnoZ1=LdrqHxeJxz_BQ@mail.gmail.com>
Hi Rupert,
Show 11 quoted lines
> is there any other means of upgrading to the new svn layout but > cloning the repository afresh again? the error message i get is: > > $ git svn rebase > Migrating from a git-svn v1 layout... > Data from a previous version of git-svn exists, but > .git/svn > (required for this version (1.7.5.4) of git-svn) does not exist. > Done migrating from a git-svn v1 layout > Unable to determine upstream SVN information from working tree history >
Can you say in more concrete steps how you created the repository where this happens?
I've seen this error message in repositories that are clones of git-svn repositories. They are "simple" git repositories with no link established to the SVN repository (no notion of svn in the .git/config). If this is the case, read on:
I usually fix this by initializing git svn in the repo:
> git svn init [same params as the initial git svn clone] [svn url]
And then you have to update the latest git-svn ref to point at the last git-svn commit. Usually this goes something like:
> git update-ref refs/remotes/git-svn refs/remotes/origin/master
... assuming that the git-svn repo you cloned from is a remote repo with the name "origin".
Note that in a git svn clone with branches the above git-svn reference will be probably be branch name instead.
Hope this helps,
-Thomas