{"thread":{"id":"17944","subject":"empty symlink detection breakage","startedAt":"2009-02-22T01:56:11Z","lastAt":"2009-02-23T04:33:47Z","messageCount":2,"participants":["Björn Steinbrink","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"105753","messageId":"20090222015611.GA14378@atjola.homenet","threadId":"17944","inReplyTo":null,"subject":"empty symlink detection breakage","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2009-02-22T01:56:11Z","receivedAt":"2009-02-22T01:56:11Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"Hi Eric, \n\nseems that the empty symlink stuff gets confused about which revision to\nuse when looking for the parent's file.\n\nr3 = f1a6fcf6b0a1c4a373d0b2b65a3d70700084f361 (tags/1.0.1)\nFound possible branch point: file:///home/doener/h/svn/tags/1.0 => file:///home/doener/h/svn/branches/1.0, 4\nFound branch parent: (1.0) 63ae640ba01014ecbb3df590999ed1fa5914545b\nFollowing parent with do_switch\nSuccessfully followed parent\nr5 = 26fcfef5bcced97ab74faf1af7341a2ae0d272aa (1.0)\nFound possible branch point: file:///home/doener/h/svn/branches/1.0 => file:///home/doener/h/svn/tags/1.0.1, 5\nFound branch parent: (tags/1.0.1) 26fcfef5bcced97ab74faf1af7341a2ae0d272aa\nFollowing parent with do_switch\nScanning for empty symlinks, this may take a while if you have many empty files\nYou may disable this with `git config svn.brokenSymlinkWorkaround false'.\nThis may be done in a different terminal without restarting git svn\nFilesystem has no item: File not found: revision 3, path '/branches/1.0/file' at /usr/local/libexec/git-core/git-svn line 3318\n\n\nNote how it tries to look at revision 3 instead of revision 5 (which it\ncorrectly detected as the parent). The import succeeds when\nsvn.brokenSymlinkWorkaround is set to false. Testcase below.\n\nBjörn\n--\ndiff --git a/t/t9136-git-svn-recreated-branch-empty-file.sh b/t/t9136-git-svn-recreated-branch-empty-file.sh\nnew file mode 100755\nindex 0000000..733d16e\n--- /dev/null\n+++ b/t/t9136-git-svn-recreated-branch-empty-file.sh\n@@ -0,0 +1,12 @@\n+#!/bin/sh\n+\n+test_description='test recreated svn branch with empty files'\n+\n+. ./lib-git-svn.sh\n+test_expect_success 'load svn dumpfile'  '\n+\tsvnadmin load \"$rawsvnrepo\" < \"${TEST_DIRECTORY}/t9136/svn.dump\"\n+\t'\n+\n+test_expect_success 'clone using git svn' 'git svn clone -s \"$svnrepo\" x'\n+\n+test_done\ndiff --git a/t/t9136/svn.dump b/t/t9136/svn.dump\nnew file mode 100644\nindex 0000000..6b1ce0b\n--- /dev/null\n+++ b/t/t9136/svn.dump\n@@ -0,0 +1,192 @@\n+SVN-fs-dump-format-version: 2\n+\n+UUID: eecae021-8f16-48da-969d-79beb8ae6ea5\n+\n+Revision-number: 0\n+Prop-content-length: 56\n+Content-length: 56\n+\n+K 8\n+svn:date\n+V 27\n+2009-02-22T00:50:56.292890Z\n+PROPS-END\n+\n+Revision-number: 1\n+Prop-content-length: 106\n+Content-length: 106\n+\n+K 7\n+svn:log\n+V 4\n+init\n+K 10\n+svn:author\n+V 8\n+john.doe\n+K 8\n+svn:date\n+V 27\n+2009-02-22T00:50:57.192384Z\n+PROPS-END\n+\n+Node-path: branches\n+Node-kind: dir\n+Node-action: add\n+Prop-content-length: 10\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Node-path: tags\n+Node-kind: dir\n+Node-action: add\n+Prop-content-length: 10\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Node-path: trunk\n+Node-kind: dir\n+Node-action: add\n+Prop-content-length: 10\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Node-path: trunk/file\n+Node-kind: file\n+Node-action: add\n+Prop-content-length: 10\n+Text-content-length: 0\n+Text-content-md5: d41d8cd98f00b204e9800998ecf8427e\n+Content-length: 10\n+\n+PROPS-END\n+\n+\n+Revision-number: 2\n+Prop-content-length: 105\n+Content-length: 105\n+\n+K 7\n+svn:log\n+V 3\n+1.0\n+K 10\n+svn:author\n+V 8\n+john.doe\n+K 8\n+svn:date\n+V 27\n+2009-02-22T00:50:58.124724Z\n+PROPS-END\n+\n+Node-path: tags/1.0\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 1\n+Node-copyfrom-path: trunk\n+\n+\n+Revision-number: 3\n+Prop-content-length: 111\n+Content-length: 111\n+\n+K 7\n+svn:log\n+V 9\n+1.0.1-bad\n+K 10\n+svn:author\n+V 8\n+john.doe\n+K 8\n+svn:date\n+V 27\n+2009-02-22T00:50:58.151727Z\n+PROPS-END\n+\n+Node-path: tags/1.0.1\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 2\n+Node-copyfrom-path: tags/1.0\n+\n+\n+Revision-number: 4\n+Prop-content-length: 111\n+Content-length: 111\n+\n+K 7\n+svn:log\n+V 9\n+Wrong tag\n+K 10\n+svn:author\n+V 8\n+john.doe\n+K 8\n+svn:date\n+V 27\n+2009-02-22T00:50:58.167427Z\n+PROPS-END\n+\n+Node-path: tags/1.0.1\n+Node-action: delete\n+\n+\n+Revision-number: 5\n+Prop-content-length: 113\n+Content-length: 113\n+\n+K 7\n+svn:log\n+V 10\n+1.0-branch\n+K 10\n+svn:author\n+V 8\n+john.doe\n+K 8\n+svn:date\n+V 27\n+2009-02-22T00:50:58.184498Z\n+PROPS-END\n+\n+Node-path: branches/1.0\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 4\n+Node-copyfrom-path: tags/1.0\n+\n+\n+Revision-number: 6\n+Prop-content-length: 113\n+Content-length: 113\n+\n+K 7\n+svn:log\n+V 10\n+1.0.1-good\n+K 10\n+svn:author\n+V 8\n+john.doe\n+K 8\n+svn:date\n+V 27\n+2009-02-22T00:50:58.200695Z\n+PROPS-END\n+\n+Node-path: tags/1.0.1\n+Node-kind: dir\n+Node-action: add\n+Node-copyfrom-rev: 5\n+Node-copyfrom-path: branches/1.0\n+\n+\n"},{"id":"105841","messageId":"20090223043347.GA21136@dcvr.yhbt.net","threadId":"17944","inReplyTo":"20090222015611.GA14378@atjola.homenet","subject":"Re: empty symlink detection breakage","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-02-23T04:33:47Z","receivedAt":"2009-02-23T04:33:47Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Björn Steinbrink <B.Steinbrink@gmx.de> wrote:\n> Hi Eric, \n> \n> seems that the empty symlink stuff gets confused about which revision to\n> use when looking for the parent's file.\n\n<snip>\n\n> Note how it tries to look at revision 3 instead of revision 5 (which it\n> correctly detected as the parent). The import succeeds when\n> svn.brokenSymlinkWorkaround is set to false. Testcase below.\n\nThanks Björn,\n\nI've pushed out a one line bugfix to git://git.bogomips.org/git-svn\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex ef01fb9..bce24a8 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -2421,6 +2421,7 @@ sub find_parent_branch {\n \t\t\t# do_switch works with svn/trunk >= r22312, but that\n \t\t\t# is not included with SVN 1.4.3 (the latest version\n \t\t\t# at the moment), so we can't rely on it\n+\t\t\t$self->{last_rev} = $r0;\n \t\t\t$self->{last_commit} = $parent;\n \t\t\t$ed = SVN::Git::Fetcher->new($self, $gs->{path});\n \t\t\t$gs->ra->gs_do_switch($r0, $rev, $gs,\n\n-- \nEric Wong\n"}]}