From 83c2fcff214fe89649fcd88e095d9961a36b53dd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 22 Feb 2009 20:25:00 -0800 Subject: git-svn: fix delete+add branch tracking with empty files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original bug report and test case by Björn Steinbrink. Björn Steinbrink wrote: > Hi Eric, > > seems that the empty symlink stuff gets confused about which revision to > use when looking for the parent's file. > > r3 = f1a6fcf6b0a1c4a373d0b2b65a3d70700084f361 (tags/1.0.1) > Found possible branch point: file:///home/doener/h/svn/tags/1.0 => file:///home/doener/h/svn/branches/1.0, 4 > Found branch parent: (1.0) 63ae640ba01014ecbb3df590999ed1fa5914545b > Following parent with do_switch > Successfully followed parent > r5 = 26fcfef5bcced97ab74faf1af7341a2ae0d272aa (1.0) > Found possible branch point: file:///home/doener/h/svn/branches/1.0 => file:///home/doener/h/svn/tags/1.0.1, 5 > Found branch parent: (tags/1.0.1) 26fcfef5bcced97ab74faf1af7341a2ae0d272aa > Following parent with do_switch > Scanning for empty symlinks, this may take a while if you have many empty files > You may disable this with `git config svn.brokenSymlinkWorkaround false'. > This may be done in a different terminal without restarting git svn > Filesystem has no item: File not found: revision 3, path '/branches/1.0/file' at /usr/local/libexec/git-core/git-svn line 3318 > > Note how it tries to look at revision 3 instead of revision 5 (which it > correctly detected as the parent). The import succeeds when > svn.brokenSymlinkWorkaround is set to false. Testcase below. Signed-off-by: Eric Wong --- git-svn.perl | 1 + 1 file changed, 1 insertion(+) (limited to 'git-svn.perl') diff --git a/git-svn.perl b/git-svn.perl index ef01fb93c2..bce24a80c4 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2421,6 +2421,7 @@ sub find_parent_branch { # do_switch works with svn/trunk >= r22312, but that # is not included with SVN 1.4.3 (the latest version # at the moment), so we can't rely on it + $self->{last_rev} = $r0; $self->{last_commit} = $parent; $ed = SVN::Git::Fetcher->new($self, $gs->{path}); $gs->ra->gs_do_switch($r0, $rev, $gs, -- cgit v1.2.3