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

git-svn and svnsync

From
AGAndriy Gapon <avg@icyb.net.ua>
Date
Oct 16, 2008, 08:07 UTC
Message-ID
<48F6F631.90709@icyb.net.ua>
I did the following:
1. mirror svn repository using svnsync
2. clone the mirror with git-svn --use-svnsync-props and some tweaking[*]
3. run git svn info in the clone
4. get error "Unable to determine upstream SVN information from working 
tree history"

git svn log and git svn rebase do not work either. git log does work.

I have git version 1.6.0.2 (from FreeBSD ports).
[*] About the tweaking - I manually massaged config file to get the 
branches I was interested in, so .git/config is this:
[core]
         repositoryformatversion = 0
         filemode = true
         bare = false
         logallrefupdates = true
[svn-remote "svn"]
         useSvnsyncProps = 1
         url = file:///system/devel/svn/base
         fetch = head:refs/remotes/trunk
         fetch = stable/6:refs/remotes/stable_6
         fetch = stable/7:refs/remotes/stable_7
         fetch = releng/6.3:refs/remotes/releng_6_3
         fetch = releng/6.4:refs/remotes/releng_6_4
         fetch = releng/7.0:refs/remotes/releng_7_0
         fetch = release/6.3.0:refs/remotes/release_6_3_0
         fetch = release/7.0.0:refs/remotes/release_7_0_0
This is .git/svn/.metadata:
; This file is used internally by git-svn
; You should not have to edit it
[svn-remote "svn"]
         reposRoot = file:///system/devel/svn/base
         uuid = ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
         svnsync-uuid = ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
         svnsync-url = svn://svn.freebsd.org/base
So you can see the original svn repository URL.

git log reports svn info like the following: git-svn-id: svn://svn.freebsd.org/base/stable/7@183898 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

It seems that the problem is that the code in find_by_url() and/or read_all_remotes() subroutines (in git-svn.perl) are not aware of svnsync and do not realize an URL in logs and URL in svn-remote are different. BTW, I see that there is some special svm logic in read_all_remotes.

Thank you very much for any help in advance.
-- 
Andriy Gapon
Next: Andriy Gapon
Message 1 of 4 in “git-svn and svnsync”
  1. Andriy GaponOct 16, 2008
  2. Andriy GaponNov 24, 2008
  3. Michael J GruberNov 24, 2008
  4. Andriy GaponNov 24, 2008

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.