{"thread":{"id":"27470","subject":"Git-Mediawiki : Question about Jeff King's import script","startedAt":"2011-05-26T15:18:11Z","lastAt":"2011-05-27T12:45:45Z","messageCount":4,"participants":["Claire Fousse","Jeff King","Alexandre Dulaunoy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"168775","messageId":"BANLkTi=nLZV_QCyKT8LOhzkJYoJD6J4wPA@mail.gmail.com","threadId":"27470","inReplyTo":null,"subject":"Git-Mediawiki : Question about Jeff King's import script","fromName":"Claire Fousse","fromEmail":"claire.fousse@gmail.com","sentAt":"2011-05-26T15:18:11Z","receivedAt":"2011-05-26T15:18:11Z","isPatch":false,"sender":{"key":"claire.fousse@gmail.com","avatar":"https://gravatar.com/avatar/2d6f108c8757bbf3ee89b1f35e793931c36a937f7242524f032563974a95dc45?d=mp&s=160"},"body":"Dear Jeff King,\nWe are the four students in charge of the Git-Mediawiki project\nproposed by Matthieu Moy.\nIn case you skipped our email, here is a link to our last mail with a\nfew information about the project\nhttp://www.spinics.net/lists/git/msg158701.html\nWe based our script on what you called a few months ago the \"quick and\ndirty perl script\" for the import part and have a few questions about\nit.\nFirst of all, just in case, here is your original script :\nhttp://article.gmane.org/gmane.comp.version-control.git/167560\n\nIt seems like you first used a hashmap for it to be transformed later\ninto a flat list / array. What is the reasoning behind this ? Why not\ncreate an array right away ?\n\nThanks for the script and for any information you can give us,\n\nRegards,\nThe Git-Mediawiki team, Arnaud Lacurie, David Amouyal, Claire Fousse &\nJeremie Nikaes.\n"},{"id":"168778","messageId":"20110526154214.GA4049@sigill.intra.peff.net","threadId":"27470","inReplyTo":"BANLkTi=nLZV_QCyKT8LOhzkJYoJD6J4wPA@mail.gmail.com","subject":"Re: Git-Mediawiki : Question about Jeff King's import script","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-05-26T15:42:14Z","receivedAt":"2011-05-26T15:42:14Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, May 26, 2011 at 05:18:11PM +0200, Claire Fousse wrote:\n\n> We based our script on what you called a few months ago the \"quick and\n> dirty perl script\" for the import part and have a few questions about\n> it.\n> First of all, just in case, here is your original script :\n> http://article.gmane.org/gmane.comp.version-control.git/167560\n> \n> It seems like you first used a hashmap for it to be transformed later\n> into a flat list / array. What is the reasoning behind this ? Why not\n> create an array right away ?\n\nThe hashmap is actually backed by an on-disk key/value database.  The\npurpose of this was to allow resuming an import that had failed in the\nmiddle (since even for a moderate-sized wiki like the git wiki, the\nimport was quite slow).\n\nSo the hashmap is indexed by page id, and each value contains an array\nof revisions for that page. If we see a page id that we've already done,\nwe can skip importing it.\n\nIf you wanted to do it all at once, yes, you could build a flat array of\nrevisions, with each revision mentioning the page that it came from, and\njust keep appending to the array as you read more data from the wiki.\nAnd then at the end, sort that array based on timestamp to get the\nchronological ordering of changes.\n\nHope that helps,\n-Peff\n"},{"id":"168857","messageId":"BANLkTinxb8vpjDx7pJ1zL4GhwL3nLe0YoA@mail.gmail.com","threadId":"27470","inReplyTo":"20110526154214.GA4049@sigill.intra.peff.net","subject":"Re: Git-Mediawiki : Question about Jeff King's import script","fromName":"Claire Fousse","fromEmail":"claire.fousse@gmail.com","sentAt":"2011-05-27T09:05:07Z","receivedAt":"2011-05-27T09:05:07Z","isPatch":false,"sender":{"key":"claire.fousse@gmail.com","avatar":"https://gravatar.com/avatar/2d6f108c8757bbf3ee89b1f35e793931c36a937f7242524f032563974a95dc45?d=mp&s=160"},"body":"Thanks for your answer. That helped a lot.\n\n-- \nClaire Fousse\n"},{"id":"168867","messageId":"BANLkTi=KG5TgxHnKDgf1nt_x5YJ1rGwNww@mail.gmail.com","threadId":"27470","inReplyTo":"BANLkTi=nLZV_QCyKT8LOhzkJYoJD6J4wPA@mail.gmail.com","subject":"Re: Git-Mediawiki : Question about Jeff King's import script","fromName":"Alexandre Dulaunoy","fromEmail":"a@foo.be","sentAt":"2011-05-27T12:45:45Z","receivedAt":"2011-05-27T12:45:45Z","isPatch":false,"sender":{"key":"a@foo.be","avatar":null},"body":"On Thu, May 26, 2011 at 5:18 PM, Claire Fousse <claire.fousse@gmail.com> wrote:\n> Dear Jeff King,\n> We are the four students in charge of the Git-Mediawiki project\n> proposed by Matthieu Moy.\n> In case you skipped our email, here is a link to our last mail with a\n> few information about the project\n> http://www.spinics.net/lists/git/msg158701.html\n> We based our script on what you called a few months ago the \"quick and\n> dirty perl script\" for the import part and have a few questions about\n> it.\n> First of all, just in case, here is your original script :\n> http://article.gmane.org/gmane.comp.version-control.git/167560\n>\n> It seems like you first used a hashmap for it to be transformed later\n> into a flat list / array. What is the reasoning behind this ? Why not\n> create an array right away ?\n>\n> Thanks for the script and for any information you can give us,\n\nIn a similar spirit, there is this Ruby script:\n\nhttps://github.com/singpolyma/git-mediawiki/blob/master/clone.rb\n\nusing the Mediawiki API. Quite nifty.\n\nHope this helps,\n\n\n\n-- \n--                   Alexandre Dulaunoy (adulau) -- http://www.foo.be/\n--                             http://www.foo.be/cgi-bin/wiki.pl/Diary\n--         \"Knowledge can create problems, it is not through ignorance\n--                                that we can solve them\" Isaac Asimov\n"}]}