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

git-svn: wrong history after cloning a repository

From
FFFrans Fürst <frans.fuerst@scitics.de>
Date
Apr 11, 2013, 17:04 UTC
Message-ID
<1365699863.30393.30.camel@blackbox.scitics>
Hi,

I'm currently struggeling with a strage behaviour of git-svn: After git-svn-cloning a given repository (see attachment) in some cases the git blame differs from the svn blame. The history looks like after a merge all affected files have been added from scratch at this revision.

The behaviour can be observed using at least the following versions of git: 1.7.10.2 1.8.1.4 1.8.2.GIT

Given: * svn-repository, svn-server 1.6.11, apache2 module via WEB DAV
       * repository like the one attached:
            * standard svn layout
            * branch ^/branches/feature1 copied from ^/trunk
            * changes made and files added on 
              project1/branches/feature1 by 'testuser1'
            * branch ^/branches/rc-1.0 copied from ^/trunk on 
              revX by 'mergeuser'
            * ^/branches/feature1 merged to ^/trunk on 
              revY by 'mergeuser'
            * ^/branches/rc-1.0 merged back to trunk revZ by 'mergeuser'
Action: git svn clone -s <repo-url>
        git blame <some_file_modified_on-feature1>

Observed behaviour: Changes being made on project1/branches/feature1 being associated to 'mergeuser' who integrated feature1 but not implemented on that branch.

> $ git blame src/file2.txt
> 9846ece6 (mergeuser 2013-04-11 14:31:21 +0000 1) content2-1
> 9846ece6 (mergeuser 2013-04-11 14:31:21 +0000 2) content2-2
> 9846ece6 (mergeuser 2013-04-11 14:31:21 +0000 3) content2-3
Action: svn blame <repo-url>/trunk/<some_file_modified_on-feature1>
Observed behaviour: Changes are correctly associated to user1
> $ svn blame src/file2.txt
>     4  testuser1 content2-1
>     4  testuser1 content2-2
>     4  testuser1 content2-3

I don't know yet which steps are really needed to re-create a repository with this behaviour. My guess is that adding files together with a merge (see r6 in the attached repository) has something to do with it.

Can you tell me whether this is a known issue or if there's a work around for this? Unfortunately I'm not very into perl so I can't solve this on my own. Please let me know if you need additional information.

Thanks
Frans
Message 1 of 1 in “git-svn: wrong history after cloning a repository”
  1. Frans FürstApr 11, 2013

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.