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

Re: [PATCH 1/2] git-svn: add (failing) test for SVN 1.5+ merge with intervening commit

From
EWEric Wong <normalperson@yhbt.net>
Date
Nov 14, 2009, 21:40 UTC
Message-ID
<20091114214031.GA3732@dcvr.yhbt.net>
In-Reply-To
<874ooz5o8s.fsf@navakl084.mitacad.com>
Toby Allsopp <toby.allsopp@navman.co.nz> wrote:
Show 12 quoted lines
> This test exposes a bug in git-svn's handling of SVN 1.5+ mergeinfo
> properties.  The problematic case is when there is some commit on an
> unrelated branch after the last commit on the merged-from branch.
> When SVN records the mergeinfo property, it records the latest
> revision in the whole repository, which, in the problematic case, is
> not on the branch it is merging from.
> 
> To trigger the git-svn bug, we modify t9151 to include two SVN merges,
> the second of which has an intervening commit.  The SVN dump was
> generated using SVN 1.6.6 (on Debian squeeze amd64).
> 
> Signed-off-by: Toby Allsopp <toby.allsopp@navman.co.nz>
Hi Toby,

Thanks for this series, acked and squashed into a single commit to avoid unnecessary bisection failures at git://git.bogomips.org/git-svn

commit 753dc384dc2c4ab3e1049f695425cebf41ff7e6b
Author: Toby Allsopp <toby.allsopp@navman.co.nz>
Date:   Sat Nov 14 13:26:47 2009 -0800
    git svn: handle SVN merges from revisions past the tip of the branch
    
    When recording the revisions that it has merged, SVN sets the top
    revision to be the latest revision in the repository, which is not
    necessarily a revision on the branch that is being merged from.  When
    it is not on the branch, git-svn fails to add the extra parent to
    represent the merge because it relies on finding the commit on the
    branch that corresponds to the top of the SVN merge range.
    
    In order to correctly handle this case, we look for the maximum
    revision less than or equal to the top of the SVN merge range that is
    actually on the branch being merged from.
    
    [ew: This includes the following (squashed) commit to prevent
         errors during bisect:]
    
      Author: Toby Allsopp <toby.allsopp@navman.co.nz>
      Date:   Fri Nov 13 09:48:39 2009 +1300
    
        git-svn: add (failing) test for SVN 1.5+ merge with intervening commit
    
        This test exposes a bug in git-svn's handling of SVN 1.5+ mergeinfo
        properties.  The problematic case is when there is some commit on an
        unrelated branch after the last commit on the merged-from branch.
        When SVN records the mergeinfo property, it records the latest
        revision in the whole repository, which, in the problematic case, is
        not on the branch it is merging from.
    
        To trigger the git-svn bug, we modify t9151 to include two SVN merges,
        the second of which has an intervening commit.  The SVN dump was
        generated using SVN 1.6.6 (on Debian squeeze amd64).
    
    Signed-off-by: Toby Allsopp <toby.allsopp@navman.co.nz>
    Acked-by: Eric Wong <normalperson@yhbt.net>
-- 
Eric Wong
Previous: Toby AllsoppNext: Toby Allsopp
Message 2 of 4 in “git-svn: add (failing) test for SVN 1.5+ merge with intervening commit”
  1. 1/2 git-svn: add (failing) test for SVN 1.5+ merge with intervening commitToby Allsopp, Nov 12, 2009
  2. Eric WongNov 14, 2009
  3. Toby AllsoppNov 16, 2009
  4. Eric WongNov 16, 2009

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.