{"thread":{"id":"5863","subject":"git-svn fetch fails when a file is renamed changing only case","startedAt":"2006-10-09T17:13:51Z","lastAt":"2006-10-11T17:42:20Z","messageCount":5,"participants":["Pazu","Seth Falcon","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"28459","messageId":"ege016$vrb$1@sea.gmane.org","threadId":"5863","inReplyTo":null,"subject":"git-svn fetch fails when a file is renamed changing only case","fromName":"Pazu","fromEmail":"pazu@pazu.com.br","sentAt":"2006-10-09T17:13:51Z","receivedAt":"2006-10-09T17:13:51Z","isPatch":false,"sender":{"key":"pazu@pazu.com.br","avatar":null},"body":"For example, if you had a file named TestFile and it's renamed to \nTESTFILE, git-svn fails to fetch revisions after the rename.\n\nMy perl skills are close to non-existant, so I'm afraid I don't know how \nto fix this. Attached to this message, however, is a sample svn \nrepository that can reproduce this bug. Just unpack it somewhere (let's \nsay, in /tmp) and try the following:\n\ntar -C /tmp -xzf git-svn-rename-test.tar.gz\nmkdir test-wc\ncd test-wc\ngit-svn init file:///tmp/git-svn-rename-test\ngit-svn fetch\n\nThe last command will fail after fetching revision #3, where a file \nnamed TestFile was renamed to TESTFILE. Here's the stack trace:\n\nsvn: 'TestFile' is not under version control\n256 at /Users/pazu/bin/git-svn line 2015\n         main::safe_qx('svn', 'propget', 'svn:keywords', \n'TestFile@BASE') called at /Users/pazu/bin/git-svn line 2154\n         main::svn_propget_base('svn:keywords', 'TestFile') called at \n/Users/pazu/bin/git-svn line 1773\n         main::do_update_index('ARRAY(0x180bd68)', 'remove', 'undef') \ncalled at /Users/pazu/bin/git-svn line 1805\n         main::index_changes() called at /Users/pazu/bin/git-svn line 1875\n         main::git_commit('HASH(0x180bd98)', \n'c77db38dc752305ba19ebe19b22306551d0f8d52') called at \n/Users/pazu/bin/git-svn line 346\n         main::fetch_cmd() called at /Users/pazu/bin/git-svn line 290\n         main::fetch() called at /Users/pazu/bin/git-svn line 149\n\nI'm on Mac OS X (Intel) 10.4.8\n\nmini:~ pazu$ uname -a\nDarwin mini.intranet.ecore.com.br 8.8.1 Darwin Kernel Version 8.8.1: Mon \nSep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386\n\nGit was compiled from the released 1.4.2.3 sources, without any \nmodifications:\n\nmini:~ pazu$ git-svn --version\ngit-svn version 1.4.2.3\n\nIf you need more information, you can contact me directly, or just use \nthe list -- I'll be here listening :)\n\n-- Marcus Brito\n"},{"id":"28463","messageId":"m2psd1rwb0.fsf@ziti.local","threadId":"5863","inReplyTo":"ege016$vrb$1@sea.gmane.org","subject":"Re: git-svn fetch fails when a file is renamed changing only case","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-10-09T21:52:51Z","receivedAt":"2006-10-09T21:52:51Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Pazu <pazu@pazu.com.br> writes:\n\n> For example, if you had a file named TestFile and it's renamed to\n> TESTFILE, git-svn fails to fetch revisions after the rename.\n\nDoes this work for you via svn?  \n\nOn OS X, the default is a non case-sensitive filesystem.  I use OS X\nand have encountered issues with case-change-only commits in svn.\n\nIOW, are you sure this is an issue in git-svn and not an issue in\nfilesystem + svn?  For example, I think you will also have problems\nwith a repository that contains in the same dir TESTFILE and TestFile\n:-\\\n\n+ seth\n"},{"id":"28477","messageId":"egevhe$d15$1@sea.gmane.org","threadId":"5863","inReplyTo":"m2psd1rwb0.fsf@ziti.local","subject":"Re: git-svn fetch fails when a file is renamed changing only case","fromName":"Pazu","fromEmail":"pazu@pazu.com.br","sentAt":"2006-10-10T02:11:30Z","receivedAt":"2006-10-10T02:11:30Z","isPatch":false,"sender":{"key":"pazu@pazu.com.br","avatar":null},"body":"Seth Falcon wrote:\n\n> IOW, are you sure this is an issue in git-svn and not an issue in\n> filesystem + svn?  For example, I think you will also have problems\n> with a repository that contains in the same dir TESTFILE and TestFile\n> :-\\\n\nIf I try something like:\n\nmini:~$ svn mv TESTFILE TestFile\n\nIt will fail with a message saying that TestFile already exists, since \nHFS+ is case insensitive by default:\n\nsvn: File 'TestFile' already exists\n\nBut keep in mind this is a shared repository, and people working on \ncase-sensitive file systems may rename the file. I can do it too, if I \nuse full URL's (all examples here use the same test repository provided \nin my first message):\n\nmini:~$ svn mv file:///tmp/git-svn-rename-test/TESTFILE \nfile:///tmp/git-svn-rename-test/TestFile\nCommited revision 5.\n\nAnyway, when I'm updating a working copy, svn will do the right thing:\n\nmini:~$ svn co -r1 file:///tmp/git-svn-rename-test\nD    git-svn-rename-test/TESTFILE\nA    git-svn-rename-test/TestFile\nChecked out revision 1.\n\nmini:~$ cd git-svn-rename-test\nmini:git-svn-rename-test$ svn up -r3\nD    TestFile\nA    TESTFILE\nUpdated to revision 3.\n\nA rename for svn is just a copy followed by delete, so when updating, \nTestFile is removed and then recreated as TESTFILE, correctly.\n\nSo, to finally answer your question, no, unfortunately I don't think \nthis is purely an svn problem. Yes, I would have problems with two files \nnamed TestFile and TESTFILE in the same dir, but that's not what happens \nin this test case.\n\nWell, I'll keep browsing the git-svn source code, and try to make some \nsense out of it...\n\n-- Marcus\n"},{"id":"28530","messageId":"eggmun$1gf$1@sea.gmane.org","threadId":"5863","inReplyTo":"egevhe$d15$1@sea.gmane.org","subject":"Re: git-svn fetch fails when a file is renamed changing only case","fromName":"Pazu","fromEmail":"pazu@pazu.com.br","sentAt":"2006-10-10T17:57:14Z","receivedAt":"2006-10-10T17:57:14Z","isPatch":false,"sender":{"key":"pazu@pazu.com.br","avatar":null},"body":"Pazu wrote:\n\n> Well, I'll keep browsing the git-svn source code, and try to make some \n> sense out of it...\n\nWhile doing that I noticed the error happens in a code path that only \ngets executed when SVN::Core isn't available. So I decided to go through \nthe trouble of manually building and installing the subversion perl \nbindings, and to my delight, git-svn is working flawlessly now.\n\nSince svn binaries *use* the svn libraries, I still don't think this was \nsubversion's fault, but probably some bug in git-svn parsing svn output. \nOh well, using SVN::Core fixed, and git-svn is a lot faster to boot.\n\n-- Marcus\n"},{"id":"28613","messageId":"20061011174220.GA32013@soma","threadId":"5863","inReplyTo":"ege016$vrb$1@sea.gmane.org","subject":"Re: git-svn fetch fails when a file is renamed changing only case","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-10-11T17:42:20Z","receivedAt":"2006-10-11T17:42:20Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Pazu <pazu@pazu.com.br> wrote:\n> For example, if you had a file named TestFile and it's renamed to \n> TESTFILE, git-svn fails to fetch revisions after the rename.\n> \n> My perl skills are close to non-existant, so I'm afraid I don't know how \n> to fix this. Attached to this message, however, is a sample svn \n> repository that can reproduce this bug. Just unpack it somewhere (let's \n> say, in /tmp) and try the following:\n> \n> tar -C /tmp -xzf git-svn-rename-test.tar.gz\n> mkdir test-wc\n> cd test-wc\n> git-svn init file:///tmp/git-svn-rename-test\n> git-svn fetch\n> \n> The last command will fail after fetching revision #3, where a file \n> named TestFile was renamed to TESTFILE. Here's the stack trace:\n> \n> svn: 'TestFile' is not under version control\n> 256 at /Users/pazu/bin/git-svn line 2015\n>         main::safe_qx('svn', 'propget', 'svn:keywords', \n> 'TestFile@BASE') called at /Users/pazu/bin/git-svn line 2154\n>         main::svn_propget_base('svn:keywords', 'TestFile') called at \n> /Users/pazu/bin/git-svn line 1773\n>         main::do_update_index('ARRAY(0x180bd68)', 'remove', 'undef') \n> called at /Users/pazu/bin/git-svn line 1805\n>         main::index_changes() called at /Users/pazu/bin/git-svn line 1875\n>         main::git_commit('HASH(0x180bd98)', \n> 'c77db38dc752305ba19ebe19b22306551d0f8d52') called at \n> /Users/pazu/bin/git-svn line 346\n>         main::fetch_cmd() called at /Users/pazu/bin/git-svn line 290\n>         main::fetch() called at /Users/pazu/bin/git-svn line 149\n \n> I'm on Mac OS X (Intel) 10.4.8\n\nAh, the problem is that git-svn relies on git-diff-files and\ngit-ls-files to track changes when using the command-line svn client.\ngit itself is a case-sensitive file-system, but git-svn relies on the\nworking tree if you didn't have the SVN libraries, and successfully\nstats the 'TestFile' even though it no longer exists (and is replaced\nby 'TESTFILE').\n\nGood to know that the SVN:: libraries are working for you, though.\n\n-- \nEric Wong\n"}]}