{"thread":{"id":"41015","subject":"Help debugging git-svn","startedAt":"2015-12-16T04:00:48Z","lastAt":"2016-01-09T03:39:09Z","messageCount":6,"participants":["Edmundo Carmona Antoranz","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"274548","messageId":"CAOc6etaOKSN0KyB9v2caiQbaQBEGrHxi3NmFy3aJkFxczGdqHA@mail.gmail.com","threadId":"41015","inReplyTo":null,"subject":"Help debugging git-svn","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2015-12-16T04:00:48Z","receivedAt":"2015-12-16T04:00:48Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"Hello, Eric, Everybody!\n\nI need your help getting git-svn to clone a repository.\n\nI had already cloned it once but then a few months ago I discovered\nthe authors map file and it's like the first time I did a checkout\nusing git.... well, perhaps not that much, but close. Seeing the real\nnames of people when using log, blame, etc is a major difference...\nso, back to my tale of sorts.\n\nThe thing is that I have already tried to clone it _several_ times and\nit always breaks at one point or another (or rather, at one revision\nof a branch or another). I have come to think that it's more or less\nat the same revisions that it breaks but I'm not 100% certain.\n\nWhat I _think_ is the cause of most of the problems is that in our\nrepo people have misplaced branches _inside_ other branches, at least\nfor a few revisions before realizing their mistake and deleting it.\n\nSo.... say I have a standard layout.\n\ntrunk\nbranches\ntags\n\nThen at one point I copy trunk to branches/a\n\nLater on I copy trunk to branches/b\n\nLater on I copy trunk to branches/b/c (instead of branches/c)\n\nAnd a few revisions later I realize my mistake and copy branches/b/c\nto branches/c and remove branches/b/c\n\nI infer this because I'm seeing that on one of the revisions where git\nsvn usually breaks when fetching has the content of the project inside\na directory, like, say I have directories A, B and C in the project\nand I'm seeing that git svn is fetching a revision where the all the\npaths of the files are prepended by a directory that looks like a\nbranch, like this:\n\nbranch_name/A/filea.txt\nbranch_name/A/fileb.txt\netc etc\n\nInstead of\nA/filea.txt\nA/fileb.txt\n\nSo... throw some ideas around that... and then, could you tell a\nnon-perl developer how to debug it? Perhaps increase verbosity?\n\nOne of the errors I see often when fetching (my memory tells me that\nit's associated to the branch-in-branch problem but I'm not completely\nsure right now), looks like this:\n\n1 [main] perl 5652 cygwin_exception::open_stackdumpfile: Dumping stack\ntrace to perl.exe.stackdump\n\nAnd then, in the file:\n\nException: STATUS_ACCESS_VIOLATION at rip=0048360C10C\nrax=0000000601E4BFF8 rbx=000000005219E248 rcx=000000060003A590\nrdx=0000000000000000 rsi=000000000000A950 rdi=0000000000000004\nr8 =0000000000000000 r9 =0000000000000000 r10=0000000000230000\nr11=000000048D78607A r12=0000000000000003 r13=000006FFFFF54A98\nr14=0000000601E18030 r15=000006FFFFF54AB0\nrbp=0000000000054A88 rsp=000000000022B810\nprogram=C:\\Program Files\\Git\\usr\\bin\\perl.exe, pid 5652, thread main\ncs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B\n\n\nWith my very flawed knowledge of perl I have seen that the process is\ngetting to Ra.pm around here:\n\nour $AUTOLOAD;\nsub AUTOLOAD {\n    my $class = ref($_[0]);\n    $AUTOLOAD =~ s/^${class}::(SUPER::)?//;\n    return if $AUTOLOAD =~ m/^[A-Z]/;\n\n    my $self = shift;\n    no strict 'refs';\n\n    my $method = $self->can(\"invoke_$AUTOLOAD\")\n        or die \"no such method $AUTOLOAD\";\n\n    no warnings 'uninitialized';\n    $method->(@$self, @_);\n}\n\nThe value of $AUTOLOAD there is 'finish_report' but I don't know (or\nat least see) where $method->(@$self, @_) is going.\n\nWell... I think that's enough of a mess of a mail (sorry about that).\nHope I was able to provide enough information to at least move a\nlittle bit forward.\n\nThanks in advance.\n"},{"id":"274554","messageId":"20151216074158.GB28518@dcvr.yhbt.net","threadId":"41015","inReplyTo":"CAOc6etaOKSN0KyB9v2caiQbaQBEGrHxi3NmFy3aJkFxczGdqHA@mail.gmail.com","subject":"Re: Help debugging git-svn","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2015-12-16T07:41:58Z","receivedAt":"2015-12-16T07:41:58Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:\n> 1 [main] perl 5652 cygwin_exception::open_stackdumpfile: Dumping stack\n> trace to perl.exe.stackdump\n> \n> And then, in the file:\n> \n> Exception: STATUS_ACCESS_VIOLATION at rip=0048360C10C\n> rax=0000000601E4BFF8 rbx=000000005219E248 rcx=000000060003A590\n> rdx=0000000000000000 rsi=000000000000A950 rdi=0000000000000004\n> r8 =0000000000000000 r9 =0000000000000000 r10=0000000000230000\n> r11=000000048D78607A r12=0000000000000003 r13=000006FFFFF54A98\n> r14=0000000601E18030 r15=000006FFFFF54AB0\n> rbp=0000000000054A88 rsp=000000000022B810\n> program=C:\\Program Files\\Git\\usr\\bin\\perl.exe, pid 5652, thread main\n> cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B\n\nAny chance you can reproduce this on a Linux system?\nI do not use non-Free systems and have no debugging experience\nthere at all.\n\n> With my very flawed knowledge of perl I have seen that the process is\n> getting to Ra.pm around here:\n\nIt could also be a bug in the SVN bindings or the port of\nPerl.  Which versions are you running?\n\n\nI've also been wondering about the motivation of SVN developers to do a\ngood job on maintaining their Perl bindings (given git-svn is likely the\nmain user of them).\nWe've certainly had problems in the past with SVN breaking and\ncausing git-svn to segfault around 2011-2012; but it's been a while...\n"},{"id":"274571","messageId":"CAOc6eta=ZGyWFuBPAYe_4xWSH79RRmPcP5thCHYd8SsKScwW6g@mail.gmail.com","threadId":"41015","inReplyTo":"20151216074158.GB28518@dcvr.yhbt.net","subject":"Re: Help debugging git-svn","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2015-12-16T12:36:34Z","receivedAt":"2015-12-16T12:36:34Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"On Wed, Dec 16, 2015 at 1:41 AM, Eric Wong <normalperson@yhbt.net> wrote:\n>\n> Any chance you can reproduce this on a Linux system?\n> I do not use non-Free systems and have no debugging experience\n> there at all.\n>\n\nMy wish.... But it's a big resounding \"no\".\n\n>> With my very flawed knowledge of perl I have seen that the process is\n>> getting to Ra.pm around here:\n>\n> It could also be a bug in the SVN bindings or the port of\n> Perl.  Which versions are you running?\n\nI'm working on git for windows 2.6.3. I think I could use cygwin, just\nin case (I used it before).\n\n>\n>\n> I've also been wondering about the motivation of SVN developers to do a\n> good job on maintaining their Perl bindings (given git-svn is likely the\n> main user of them).\n> We've certainly had problems in the past with SVN breaking and\n> causing git-svn to segfault around 2011-2012; but it's been a while...\n"},{"id":"274721","messageId":"CAOc6etaUUN_OdQqVJbHZ7XPq70hzEgO2HR1Uq0XxxEtK5CeDEQ@mail.gmail.com","threadId":"41015","inReplyTo":"CAOc6eta=ZGyWFuBPAYe_4xWSH79RRmPcP5thCHYd8SsKScwW6g@mail.gmail.com","subject":"Re: Help debugging git-svn","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2015-12-18T17:28:04Z","receivedAt":"2015-12-18T17:28:04Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"Ok.... I came up with another idea to avoid having to deal with the\nold svn history (I'm having no problems fetching/dcommitting with my\ncurrent repo). I already have the branches I work with, the thing is\nthat the revisions I fetched before I started using the svn authors\nfile have nasty IDs instead of human names. I though that I could\ncreate a script to rewrite the whole history of the project adjusting\nthe usernames to real names (I'll take care of the details, no problem\nthere... just found out about filter-branch, could work for what I'm\nthinking of). My question would be in the direction of rebuilding\ngit-svn metainfo once I'm done so that I can continue fetching from\nsvn as if nothing had happened. I checked the documentation in\ngit-scm.com but didn't find the details about it. Is there a\nstraight-forward document that explains how the git-svn metadata files\nare built?\n\nThanks in advance.\n\nOn Wed, Dec 16, 2015 at 6:36 AM, Edmundo Carmona Antoranz\n<eantoranz@gmail.com> wrote:\n> On Wed, Dec 16, 2015 at 1:41 AM, Eric Wong <normalperson@yhbt.net> wrote:\n>>\n>> Any chance you can reproduce this on a Linux system?\n>> I do not use non-Free systems and have no debugging experience\n>> there at all.\n>>\n>\n> My wish.... But it's a big resounding \"no\".\n>\n>>> With my very flawed knowledge of perl I have seen that the process is\n>>> getting to Ra.pm around here:\n>>\n>> It could also be a bug in the SVN bindings or the port of\n>> Perl.  Which versions are you running?\n>\n> I'm working on git for windows 2.6.3. I think I could use cygwin, just\n> in case (I used it before).\n>\n>>\n>>\n>> I've also been wondering about the motivation of SVN developers to do a\n>> good job on maintaining their Perl bindings (given git-svn is likely the\n>> main user of them).\n>> We've certainly had problems in the past with SVN breaking and\n>> causing git-svn to segfault around 2011-2012; but it's been a while...\n"},{"id":"274746","messageId":"CAOc6etanJZub-rwqT-45WpKsutVe_wkDHbPS_RorxXLGHOE9tA@mail.gmail.com","threadId":"41015","inReplyTo":"CAOc6etaUUN_OdQqVJbHZ7XPq70hzEgO2HR1Uq0XxxEtK5CeDEQ@mail.gmail.com","subject":"Re: Help debugging git-svn","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2015-12-19T04:31:13Z","receivedAt":"2015-12-19T04:31:13Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"On Fri, Dec 18, 2015 at 11:28 AM, Edmundo Carmona Antoranz\n<eantoranz@gmail.com> wrote:\n> Ok.... I came up with another idea to avoid having to deal with the\n> old svn history (I'm having no problems fetching/dcommitting with my\n> current repo). I already have the branches I work with, the thing is\n> that the revisions I fetched before I started using the svn authors\n> file have nasty IDs instead of human names. I though that I could\n> create a script to rewrite the whole history of the project adjusting\n> the usernames to real names (I'll take care of the details, no problem\n> there... just found out about filter-branch, could work for what I'm\n> thinking of). My question would be in the direction of rebuilding\n> git-svn metainfo once I'm done so that I can continue fetching from\n> svn as if nothing had happened. I checked the documentation in\n> git-scm.com but didn't find the details about it. Is there a\n> straight-forward document that explains how the git-svn metadata files\n> are built?\n>\n> Thanks in advance.\n\n.rev_map files appear to be simple enough. I'll have fun with them a\nlittle bit. Will let you know how it goes later (don't hold your\nbreath.... it might take a while).\n"},{"id":"275592","messageId":"CAOc6etZ5Ne+1SMsZ-7psJTihkHfm2ES1TWBRfjssfiOprQvp_Q@mail.gmail.com","threadId":"41015","inReplyTo":"CAOc6etanJZub-rwqT-45WpKsutVe_wkDHbPS_RorxXLGHOE9tA@mail.gmail.com","subject":"Re: Help debugging git-svn","fromName":"Edmundo Carmona Antoranz","fromEmail":"eantoranz@gmail.com","sentAt":"2016-01-09T03:39:09Z","receivedAt":"2016-01-09T03:39:09Z","isPatch":false,"sender":{"key":"eantoranz@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1491018?v=4"},"body":"Hi!\n\nOn Fri, Dec 18, 2015 at 10:31 PM, Edmundo Carmona Antoranz\n<eantoranz@gmail.com> wrote:\n> On Fri, Dec 18, 2015 at 11:28 AM, Edmundo Carmona Antoranz\n> <eantoranz@gmail.com> wrote:\n>> Ok.... I came up with another idea to avoid having to deal with the\n>> old svn history (I'm having no problems fetching/dcommitting with my\n>> current repo). I already have the branches I work with, the thing is\n>> that the revisions I fetched before I started using the svn authors\n>> file have nasty IDs instead of human names. I though that I could\n>> create a script to rewrite the whole history of the project adjusting\n>> the usernames to real names (I'll take care of the details, no problem\n>> there... just found out about filter-branch, could work for what I'm\n>> thinking of). My question would be in the direction of rebuilding\n>> git-svn metainfo once I'm done so that I can continue fetching from\n>> svn as if nothing had happened. I checked the documentation in\n>> git-scm.com but didn't find the details about it. Is there a\n>> straight-forward document that explains how the git-svn metadata files\n>> are built?\n>>\n>> Thanks in advance.\n>\n> .rev_map files appear to be simple enough. I'll have fun with them a\n> little bit. Will let you know how it goes later (don't hold your\n> breath.... it might take a while).\n\n\nI was able to rewrite git-svn's history and I'm fetching/dcommitting\nas usual using the new branches. I posted the tool I developed for the\ntask in github [1]. The readme explains how to use it.\n\nCheers!\n\n[1] https://github.com/eantoranz/git_svn_rewrite\n"}]}