{"thread":{"id":"27426","subject":"Gate between git and mediawiki : remote-helpers","startedAt":"2011-05-22T15:50:54Z","lastAt":"2011-05-26T10:16:16Z","messageCount":10,"participants":["Claire Fousse","Arnaud Lacurie","Junio C Hamano","Matthieu Moy","Jérémie NIKAES","Sverre Rabbelier"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"168447","messageId":"BANLkTikTpfpBYddfWcBfzGTuHqLyQ0sE5A@mail.gmail.com","threadId":"27426","inReplyTo":null,"subject":"Gate between git and mediawiki : remote-helpers","fromName":"Claire Fousse","fromEmail":"claire.fousse@gmail.com","sentAt":"2011-05-22T15:50:54Z","receivedAt":"2011-05-22T15:50:54Z","isPatch":false,"sender":{"key":"claire.fousse@gmail.com","avatar":"https://gravatar.com/avatar/2d6f108c8757bbf3ee89b1f35e793931c36a937f7242524f032563974a95dc45?d=mp&s=160"},"body":"Hi,\n\nI'm a member of the team trying to establish a gate between mediawiki\npowered wiki and git.\n\nWe've tried several things which seems to work. However, it is\nsomething like git-svn and would require some commands such as git-mw\nto work. Is it recommended to use remote-helpers instead of that ?\n\nThere is one problem though : nobody wants to git clone the whole\nWikipedia for instance. And we should add a functionality which allows\nthe user to clone only a part of a wiki. Are partial clonings doable\nwith remote helpers ?\n\nThank you for your help,\n\nBest Regards\n\n\n--\nClaire Fousse\n"},{"id":"168450","messageId":"BANLkTim+2Mv7bnfsNVAsn80MUx8-fjYZow@mail.gmail.com","threadId":"27426","inReplyTo":"BANLkTikTpfpBYddfWcBfzGTuHqLyQ0sE5A@mail.gmail.com","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Arnaud Lacurie","fromEmail":"arnaud.lacurie@gmail.com","sentAt":"2011-05-22T17:58:00Z","receivedAt":"2011-05-22T17:58:00Z","isPatch":false,"sender":{"key":"arnaud.lacurie@gmail.com","avatar":null},"body":"This mail referred to that previous one :\nhttp://article.gmane.org/gmane.comp.version-control.git/173991\n\n2011/5/22 Claire Fousse <claire.fousse@gmail.com>:\n> Hi,\n>\n> I'm a member of the team trying to establish a gate between mediawiki\n> powered wiki and git.\n>\n> We've tried several things which seems to work. However, it is\n> something like git-svn and would require some commands such as git-mw\n> to work. Is it recommended to use remote-helpers instead of that ?\n>\n> There is one problem though : nobody wants to git clone the whole\n> Wikipedia for instance. And we should add a functionality which allows\n> the user to clone only a part of a wiki. Are partial clonings doable\n> with remote helpers ?\n>\n> Thank you for your help,\n>\n> Best Regards\n>\n>\n> --\n> Claire Fousse\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n\nArnaud Lacurie\n"},{"id":"168451","messageId":"7vfwo6y1kg.fsf@alter.siamese.dyndns.org","threadId":"27426","inReplyTo":"BANLkTim+2Mv7bnfsNVAsn80MUx8-fjYZow@mail.gmail.com","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-22T19:31:27Z","receivedAt":"2011-05-22T19:31:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Arnaud Lacurie <arnaud.lacurie@gmail.com> writes:\n\n> This mail referred to that previous one :\n> http://article.gmane.org/gmane.comp.version-control.git/173991\n>\n> 2011/5/22 Claire Fousse <claire.fousse@gmail.com>:\n>> Hi,\n>>\n>> I'm a member of the team trying to establish a gate between mediawiki\n>> powered wiki and git.\n>>\n>> We've tried several things which seems to work. However, it is\n>> something like git-svn and would require some commands such as git-mw\n>> to work. Is it recommended to use remote-helpers instead of that ?\n\nI am not Matthew, but my gut feeling is that it largely depends on what\nyou are interacting with, and how you envision the result to be used in a\nlarger MediaWiki ecosystem.\n\nIn the case of SVN interoperability, there is an established community\nthat exchanges their work via:\n\n\tsvn checkout svn://some.where.xz/project\n        svn update\n\tsvn commit\n\nand although people on the git side can already participate with:\n\n\tgit svn init svn://some.where.xz/project\n        git svn rebase\n        git svn dcommit\n\nit is understandable that they wish to be able to say:\n\n\tgit clone svn://some.where.xz/project\n        git pull -s rebase\n        git push\n\nto make it feel more similar to the native git experience. Now, even if\nthere may be no \"svn checkout/update/commit\" equivalents in the workflow\nof established MediaWiki users, it may be nice to be able to work with:\n\n\tgit clone --vcs=mediawiki http://some.where.xz/wiki/\n        git pull\n        git push\n\n>> There is one problem though : nobody wants to git clone the whole\n>> Wikipedia for instance.\n\nThen don't let them in your initial version. I do not see any problem in\nthat. People can gain experience with smaller projects, like so:\n\n\tgit clone --vcs=mediawiki https://git.wiki.kernel.org/\n        git pull\n        git push\n\nWhen we need narrow (in the tree dimention) or shallow (in the history\ndimention) in either native or foreign transports, somebody would\neventually add proper support. Currently we do not do \"narrow\" even for\nnative transport (I have one cooking privately but it is progressing only\nslowly, and I think there may be others who are interested in it).\n\nI would suggest not to be worried too much about narrow/shallow in your\ninitial round.\n"},{"id":"168488","messageId":"BANLkTinvnm7NvUs4BuGpBYsYKR0D1eP+cQ@mail.gmail.com","threadId":"27426","inReplyTo":"7vfwo6y1kg.fsf@alter.siamese.dyndns.org","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Arnaud Lacurie","fromEmail":"arnaud.lacurie@gmail.com","sentAt":"2011-05-23T08:31:14Z","receivedAt":"2011-05-23T08:31:14Z","isPatch":false,"sender":{"key":"arnaud.lacurie@gmail.com","avatar":null},"body":"Thank you for your advice.\n\n2011/5/22 Junio C Hamano <gitster@pobox.com>:\n\n>\n>        git clone --vcs=mediawiki http://some.where.xz/wiki/\n>        git pull\n>        git push\n>\n\nIs vcs a standard argument (I can't see it anywhere) or do we have to\nchange something in order to implement it?\n\nAdditionally, is there an example of protocol which uses\nremote-helpers? It seems that in the remote-helpers directory, there\nisn't anything but a git directory. Is there some other protocols than\ngit that already use remote helpers?\n\nThank you very much.\n\n-- \nArnaud Lacurie\n"},{"id":"168490","messageId":"vpqk4dhzsvh.fsf@bauges.imag.fr","threadId":"27426","inReplyTo":"BANLkTinvnm7NvUs4BuGpBYsYKR0D1eP+cQ@mail.gmail.com","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2011-05-23T09:08:34Z","receivedAt":"2011-05-23T09:08:34Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Arnaud Lacurie <arnaud.lacurie@gmail.com> writes:\n\n> Thank you for your advice.\n>\n> 2011/5/22 Junio C Hamano <gitster@pobox.com>:\n>\n>>\n>>        git clone --vcs=mediawiki http://some.where.xz/wiki/\n>>        git pull\n>>        git push\n>>\n>\n> Is vcs a standard argument (I can't see it anywhere) or do we have to\n> change something in order to implement it?\n\nI don't know, but anyway, it could be\n\ngit clone mediawiki+http://some.where.xz/wiki\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"168499","messageId":"BANLkTikO9+Rsmdk+V4E9nnOAFeqqhtsBsQ@mail.gmail.com","threadId":"27426","inReplyTo":"vpqk4dhzsvh.fsf@bauges.imag.fr","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Jérémie NIKAES","fromEmail":"jeremie.nikaes@gmail.com","sentAt":"2011-05-23T13:48:40Z","receivedAt":"2011-05-23T13:48:40Z","isPatch":false,"sender":{"key":"jeremie.nikaes@gmail.com","avatar":null},"body":"Hi, we are in a little bit of trouble trying to understand how remote\nhelpers work and thus how to create our own.\nTrying to understand this, we created a git that we access through\nhttp on a local server on which we push files with\n\ngit remote-http http://login@localip/git\npush +master:master\n\nThe problem is we don't really understand which files are involved\nwith remote helpers.\nWe have perl scripts helping us to fetch and push files from mediawiki\nand we don't know how to implement them as a remote helper. Does\nanyone have some information regarding this ?\n\nThanks,\nRegards\n\n--\nJérémie Nikaes\nSecond year student at Ensimag\n"},{"id":"168500","messageId":"7vd3j9wll0.fsf@alter.siamese.dyndns.org","threadId":"27426","inReplyTo":"vpqk4dhzsvh.fsf@bauges.imag.fr","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-23T14:14:19Z","receivedAt":"2011-05-23T14:14:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n>>>        git clone --vcs=mediawiki http://some.where.xz/wiki/\n>...\n>> Is vcs a standard argument (I can't see it anywhere) or do we have to\n>> change something in order to implement it?\n>\n> I don't know, but anyway, it could be\n>\n> git clone mediawiki+http://some.where.xz/wiki\n\nI know it doesn't ;-)\n\nAs \"clone\" is a moral equivalent of \"init\" possibly followed by some\nauto-configuration followed by \"fetch\" and \"checkout\", it is a natural\nconsequence of already supporting the \"remove.<name>.vcs\" configuration\nvariable, and if we want to avoid the insane svn+http:// syntax, it is a\nlogical thing to add such support.\n"},{"id":"168504","messageId":"BANLkTikax2T3BFs_wac-W8tWeiZ=YHsxvg@mail.gmail.com","threadId":"27426","inReplyTo":"7vd3j9wll0.fsf@alter.siamese.dyndns.org","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2011-05-23T15:54:13Z","receivedAt":"2011-05-23T15:54:13Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Mon, May 23, 2011 at 07:14, Junio C Hamano <gitster@pobox.com> wrote:\n> I know it doesn't ;-)\n>\n> As \"clone\" is a moral equivalent of \"init\" possibly followed by some\n> auto-configuration followed by \"fetch\" and \"checkout\", it is a natural\n> consequence of already supporting the \"remove.<name>.vcs\" configuration\n> variable, and if we want to avoid the insane svn+http:// syntax, it is a\n> logical thing to add such support.\n\nWe currently support either:\n\ngit clone mediawiki::http://some.where.xz/wiki\n\nOr say:\n\ngit clone svn://example.com/some/svn/repo\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"168508","messageId":"7v4o4lwe6r.fsf@alter.siamese.dyndns.org","threadId":"27426","inReplyTo":"BANLkTikax2T3BFs_wac-W8tWeiZ=YHsxvg@mail.gmail.com","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-23T16:54:04Z","receivedAt":"2011-05-23T16:54:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sverre Rabbelier <srabbelier@gmail.com> writes:\n\n> We currently support either:\n>\n> git clone mediawiki::http://some.where.xz/wiki\n\nOk, I forgot that we settled on that double-colon prefix.\n\nThanks for fact-checking.\n"},{"id":"168758","messageId":"BANLkTinFnv+dgYXwJkbO5bvp7WhvpCAwQg@mail.gmail.com","threadId":"27426","inReplyTo":"7v4o4lwe6r.fsf@alter.siamese.dyndns.org","subject":"Re: Gate between git and mediawiki : remote-helpers","fromName":"Jérémie NIKAES","fromEmail":"jeremie.nikaes@gmail.com","sentAt":"2011-05-26T10:16:16Z","receivedAt":"2011-05-26T10:16:16Z","isPatch":false,"sender":{"key":"jeremie.nikaes@gmail.com","avatar":null},"body":"Thank you for the advice regarding the project. Here is its status :\n\n- We decided with your advice to use remote helpers, using the syntax\nmediawiki::http://url.com (thanks to Sverre Rabbelier & Junio Hamano)\n- We created a github at the following url\nhttps://github.com/Bibzball/Git-Mediawiki\nOn it you will find\n\t* Our source code featuring\n\t\t- A start of a remote helper. The functions currently supported are\ndescribed on the wiki\n\t\t- The import part, for which we would like to thank Jeff King for\nhis initial perl code that we used and altered to realize the import\nfunction of the remote helper\n\t\t- The export part is for now only a quick application of the\nmediawiki API to export a file\n\t* A wiki with the basic documentation on our project\nFeel free to consult it and give comments / ask questions\n\nIn order to maintain coherence between revisions (mediawiki) and\ncommits (git), we have to store metadata somewhere. Since we want to\nkeep transparency on the mediawiki's side, we want this data to be\nstored in git. Git notes seem to be a good answer here. They could\ncontain the revision numbers that correspond to the commited files.\nAlso, a commit with t files on git should be t revisions on mediawiki.\n\nWe identified a few issues :\n* Conflicts :\n\t- A git user wants to push files\n\t- He is allowed to do so : no new revisions were made on mediawiki\n\t- The git user starts to push the files one by one, using the mediawiki API\n\t- A mediawiki user edits one of the files queued up in the for-push\nlist and saves his modifications\n\t-> The git user should be interrupted in his process. If not, the\nchanges of the mediawiki user will be overridden.\n \tWe still don't have a solution for this problem. Our guess is that\nwe should send each file in 2 steps.\na) get the timestamp of the last revision of this file from mediawiki\nb) send the file, if allowed to, based on this timestamp\n\n* A tree from mediawiki is necessarily linear. The tree from git can\nhave multiple branches. Let's have this example :\n\t- The mediawiki has been cloned on our side\n\t- We made changes and committed them\n\t- We want to pull changes from the mediawiki\n2 solutions from here :\n\ta) Pull including merge\n\t\tPros : The tree is saved on our side. If someone wants to clone our\nrepository, he will keep this structure.\n\t\tCons : Because of mediawiki's trees linearity, keeping branches on\nour side forces us to pull again right after the push in order to\nmaintain coherance between mediawiki revisions and git commits.\n\n\tb) Pull -- rebase\n\t\tPros : We are very close to mediawiki's structure, facilitating\nsynchronisation.\n\t\tCons : Forbids other git users to clone my repository since some of\nmy branches might die after a rebase. This, in our opinion, kind of\ngoes against some of git's principles.\n\nTo you, which solution do you prefer ? Do you see any alternative ?\n\n* We would like to have the alternative to clone only partially the\nmediawiki (for example, only a few pages). Let's illustrate this one :\n\t- A user clones pages a, b and c\n\t- Later on, he wants to add another page d to his clone list\n\t-> The entire history/tree has to be remade as commits have to be\ninserted in between others\n\nThank you for your support on this project. If any information\nreported was not clear enough, feel free to ask questions. Any\ncontribution / suggestion is welcome.\n\nRegards,\nThe Git-Mediawiki team, Arnaud Lacurie, David Amouyal, Claire Fousse &\nJeremie Nikaes.\n"}]}