{"thread":{"id":"21259","subject":"Introduction and Wikipedia and Git Blame","startedAt":"2009-10-16T09:07:58Z","lastAt":"2009-10-22T06:41:53Z","messageCount":15,"participants":["jamesmikedupont@googlemail.com","Johannes Schindelin","Martin Langhoff","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"125153","messageId":"ee9cc730910160207x49feb40ej692188abb0a57473@mail.gmail.com","threadId":"21259","inReplyTo":null,"subject":"Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-16T09:07:58Z","receivedAt":"2009-10-16T09:07:58Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"Hi all,\n\nI would like to say Hi! Git is great.\n\nI made a hack to import the wikipedia changelogs into git, it is free\nsoftware and all checked in. I will be improving it to keep the git\nrepo in sync.\n\nHere is the discussion on foundation-l :\nhttp://www.gossamer-threads.com/lists/wiki/foundation/181163\n\nthe question is, is there a blame tool that we can use for multiple\nhorizontal diffs on the same line that will be needed for wikipedia\narticles?\n\nIf not, I would work on this, if you give me some pointers.\n\nthanks,\nmike\n"},{"id":"125157","messageId":"alpine.DEB.1.00.0910161321550.4985@pacific.mpi-cbg.de","threadId":"21259","inReplyTo":"ee9cc730910160207x49feb40ej692188abb0a57473@mail.gmail.com","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-10-16T11:26:16Z","receivedAt":"2009-10-16T11:26:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 16 Oct 2009, jamesmikedupont@googlemail.com wrote:\n\n> I made a hack to import the wikipedia changelogs into git, it is free\n> software and all checked in. I will be improving it to keep the git\n> repo in sync.\n\nThis is cool!  I actually wanted this for quite some time, and could not \nfind the time to do it myself.\n\n> Here is the discussion on foundation-l :\n> http://www.gossamer-threads.com/lists/wiki/foundation/181163\n\nI found the link to the bazaar repository there, but do you have a Git \nrepository, too?\n\n> the question is, is there a blame tool that we can use for multiple \n> horizontal diffs on the same line that will be needed for wikipedia \n> articles?\n\nI am not quite sure what you want to do horizontally there... Can you \nexplain what you want to see?\n\nCiao,\nDscho\n"},{"id":"125161","messageId":"46a038f90910160438y4acbab9fy1bfb579bd9a067d6@mail.gmail.com","threadId":"21259","inReplyTo":"alpine.DEB.1.00.0910161321550.4985@pacific.mpi-cbg.de","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2009-10-16T11:38:20Z","receivedAt":"2009-10-16T11:38:20Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Fri, Oct 16, 2009 at 1:26 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> I am not quite sure what you want to do horizontally there... Can you\n> explain what you want to see?\n\nHighlight the changed bits on the line. Example - the red-bold highlight in:\n\nhttp://en.wikipedia.org/w/index.php?title=David_Letterman&action=historysubmit&diff=320061135&oldid=320060840\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"125162","messageId":"ee9cc730910160443k7e5f718bs964923a796cf38d1@mail.gmail.com","threadId":"21259","inReplyTo":"alpine.DEB.1.00.0910161321550.4985@pacific.mpi-cbg.de","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-16T11:43:08Z","receivedAt":"2009-10-16T11:43:08Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"On Fri, Oct 16, 2009 at 1:26 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n>> Here is the discussion on foundation-l :\n>> http://www.gossamer-threads.com/lists/wiki/foundation/181163\n>\n> I found the link to the bazaar repository there, but do you have a Git\n> repository, too?\n\nNot yet. Where should I put it?  Any suggestions.\n\n>> the question is, is there a blame tool that we can use for multiple\n>> horizontal diffs on the same line that will be needed for wikipedia\n>> articles?\n>\n> I am not quite sure what you want to do horizontally there... Can you\n> explain what you want to see?\n\nYes, I would like to see all the contributors to each word or line.\n\nBasically one line of blame per contributor, so many lines of output.\nIdeally we would have something that is usable in a html display. Lets\nsay, just an blame attribute for each word. so on one line :\n\nThis is a line with two changes first change Second change  end of line\n\nIt would look like this in html :\nThis is a line with two changes <span blame=revisionid>first\nchange</span><span blame=revisionid>Second change</span> end of line\n\nThe blame edit could look like this :\nREVISION ID 1    48     :  This is a line with two changes first\nchange first change \\\nREVISTION ID 2  48 C:   Second change end of line\n\n\nlet me see if I can find an online example.\n\nHere is a blame tool with links to the edits:\nhttp://hewgill.com/journal/entries/461-wikipedia-blame\n\nhere is the wikitrust tool that could be interesting :\nhttp://wikitrust.soe.ucsc.edu/\nhttp://wikitrust.collaborativetrust.com/screenshots\n\nThanks,\nmike\n"},{"id":"125169","messageId":"alpine.DEB.1.00.0910161548550.4985@pacific.mpi-cbg.de","threadId":"21259","inReplyTo":"ee9cc730910160443k7e5f718bs964923a796cf38d1@mail.gmail.com","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-10-16T14:11:02Z","receivedAt":"2009-10-16T14:11:02Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 16 Oct 2009, jamesmikedupont@googlemail.com wrote:\n\n> On Fri, Oct 16, 2009 at 1:26 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n> >> Here is the discussion on foundation-l :\n> >> http://www.gossamer-threads.com/lists/wiki/foundation/181163\n> >\n> > I found the link to the bazaar repository there, but do you have a Git\n> > repository, too?\n> \n> Not yet. Where should I put it?  Any suggestions.\n\ngithub.com has a nice interface.\n\nBTW after reading some of the code, I am a bit surprised that you did not \ndo it as a .php script outputting fast-import capable text...\n\n> >> the question is, is there a blame tool that we can use for multiple \n> >> horizontal diffs on the same line that will be needed for wikipedia \n> >> articles?\n> >\n> > I am not quite sure what you want to do horizontally there... Can you\n> > explain what you want to see?\n> \n> Yes, I would like to see all the contributors to each word or line.\n> \n> Basically one line of blame per contributor, so many lines of output.\n> Ideally we would have something that is usable in a html display. Lets\n> say, just an blame attribute for each word. so on one line :\n> \n> This is a line with two changes first change Second change  end of line\n> \n> It would look like this in html :\n> This is a line with two changes <span blame=revisionid>first\n> change</span><span blame=revisionid>Second change</span> end of line\n> \n> The blame edit could look like this :\n> REVISION ID 1    48     :  This is a line with two changes first\n> change first change \\\n> REVISTION ID 2  48 C:   Second change end of line\n\nOkay, so basically you want to analyze the text on a word-by-word basis \nrather than line-by-line.\n\nOr maybe even better: you want to analyze the text character-by-character.  \nThat would also nicely circumvent to specify just what makes a word a word \n(subject for a lot of heated discussion during the design of the \n--color-words=<regex> patch).\n\nBasically, if I had to implement that, I would not try to modify \nbuiltin-blame.c, but write a new program linking to libgit.a, calling the \nrevision walker on the file you want to calculate the blame for.  (One of \nthe best examples is probably in builtin-shortlog.c.)\n\nThen I would introduce a linked-list structure which will hold the blamed \nregions in this form:\n\n\tstruct region {\n\t\tint start;\n\t\tstruct region *next;\n\t};\n\nInitially, this would have a start element with the start offset 0 \npointing to the end element with start offset being set to the size of the \nblob.\n\nMost likely you will have to add members to this struct, such as the \noriginal offsets (as you will have to adjust the offsets to the different \nfile revisions while you go back in time), and the commit it was \nattributed to.\n\nThen I would make modified \"texts\" from the blob of the file in the \ncurrent revision and its parent revision, by inserting newlines after \nevery single byte (probably replacing the original newlines by other \nvalues, such as \\x01).\n\nThe reason for this touchup is that the diff machinery in Git only handles \nline-based diffs.\n\nThen you can parse the hunk headers, adjust the offsets accordingly, and \nattribute the +++ regions to the current commit (by construction, the \noffsets are equal to the line number in the hunk header).  Here it is most \nlikely necessary to split the regions.\n\nYou should also have a counter how many regions are still unattributed so \nyou can stop early.\n\nCiao,\nDscho\n"},{"id":"125177","messageId":"ee9cc730910160723j5d7346a4l195ac6d3825c393b@mail.gmail.com","threadId":"21259","inReplyTo":"alpine.DEB.1.00.0910161548550.4985@pacific.mpi-cbg.de","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-16T14:23:20Z","receivedAt":"2009-10-16T14:23:20Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"Johannes,\nThanks for your input,\ncomments below.\nmfg,\nmike\n\nOn Fri, Oct 16, 2009 at 4:11 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Fri, 16 Oct 2009, jamesmikedupont@googlemail.com wrote:\n>\n>> On Fri, Oct 16, 2009 at 1:26 PM, Johannes Schindelin\n>> <Johannes.Schindelin@gmx.de> wrote:\n>> >> Here is the discussion on foundation-l :\n>> >> http://www.gossamer-threads.com/lists/wiki/foundation/181163\n>> >\n>> > I found the link to the bazaar repository there, but do you have a Git\n>> > repository, too?\n>>\n>> Not yet. Where should I put it?  Any suggestions.\n>\n> github.com has a nice interface.\n>\n> BTW after reading some of the code, I am a bit surprised that you did not\n> do it as a .php script outputting fast-import capable text...\n\nI dont really know php, and I dont have a debugger or any tools in it....\nReally cannot understand how people can work in such an environment.\n\nI have done all my hacking work as perl scripts.\nThese can be rewritten in c later on.\n\n\n> Okay, so basically you want to analyze the text on a word-by-word basis\n> rather than line-by-line.\nyes.\n\n>\n> Or maybe even better: you want to analyze the text character-by-character.\n> That would also nicely circumvent to specify just what makes a word a word\n> (subject for a lot of heated discussion during the design of the\n> --color-words=<regex> patch).\n\nYes,  Someone suggested in irc to review the color-words , I have the\nsource code now and will be looking into that.\n\n>\n> Basically, if I had to implement that, I would not try to modify\n> builtin-blame.c, but write a new program linking to libgit.a, calling the\n> revision walker on the file you want to calculate the blame for.  (One of\n> the best examples is probably in builtin-shortlog.c.)\n>\n> Then I would introduce a linked-list structure which will hold the blamed\n> regions in this form:\n>\n>        struct region {\n>                int start;\n>                struct region *next;\n>        };\n>\n> Initially, this would have a start element with the start offset 0\n> pointing to the end element with start offset being set to the size of the\n> blob.\n>\n> Most likely you will have to add members to this struct, such as the\n> original offsets (as you will have to adjust the offsets to the different\n> file revisions while you go back in time), and the commit it was\n> attributed to.\n>\n> Then I would make modified \"texts\" from the blob of the file in the\n> current revision and its parent revision, by inserting newlines after\n> every single byte (probably replacing the original newlines by other\n> values, such as \\x01).\n>\n> The reason for this touchup is that the diff machinery in Git only handles\n> line-based diffs.\n>\n> Then you can parse the hunk headers, adjust the offsets accordingly, and\n> attribute the +++ regions to the current commit (by construction, the\n> offsets are equal to the line number in the hunk header).  Here it is most\n> likely necessary to split the regions.\n>\n> You should also have a counter how many regions are still unattributed so\n> you can stop early.\n\nOk this sounds like a plan. I think that will be a good outline to\nstart some work.\nI will let you know when I have made some progress.\nthanks,\nmike\n"},{"id":"125191","messageId":"7vbpk7w9qx.fsf@alter.siamese.dyndns.org","threadId":"21259","inReplyTo":"alpine.DEB.1.00.0910161548550.4985@pacific.mpi-cbg.de","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-16T17:04:38Z","receivedAt":"2009-10-16T17:04:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Then I would make modified \"texts\" from the blob of the file in the \n> current revision and its parent revision, by inserting newlines after \n> every single byte (probably replacing the original newlines by other \n> values, such as \\x01).\n>\n> The reason for this touchup is that the diff machinery in Git only handles \n> line-based diffs.\n>\n> Then you can parse the hunk headers, adjust the offsets accordingly,...\n\nI would agree that text converted to \"byte-per-line\" format would be the\neasiest way to re-use the diff engine, but if you go one more step, you\ncan even reusel the blame engine as well.  You convert the text into\n\"byte-in-hex-and-lf\" (e.g. \"AB C\\n\" becomes \"41\\n42\\n20\\n43\\n0a\\n\") and\nfeed it into existing blame and have it produce script-readable output,\ninstead of feeding that to your reinvention of blame using diff engine.\n\nYou would need to postprocess the computed result (either by diff or\nblame) to lay out the final text output in either case anyway, and making\nthe existing blame engine do the work for you would be a better approach,\nI think.\n"},{"id":"125198","messageId":"ee9cc730910161100r71818303v343f555151db4dcc@mail.gmail.com","threadId":"21259","inReplyTo":"7vbpk7w9qx.fsf@alter.siamese.dyndns.org","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-16T18:00:17Z","receivedAt":"2009-10-16T18:00:17Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"On Fri, Oct 16, 2009 at 7:04 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n>> Then I would make modified \"texts\" from the blob of the file in the\n>> current revision and its parent revision, by inserting newlines after\n>> every single byte (probably replacing the original newlines by other\n>> values, such as \\x01).\n>>\n>> The reason for this touchup is that the diff machinery in Git only handles\n>> line-based diffs.\n>>\n>> Then you can parse the hunk headers, adjust the offsets accordingly,...\n>\n> I would agree that text converted to \"byte-per-line\" format would be the\n> easiest way to re-use the diff engine, but if you go one more step, you\n> can even reusel the blame engine as well.  You convert the text into\n> \"byte-in-hex-and-lf\" (e.g. \"AB C\\n\" becomes \"41\\n42\\n20\\n43\\n0a\\n\") and\n> feed it into existing blame and have it produce script-readable output,\n> instead of feeding that to your reinvention of blame using diff engine.\n>\n> You would need to postprocess the computed result (either by diff or\n> blame) to lay out the final text output in either case anyway, and making\n> the existing blame engine do the work for you would be a better approach,\n> I think.\n\nPlease can you tell me what is the basic algorithm of the blame engine?\nI will have to start reading code\nHow can it tell the author a given line and I like the idea of one\nline per char, even the newlines would be encoded that way. If it is a\nunicode char, it might be multibyte.\n\nThe script would get the blame per byte and then recode that into\nsomething visible.\n\nod the octal dump utility comes to mind,\nod x1 -w1 will output the file in one byte widths.\n\nNow what about the ability to just pipe the file via some tool and\nthen run blame on that. It would just start the line with the byte\noffset and blame would emit the blame for that offset and emit the\ntext that is following it.\n\nso for example :\nod x1 -w1  somefile :\n///////////////////////////////\nOffset       value\n======= ======\n0052752 065347\n0052754 030356\n0052756 035741\n0052760 136302\n0052762 035346\n\nHere we see the lines are 0052760 - 0052762 =2  apart.\n\nand then if you want wider diffs :\nod some file\n////////////////////////////////////////////\nOffset       values\n======= ====== ====== ====== ====== ====== ====== ====== ======\n0074520 051754 162613 057705 155520 047032 043654 175550 062704\n0074540 164400 060340 123434 030350 040457 136010 042270 170525\n0074560 165053 124677 125776 031370 000006 102076 060060 052434\n0074600 176452 140240 074007 130113 100424 020010 130773 103467\n0074620 052776 052421 021544 101357 120035 107562 072641 053636\n\nHere we see the lines are 0074520 - 0074540   = 20 apart.\n\nThat way the blame tool will not be concerned with the formatting or\ncontent, the users can write filters like they want, and blame would\nonly expect a byte offset...\n\nThat way, we could write something like this :\ngrep -b x Test.xml\n0:<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n39:<gpx\n107:  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\nthen we would get blames for those byte offsets, very simple.\n\nWe could reduce this down to : make blame take a  list of byte positions.\ngrep -b \\n Test.gpx would be the standard behavior, emit the blame per newline.\n\nmike\n"},{"id":"125202","messageId":"7v7huvuptn.fsf@alter.siamese.dyndns.org","threadId":"21259","inReplyTo":"ee9cc730910161100r71818303v343f555151db4dcc@mail.gmail.com","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-16T19:00:20Z","receivedAt":"2009-10-16T19:00:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"jamesmikedupont@googlemail.com\" <jamesmikedupont@googlemail.com> writes:\n\n>> You would need to postprocess the computed result (either by diff or\n>> blame) to lay out the final text output in either case anyway, and making\n>> the existing blame engine do the work for you would be a better approach,\n>> I think.\n>\n> Please can you tell me what is the basic algorithm of the blame engine?\n\nI think this is one of the most conprehensive write-up on the algorithm:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/28826/focus=28895\n\nThe whole thread (at least what I wrote in it) is worth reading if you\nwant to understand what the current code does.  The first message in the\nthread talks about \"NEEDSWORK\" label on an unimplemented part of the code,\nand says \"we could\", but these gaps were since filled.\n"},{"id":"125206","messageId":"7vpr8nt894.fsf@alter.siamese.dyndns.org","threadId":"21259","inReplyTo":"7v7huvuptn.fsf@alter.siamese.dyndns.org","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-16T20:05:11Z","receivedAt":"2009-10-16T20:05:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> \"jamesmikedupont@googlemail.com\" <jamesmikedupont@googlemail.com> writes:\n>\n>>> You would need to postprocess the computed result (either by diff or\n>>> blame) to lay out the final text output in either case anyway, and making\n>>> the existing blame engine do the work for you would be a better approach,\n>>> I think.\n>>\n>> Please can you tell me what is the basic algorithm of the blame engine?\n>\n> I think this is one of the most conprehensive write-up on the algorithm:\n>\n>   http://thread.gmane.org/gmane.comp.version-control.git/28826/focus=28895\n>\n> The whole thread (at least what I wrote in it) is worth reading if you\n> want to understand what the current code does.  The first message in the\n> thread talks about \"NEEDSWORK\" label on an unimplemented part of the code,\n> and says \"we could\", but these gaps were since filled.\n\nAh, nevermind.  The thread is the definitive description of the blame\nalgorithm, but I agree with Dscho that in this case, you either have to\nchange blame itself to do this \"byte-wise\" comparison internally between\nversions, or re-do the blame logic yourself like Dscho suggests.  Dscho is\nright in this case; an unmodifled blame engine, unless you feed a history\nthat is converted to use the byte-per-line format, won't help you at all.\n\nSo it would be either between rolling a custom byte-wise blame algorithm\nyourself and teaching a new byte-wise mode to existing blame engine.\nSorry for making the task sound much easier than it would be.\n"},{"id":"125210","messageId":"ee9cc730910161419x608f5972x705ce8088d72c94a@mail.gmail.com","threadId":"21259","inReplyTo":"7vpr8nt894.fsf@alter.siamese.dyndns.org","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-16T21:19:03Z","receivedAt":"2009-10-16T21:19:03Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"What do you think of my idea to create blames along a specific user\ndefined byte positions ?\nplease review my suggestion and comment.\n\nmike\n\nOn Fri, Oct 16, 2009 at 10:05 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> \"jamesmikedupont@googlemail.com\" <jamesmikedupont@googlemail.com> writes:\n>>\n>>>> You would need to postprocess the computed result (either by diff or\n>>>> blame) to lay out the final text output in either case anyway, and making\n>>>> the existing blame engine do the work for you would be a better approach,\n>>>> I think.\n>>>\n>>> Please can you tell me what is the basic algorithm of the blame engine?\n>>\n>> I think this is one of the most conprehensive write-up on the algorithm:\n>>\n>>   http://thread.gmane.org/gmane.comp.version-control.git/28826/focus=28895\n>>\n>> The whole thread (at least what I wrote in it) is worth reading if you\n>> want to understand what the current code does.  The first message in the\n>> thread talks about \"NEEDSWORK\" label on an unimplemented part of the code,\n>> and says \"we could\", but these gaps were since filled.\n>\n> Ah, nevermind.  The thread is the definitive description of the blame\n> algorithm, but I agree with Dscho that in this case, you either have to\n> change blame itself to do this \"byte-wise\" comparison internally between\n> versions, or re-do the blame logic yourself like Dscho suggests.  Dscho is\n> right in this case; an unmodifled blame engine, unless you feed a history\n> that is converted to use the byte-per-line format, won't help you at all.\n>\n> So it would be either between rolling a custom byte-wise blame algorithm\n> yourself and teaching a new byte-wise mode to existing blame engine.\n> Sorry for making the task sound much easier than it would be.\n>\n>\n>\n"},{"id":"125219","messageId":"7v3a5irkel.fsf@alter.siamese.dyndns.org","threadId":"21259","inReplyTo":"ee9cc730910161419x608f5972x705ce8088d72c94a@mail.gmail.com","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-10-16T23:25:38Z","receivedAt":"2009-10-16T23:25:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"jamesmikedupont@googlemail.com\" <jamesmikedupont@googlemail.com> writes:\n\n> What do you think of my idea to create blames along a specific user\n> defined byte positions ?\n\nOverly complicated and not enough time for _review_.  If you are blaming\none-byte (or one-char) per line, wouldn't it be enough to consider the\nline number in the output as byte (or char) position when reconstituting\nthe original text?\n"},{"id":"125226","messageId":"ee9cc730910162350p250b8afak767b0626bede34e4@mail.gmail.com","threadId":"21259","inReplyTo":"7v3a5irkel.fsf@alter.siamese.dyndns.org","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-17T06:50:15Z","receivedAt":"2009-10-17T06:50:15Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"Thank you very much for your input and advice,\nI have a lot of learn about this great tool.\nI am working on learning how the existing blame tool runs now.\nWill report back when I have some code.\nmike\n\nOn Sat, Oct 17, 2009 at 1:25 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> \"jamesmikedupont@googlemail.com\" <jamesmikedupont@googlemail.com> writes:\n>\n>> What do you think of my idea to create blames along a specific user\n>> defined byte positions ?\n>\n> Overly complicated and not enough time for _review_.  If you are blaming\n> one-byte (or one-char) per line, wouldn't it be enough to consider the\n> line number in the output as byte (or char) position when reconstituting\n> the original text?\n>\n"},{"id":"125245","messageId":"ee9cc730910170942p7869d62ra08571948675d696@mail.gmail.com","threadId":"21259","inReplyTo":"ee9cc730910162350p250b8afak767b0626bede34e4@mail.gmail.com","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-17T16:42:18Z","receivedAt":"2009-10-17T16:42:18Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"I have done a workaround hack,\ntoday I attempted to hack the blame code but I need to do more\nresearch, it did not work.\n\nBut I did get a new version of the import script running and word\nlevel blame going.\n\nhttp://fmtyewtk.blogspot.com/2009/10/mediawiki-git-word-level-blaming-one.html\n\nNext step is ready :\n\n1. I have a single script that will pull a given article and check in\nthe revisions into git,\nit is not perfect, but works.\n\nhttp://bazaar.launchpad.net/~jamesmikedupont/+junk/wikiatransfer/revision/8\nyou run it like this,from inside a git repo :\n\nperl GetRevisions.pl \"Article_Name\"\n\ngit blame Article_Name/Article.xml\ngit push origin master\n\nThe code that splits up the line is in Process File, this splits all\nspaces into newlines.\nthat way we get a word level blame.\n\n     if ($insidetext)\n     {\n  ## split all lines on the space\n  s/(\\ )/\\\\\\n/g;\n\n\n  print OUT  $_;\n     }\n\n\nThe Article is here:\nhttp://github.com/h4ck3rm1k3/KosovoWikipedia/blob/master/Wiki/2008_Kosovo_declaration_of_independence/article.xml\n\n\nhere are the blame results.\nhttp://github.com/h4ck3rm1k3/KosovoWikipedia/blob/master/Wiki/2008_Kosovo_declaration_of_independence/wordblame.txt\n\n\nProblem is that github does not like this amount of processor power\nbegin used and kills the process, you can do a local git blame.\n\nNow we have the tool to easily create a repository from wikipedia, or\nany other export enabled mediawiki.\n\nmike\n\n\nOn Sat, Oct 17, 2009 at 8:50 AM, jamesmikedupont@googlemail.com\n<jamesmikedupont@googlemail.com> wrote:\n> Thank you very much for your input and advice,\n> I have a lot of learn about this great tool.\n> I am working on learning how the existing blame tool runs now.\n> Will report back when I have some code.\n> mike\n>\n> On Sat, Oct 17, 2009 at 1:25 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> \"jamesmikedupont@googlemail.com\" <jamesmikedupont@googlemail.com> writes:\n>>\n>>> What do you think of my idea to create blames along a specific user\n>>> defined byte positions ?\n>>\n>> Overly complicated and not enough time for _review_.  If you are blaming\n>> one-byte (or one-char) per line, wouldn't it be enough to consider the\n>> line number in the output as byte (or char) position when reconstituting\n>> the original text?\n>>\n>\n"},{"id":"125678","messageId":"ee9cc730910212341w5698e18fqc12a6634a52a93be@mail.gmail.com","threadId":"21259","inReplyTo":"ee9cc730910170942p7869d62ra08571948675d696@mail.gmail.com","subject":"Re: Introduction and Wikipedia and Git Blame","fromName":"jamesmikedupont@googlemail.com","fromEmail":"jamesmikedupont@googlemail.com","sentAt":"2009-10-22T06:41:53Z","receivedAt":"2009-10-22T06:41:53Z","isPatch":false,"sender":{"key":"jamesmikedupont@googlemail.com","avatar":"https://gravatar.com/avatar/cbdff8736805f90186ab15da223e68e3fa91399fd634bfb07ed90a7af1e18140?d=mp&s=160"},"body":"Hi all,\nI have creates a group here mediawiki-vcs and you are invited to join,\nit will be to create a git/vcs backend for the mediawiki.\n\nhttp://groups.google.com/group/mediawiki-vcs/browse_thread/thread/ad3e0a194c8ac1d5#\n\n\nAlso, I have started to document the git internal structure, with the\nidea of a gitbus, a dbus like system for doing rpc calls over git for\nexpensive and repeatable operations.\nhttp://github.com/h4ck3rm1k3/GitBus\n\nthanks,\nmike\n"}]}