{"thread":{"id":"4678","subject":"cvs importer woes","startedAt":"2006-06-27T10:05:36Z","lastAt":"2006-06-27T11:01:52Z","messageCount":7,"participants":["Andreas Ericsson","Johannes Schindelin","Martin Langhoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22654","messageId":"44A102F0.9090604@op5.se","threadId":"4678","inReplyTo":null,"subject":"cvs importer woes","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-06-27T10:05:36Z","receivedAt":"2006-06-27T10:05:36Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Sadly, the cvsimport command no longer works to create new repositories \nfrom scratch. I'm not nearly perl literate enough to fix it, but the \nproblem seems to be firstly 061303f0b50a648db8e0af23791fc56181f6bf93. In \nparticular \"Also, make sure that the initial git-read-tree is \nperformed.\" which fails if there is not a complete git repo already \ncreated with at least one tree committed.\n\nSome sample output:\n\n$ git cvsimport -k -u -d:local:/home/CVS packages\nfatal: Not a git repository: '/data/home/exon/git/packages/.git'\nread-tree failed: 32768\n\nRemoving the unconditional read-tree call, I get this (still in an empty \ndirectory which isn't a repo):\n\n$ git cvsimport -k -u -d:local:/home/CVS packages\nfatal: Not a git repository: '/data/home/exon/git/packages/.git'\nread-tree failed: 32768\n\n$ git init-db\ndefaulting to local storage area\n\n$ git cvsimport -k -u -d:local:/home/CVS packages\nfatal: Not a valid object name origin\nread-tree failed: 32768\n\nBisect running now. v1.3.1 is good and imports the stuff properly to an \nempty directory.\n\nOh, now it's done (4 minutes for 620 revisions with automated testing \nbetween good/bad. *LOVE* bisect).\n\nThe culprit is definitely 061303f0b50a648db8e0af23791fc56181f6bf93.\n\nAny perl-literate takers? Otherwise, just reverting the patch makes \nthings work (for me) again.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"22656","messageId":"Pine.LNX.4.63.0606271234350.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4678","inReplyTo":"44A102F0.9090604@op5.se","subject":"[TRYTHIS] cvsimport: fix initial import","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-27T10:35:43Z","receivedAt":"2006-06-27T10:35:43Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"---\nHi,\n\nOn Tue, 27 Jun 2006, Andreas Ericsson wrote:\n\n> Sadly, the cvsimport command no longer works to create new repositories from\n> scratch. I'm not nearly perl literate enough to fix it, but the problem seems\n> to be firstly 061303f0b50a648db8e0af23791fc56181f6bf93.\n\nMy bad. Could you try this patch on top of 'next'?\n\n git-cvsimport.perl |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 50f5d96..f8eb6ef 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -471,7 +471,6 @@ my %index; # holds filenames of one inde\n \n $ENV{GIT_INDEX_FILE} = $index{$opt_o};\n system(\"git-read-tree\", $opt_o);\n-die \"read-tree failed: $?\\n\" if $?;\n \n unless(-d $git_dir) {\n \tsystem(\"git-init-db\");\n"},{"id":"22657","messageId":"44A10B4A.3080903@op5.se","threadId":"4678","inReplyTo":"Pine.LNX.4.63.0606271234350.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [TRYTHIS] cvsimport: fix initial import","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-06-27T10:41:14Z","receivedAt":"2006-06-27T10:41:14Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> ---\n> Hi,\n> \n> On Tue, 27 Jun 2006, Andreas Ericsson wrote:\n> \n> \n>>Sadly, the cvsimport command no longer works to create new repositories from\n>>scratch. I'm not nearly perl literate enough to fix it, but the problem seems\n>>to be firstly 061303f0b50a648db8e0af23791fc56181f6bf93.\n> \n> \n> My bad. Could you try this patch on top of 'next'?\n> \n\nWorks wonderfully. Weird that it didn't when I removed the read-tree \ncompletely. There was probably some pilot error involved on my part \nthere and then.\n\nThanks, and ack.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"22658","messageId":"46a038f90606270342k2288cc2ds34ae05e089b8c906@mail.gmail.com","threadId":"4678","inReplyTo":"44A102F0.9090604@op5.se","subject":"Re: cvs importer woes","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-06-27T10:42:38Z","receivedAt":"2006-06-27T10:42:38Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On 6/27/06, Andreas Ericsson <ae@op5.se> wrote:\n> Sadly, the cvsimport command no longer works to create new repositories\n> from scratch.\n\nWe are seeing some breakage in cvsimport that started with a patch of mine:\n\n 8f732649bc4d5619a1b399e5808b3f4c662ad200 cvsimport: keep one index\nper branch during import\n\nso I'd say that if you are using cvsimport, stick to the v1.4.0\nversion. You can do\n\n  git-cat-file blob v1.4.0:git-cvsimport.perl >git-cvsimport.perl\n\n> problem seems to be firstly 061303f0b50a648db8e0af23791fc56181f6bf93.\n\nYes, that commit will break brand new imports, but it's trying to\nfixup breakage that started with my patch. It shouldn't be too hard to\nfix up, but real life is interfering.\n\n> Oh, now it's done (4 minutes for 620 revisions with automated testing\n> between good/bad. *LOVE* bisect).\n\nLove bisect too for easy-to-test cases.\n\n> The culprit is definitely 061303f0b50a648db8e0af23791fc56181f6bf93.\n>\n> Any perl-literate takers? Otherwise, just reverting the patch makes\n> things work (for me) again.\n\nDon't just revert that patch, unless I'm wrong there is some subtle\nbranch-creation breakage too.\n\ncheers,\n\n\n\n\nmartin\n"},{"id":"22659","messageId":"44A10D47.3060708@op5.se","threadId":"4678","inReplyTo":"46a038f90606270342k2288cc2ds34ae05e089b8c906@mail.gmail.com","subject":"Re: cvs importer woes","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-06-27T10:49:43Z","receivedAt":"2006-06-27T10:49:43Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Martin Langhoff wrote:\n> On 6/27/06, Andreas Ericsson <ae@op5.se> wrote:\n> \n>> Sadly, the cvsimport command no longer works to create new repositories\n>> from scratch.\n> \n> \n> We are seeing some breakage in cvsimport that started with a patch of mine:\n> \n> 8f732649bc4d5619a1b399e5808b3f4c662ad200 cvsimport: keep one index\n> per branch during import\n> \n\nI experimented a bit with that one too, but it worked for my (very \nsmall, no branches, no tags) cvs repo\n\n> \n>> The culprit is definitely 061303f0b50a648db8e0af23791fc56181f6bf93.\n>>\n>> Any perl-literate takers? Otherwise, just reverting the patch makes\n>> things work (for me) again.\n> \n> \n> Don't just revert that patch, unless I'm wrong there is some subtle\n> branch-creation breakage too.\n> \n\nDscho's patch on top of 061303f0b works wonders. Thanks all the same though.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"22661","messageId":"46a038f90606270352w32e3888dk1557eefbe1043d92@mail.gmail.com","threadId":"4678","inReplyTo":"Pine.LNX.4.63.0606271234350.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [TRYTHIS] cvsimport: fix initial import","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2006-06-27T10:52:48Z","receivedAt":"2006-06-27T10:52:48Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"Hi Johannes,\n\nthis patch doesn't quite make sense to me. The git-read-tree should be\nin the else block of the unless you have right there (and it's\nactually there, but it may be breaking in some cases? Perhaps should\nhappen a bit earlier?).\n\nHow do you expect to run git-read-tree or die _before_ git-init-db?\n\ncheers,\n\n\nmartin\n"},{"id":"22663","messageId":"Pine.LNX.4.63.0606271259200.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4678","inReplyTo":"46a038f90606270352w32e3888dk1557eefbe1043d92@mail.gmail.com","subject":"Re: [TRYTHIS] cvsimport: fix initial import","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-06-27T11:01:52Z","receivedAt":"2006-06-27T11:01:52Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 27 Jun 2006, Martin Langhoff wrote:\n\n> this patch doesn't quite make sense to me. The git-read-tree should be\n> in the else block of the unless you have right there (and it's\n> actually there, but it may be breaking in some cases? Perhaps should\n> happen a bit earlier?).\n> \n> How do you expect to run git-read-tree or die _before_ git-init-db?\n\nOops. I even do not remember what I smoked.\n\nThe git-read-tree before git-init-db evidently only works if this is not \nthe initial import. Which it wasn't in my case.\n\nAnd I keep getting confused with the \"if\" and \"unless\" sometimes \nprepended, sometimes appended. Well, that is Perl before Swine for me ;-)\n\nHow about this instead:\n\n git-cvsimport.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 50f5d96..4caef10 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -470,8 +470,6 @@ my %index; # holds filenames of one inde\n $index{$opt_o} = tmpnam();\n \n $ENV{GIT_INDEX_FILE} = $index{$opt_o};\n-system(\"git-read-tree\", $opt_o);\n-die \"read-tree failed: $?\\n\" if $?;\n \n unless(-d $git_dir) {\n \tsystem(\"git-init-db\");\n@@ -482,6 +480,8 @@ unless(-d $git_dir) {\n \t$last_branch = $opt_o;\n \t$orig_branch = \"\";\n } else {\n+\tsystem(\"git-read-tree\", $opt_o);\n+\tdie \"read-tree failed: $?\\n\" if $?;\n \t-f \"$git_dir/refs/heads/$opt_o\"\n \t\tor die \"Branch '$opt_o' does not exist.\\n\".\n \t\t       \"Either use the correct '-o branch' option,\\n\".\n"}]}