git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jérémie NIKAES" <jeremie.nikaes@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Cc: Sverre Rabbelier <srabbelier@gmail.com>,
	Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Arnaud Lacurie <arnaud.lacurie@gmail.com>,
	Claire Fousse <claire.fousse@gmail.com>,
	Sylvain Boulme <Sylvain.Boulme@imag.fr>
Subject: Re: Gate between git and mediawiki : remote-helpers
Date: Thu, 26 May 2011 12:16:16 +0200	[thread overview]
Message-ID: <BANLkTinFnv+dgYXwJkbO5bvp7WhvpCAwQg@mail.gmail.com> (raw)
In-Reply-To: <7v4o4lwe6r.fsf@alter.siamese.dyndns.org>

Thank you for the advice regarding the project. Here is its status :

- We decided with your advice to use remote helpers, using the syntax
mediawiki::http://url.com (thanks to Sverre Rabbelier & Junio Hamano)
- We created a github at the following url
https://github.com/Bibzball/Git-Mediawiki
On it you will find
	* Our source code featuring
		- A start of a remote helper. The functions currently supported are
described on the wiki
		- The import part, for which we would like to thank Jeff King for
his initial perl code that we used and altered to realize the import
function of the remote helper
		- The export part is for now only a quick application of the
mediawiki API to export a file
	* A wiki with the basic documentation on our project
Feel free to consult it and give comments / ask questions

In order to maintain coherence between revisions (mediawiki) and
commits (git), we have to store metadata somewhere. Since we want to
keep transparency on the mediawiki's side, we want this data to be
stored in git. Git notes seem to be a good answer here. They could
contain the revision numbers that correspond to the commited files.
Also, a commit with t files on git should be t revisions on mediawiki.

We identified a few issues :
* Conflicts :
	- A git user wants to push files
	- He is allowed to do so : no new revisions were made on mediawiki
	- The git user starts to push the files one by one, using the mediawiki API
	- A mediawiki user edits one of the files queued up in the for-push
list and saves his modifications
	-> The git user should be interrupted in his process. If not, the
changes of the mediawiki user will be overridden.
 	We still don't have a solution for this problem. Our guess is that
we should send each file in 2 steps.
a) get the timestamp of the last revision of this file from mediawiki
b) send the file, if allowed to, based on this timestamp

* A tree from mediawiki is necessarily linear. The tree from git can
have multiple branches. Let's have this example :
	- The mediawiki has been cloned on our side
	- We made changes and committed them
	- We want to pull changes from the mediawiki
2 solutions from here :
	a) Pull including merge
		Pros : The tree is saved on our side. If someone wants to clone our
repository, he will keep this structure.
		Cons : Because of mediawiki's trees linearity, keeping branches on
our side forces us to pull again right after the push in order to
maintain coherance between mediawiki revisions and git commits.

	b) Pull -- rebase
		Pros : We are very close to mediawiki's structure, facilitating
synchronisation.
		Cons : Forbids other git users to clone my repository since some of
my branches might die after a rebase. This, in our opinion, kind of
goes against some of git's principles.

To you, which solution do you prefer ? Do you see any alternative ?

* We would like to have the alternative to clone only partially the
mediawiki (for example, only a few pages). Let's illustrate this one :
	- A user clones pages a, b and c
	- Later on, he wants to add another page d to his clone list
	-> The entire history/tree has to be remade as commits have to be
inserted in between others

Thank you for your support on this project. If any information
reported was not clear enough, feel free to ask questions. Any
contribution / suggestion is welcome.

Regards,
The Git-Mediawiki team, Arnaud Lacurie, David Amouyal, Claire Fousse &
Jeremie Nikaes.

      reply	other threads:[~2011-05-26 10:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-22 15:50 Gate between git and mediawiki : remote-helpers Claire Fousse
2011-05-22 17:58 ` Arnaud Lacurie
2011-05-22 19:31   ` Junio C Hamano
2011-05-23  8:31     ` Arnaud Lacurie
2011-05-23  9:08       ` Matthieu Moy
2011-05-23 13:48         ` Jérémie NIKAES
2011-05-23 14:14         ` Junio C Hamano
2011-05-23 15:54           ` Sverre Rabbelier
2011-05-23 16:54             ` Junio C Hamano
2011-05-26 10:16               ` Jérémie NIKAES [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTinFnv+dgYXwJkbO5bvp7WhvpCAwQg@mail.gmail.com \
    --to=jeremie.nikaes@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=Sylvain.Boulme@imag.fr \
    --cc=arnaud.lacurie@gmail.com \
    --cc=claire.fousse@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).