{"thread":{"id":"15919","subject":"git-svnimport.perl bug when copy source path has a revision","startedAt":"2008-10-15T19:11:03Z","lastAt":"2008-10-16T18:36:33Z","messageCount":3,"participants":["Karl Chen","Pete Harlan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"93118","messageId":"quack.20081015T1211.lth8wsp65dk@roar.cs.berkeley.edu","threadId":"15919","inReplyTo":null,"subject":"git-svnimport.perl bug when copy source path has a revision","fromName":"Karl Chen","fromEmail":"quarl@cs.berkeley.edu","sentAt":"2008-10-15T19:11:03Z","receivedAt":"2008-10-15T19:11:03Z","isPatch":false,"sender":{"key":"quarl@cs.berkeley.edu","avatar":null},"body":"\nThis looks like a bug in git-svnimport.perl.  If a tag (or\nbranch?) is created retroactively, git-svnimport doesn't respect\nthe copy source revision.\n\nTo reproduce:\n\nsvnadmin create somerepo;  export R=file://$PWD/somerepo\n\nsvn co $R wc && cd wc\n\nmkdir trunk tags && svn add trunk tags && svn commit -m \"\"  # rev 1\n\ncd trunk\necho a > a\necho b > b\necho c > c\n\nsvn add a && svn commit -m \"commit a\"   # rev 2\nsvn add b && svn commit -m \"commit b\"   # rev 3\n# Copy from revision 2 instead of HEAD:\nsvn cp -m \"tag rev 2\" $R/trunk@2 $R/tags/mytag  # rev 4\nsvn add c && svn commit -m \"commit c\"   # rev 5\n\nsvn ls $R/tags/mytag \n# Lists only 'a'\n\nmkdir /tmp/gitrepo && cd /tmp/gitrepo\nperl /usr/share/doc/git-core/contrib/examples/git-svnimport.perl $R\n\ngit log mytag\n# 'mytag' includes \"commit b\"; it was created as if it were tagged\n# at r3; the \"@2\" was ignored.\n"},{"id":"93168","messageId":"48F6E29F.1050807@pcharlan.com","threadId":"15919","inReplyTo":"quack.20081015T1211.lth8wsp65dk@roar.cs.berkeley.edu","subject":"Re: git-svnimport.perl bug when copy source path has a revision","fromName":"Pete Harlan","fromEmail":"pgit@pcharlan.com","sentAt":"2008-10-16T06:43:43Z","receivedAt":"2008-10-16T06:43:43Z","isPatch":false,"sender":{"key":"pgit@pcharlan.com","avatar":null},"body":"Karl Chen wrote:\n> This looks like a bug in git-svnimport.perl.  If a tag (or\n> branch?) is created retroactively, git-svnimport doesn't respect\n> the copy source revision.\n> \n> To reproduce:\n> \n> svnadmin create somerepo;  export R=file://$PWD/somerepo\n> \n> svn co $R wc && cd wc\n> \n> mkdir trunk tags && svn add trunk tags && svn commit -m \"\"  # rev 1\n> \n> cd trunk\n> echo a > a\n> echo b > b\n> echo c > c\n> \n> svn add a && svn commit -m \"commit a\"   # rev 2\n> svn add b && svn commit -m \"commit b\"   # rev 3\n> # Copy from revision 2 instead of HEAD:\n> svn cp -m \"tag rev 2\" $R/trunk@2 $R/tags/mytag  # rev 4\n> svn add c && svn commit -m \"commit c\"   # rev 5\n> \n> svn ls $R/tags/mytag \n> # Lists only 'a'\n> \n> mkdir /tmp/gitrepo && cd /tmp/gitrepo\n> perl /usr/share/doc/git-core/contrib/examples/git-svnimport.perl $R\n> \n> git log mytag\n> # 'mytag' includes \"commit b\"; it was created as if it were tagged\n> # at r3; the \"@2\" was ignored.\n\nIf you replace this:\n\n> perl /usr/share/doc/git-core/contrib/examples/git-svnimport.perl $R\n\nwith:\n\ngit svn init -T trunk -t tags $R\ngit svn fetch\ngit log tags/mytag\n\nyou get a log that doesn't include \"commit b\".  (And it does include the\ntag commit, as svn does.)  tags/mytag is a branch, visibile via \"git\nbranch -r\", instead of a tag.  I'm not fluent enough in git svn to know\nif this is a bug or a feature.\n\nAccording to git logs (8cb070a4, fee9832a), git-svnimport.perl hasn't\nbeen maintained in a while, presumably because git svn provides a\nsuperset of its functionality.\n\nHTH,\n\n--Pete\n"},{"id":"93219","messageId":"quack.20081016T1136.lthk5c8crpq@roar.cs.berkeley.edu","threadId":"15919","inReplyTo":"48F6E29F.1050807@pcharlan.com","subject":"Re: git-svnimport.perl bug when copy source path has a revision","fromName":"Karl Chen","fromEmail":"quarl@cs.berkeley.edu","sentAt":"2008-10-16T18:36:33Z","receivedAt":"2008-10-16T18:36:33Z","isPatch":false,"sender":{"key":"quarl@cs.berkeley.edu","avatar":null},"body":">>>>> On 2008-10-15 23:43 PDT, Pete Harlan writes:\n\n    Pete> git svn init -T trunk -t tags $R git svn fetch git log\n    Pete> tags/mytag\n\nThanks for the pointer.  I do know about git-svn and used it\nto convert most of my repositories, but one particular repository\nisn't converting with git-svn - it runs for hours before I cancel\nit, whereas git-svnimport completes in minutes.\n"}]}