git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: rupert THURNER
Message 2 of 2 in “git svn v1 migration, avoid re-clone whole repo”
  1. rupert THURNERJul 21, 2011
  2. Thomas Ferris NicolaisenJul 23, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.