[PATCH v3] git-remote-mediawiki: bugfix for pages w/ >500 revisions

2013-09-24 Thread Benoit Person
t, we quit assuming it's not a continuing query. Signed-off-by: Benoit Person Reported-by: Benjamin Cathey --- contrib/mw-to-git/git-remote-mediawiki.perl | 14 -- contrib/mw-to-git/t/t9365-continuing-queries.sh | 23 +++ 2 files changed, 35 insertions(+),

Re: [PATCH v2] git-remote-mediawiki: bugfix for pages w/ >500 revisions

2013-09-24 Thread Benoit Person
x27;s intended is that it's more a debug information to see how it's going on (creating >500 revs is *quite* long). If I understand it correctly, using '&&' would mean that the return value of the echo statement will be tested for success ? Anyway, I am not sure it m

[PATCH v2] git-remote-mediawiki: bugfix for pages w/ >500 revisions

2013-09-23 Thread Benoit Person
t, we quit assuming it's not a continuing query. Signed-off-by: Benoit Person Reported-by: Benjamin Cathey --- contrib/mw-to-git/git-remote-mediawiki.perl | 14 -- contrib/mw-to-git/t/t9365-continuing-queries.sh | 24 2 files changed, 36 insertions(+),

[PATCH] git-remote-mediawiki: bugfix for pages w/ >500 revisions

2013-09-22 Thread Benoit Person
Mediawiki introduced a new API for queries w/ more than 500 results in version 1.21. That change triggered an infinite loop while cloning a mediawiki with such a page. Fix that while still preserving the old behavior for old APIs. Signed-off-by: Benoit Person Reported-by: Benjamin Cathey

[PATCH v8 5/7] git-remote-mediawiki: Factoring code between git-remote-mediawiki and Git::Mediawiki

2013-07-04 Thread benoit . person
From: Benoit Person For now, Git::Mediawiki contains nothing. This first patch moves some of git-remote-mediawiki.perl's factorisable code into Git::Mediawiki. In the same time, it removes the side effects of that code and renames the fucntions and constants moved to expose a bette

[PATCH v8 7/7] git-remote-mediawiki: Add preview subcommand into git mw

2013-07-04 Thread benoit . person
From: Benoit Person In the current state, a user of git-remote-mediawiki can edit the markup text locally, but has to push to the remote wiki to see how the page is rendererd. Add a new 'git mw preview' command that allows rendering the markup text on the remote wiki without actually p

[PATCH v8 4/7] git-remote-mediawiki: Update tests to run with the new bin-wrapper

2013-07-04 Thread benoit . person
From: Benoit Person Until now, if git-remote-mediawiki was not installed, the test suite copied it to the toplevel directory. This solution pollutes the directory with untracked files. Plus, we would need to copy the new git-mw.perl file to test it too. Signed-off-by: Benoit Person Signed-off

[PATCH v8 1/7] git-remote-mediawiki: Introduction of Git::Mediawiki.pm

2013-07-04 Thread benoit . person
From: Benoit Person We would want to allow the user to preview what he has edited locally before pushing it out (and thus creating a non-removable revision in the mediawiki's history). This patch introduces a new perl package in which we will be able to share code between that new tool an

[PATCH v8 6/7] git-remote-mediawiki: Adding git-mw command

2013-07-04 Thread benoit . person
From: Benoit Person For now, git-remote-mediawiki is only a remote-helper. This patch adds a new toolset script in which we will be able to build new tools for git-remote-mediawiki. This toolset uses a subcommand-mechanism to launch the proper action. For now only the 'help' sub

[PATCH v8 3/7] git-remote-mediawiki: New git bin-wrapper for developement

2013-07-04 Thread benoit . person
From: Benoit Person The introduction of the Git::Mediawiki package makes it impossible to test, without installation, git-remote-mediawiki and git-mw. Using a git bin-wrapper enables us to define proper $GITPERLLIB to force the use of the developement version of the Git::Mediawiki package

[PATCH v8 0/7] git-remote-mediawiki: new tool to preview local changes without pushing

2013-07-04 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. changes from v7: - Update commit message of 1/7: remove the obvious (we need a way to share code between scripts) and mak

[PATCH v8 2/7] wrap-for-bin: Make bin-wrappers chainable

2013-07-04 Thread benoit . person
From: Benoit Person For now, bin-wrappers overwrites GITPERLLIB. If we want to chain to those scripts and define GITPERLLIB before, our changes will be discarded. This patch makes the bin-wrappers prepend their modifications to GITPERLLIB rather than redefining it. It also unset GITPERLLIB in

[PATCH v7 1/7] git-remote-mediawiki: Introduction of Git::Mediawiki.pm

2013-07-02 Thread benoit . person
From: Benoit Person Currently, the mw-to-git project contains only a remote helper (git-remote-mediawiki.perl). To improve the user experience while working with mediawiki remotes, new tools, designed for such cases, should be created. To achieve this goal, the project needs a way to share code

[PATCH v7 0/7] git-remote-mediawiki: new tool to preview local changes without pushing

2013-07-02 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. changes from v6: - Rewrite of bin-wrapper/git in 3/7 - Update wrap-for-bin.sh and make bin-wrappers chainable it remove

[PATCH v7 2/7] wrap-for-bin: Make bin-wrappers chainable

2013-07-02 Thread benoit . person
From: Benoit Person For now, bin-wrappers (based on wrap-for-bin.sh) redefine some environnement variables (like $GITPERLLIB). If we want to chain to those scripts and define one of those variables before, our changes will be overwritten. This patch simply makes the bin-wrappers prepend their

[PATCH v7 4/7] git-remote-mediawiki: Update tests to run with the new bin-wrapper

2013-07-02 Thread benoit . person
From: Benoit Person Until now, if git-remote-mediawiki was not installed, the test suite copied it to the toplevel directory. This solution pollutes the directory with untracked files. Plus, we would need to copy the new git-mw.perl file to test it too. Signed-off-by: Benoit Person Signed-off

[PATCH v7 3/7] git-remote-mediawiki: New git bin-wrapper for developement

2013-07-02 Thread benoit . person
From: Benoit Person The introduction of the Git::Mediawiki package makes it impossible to test, without installation, git-remote-mediawiki and git-mw. Using a git bin-wrapper enables us to define proper $GITPERLLIB to force the use of the developement version of the Git::Mediawiki package

[PATCH v7 6/7] git-remote-mediawiki: Adding git-mw command

2013-07-02 Thread benoit . person
From: Benoit Person For now, git-remote-mediawiki is only a remote-helper. This patch adds a new toolset script in which we will be able to build new tools for git-remote-mediawiki. This toolset uses a subcommand-mechanism to launch the proper action. For now only the 'help' sub

[PATCH v7 7/7] git-remote-mediawiki: Add preview subcommand into git mw

2013-07-02 Thread benoit . person
From: Benoit Person In the current state, a user of git-remote-mediawiki can edit the markup text locally, but has to push to the remote wiki to see how the page is rendererd. Add a new 'git mw preview' command that allows rendering the markup text on the remote wiki without actually p

[PATCH v7 5/7] git-remote-mediawiki: Factoring code between git-remote-mediawiki and Git::Mediawiki

2013-07-02 Thread benoit . person
From: Benoit Person For now, Git::Mediawiki contains nothing. This first patch moves some of git-remote-mediawiki.perl's factorisable code into Git::Mediawiki. In the same time, it removes the side effects of that code and renames the fucntions and constants moved to expose a bette

[PATCH v6 0/5] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-27 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. changes from v5: - Move git bin-wrapper 'git' into bin-wrapper/ - Updates its GIT_ROOT_DIR accordingly - Updates

[PATCH v6 5/5] git-remote-mediawiki: Add preview subcommand into git mw.

2013-06-27 Thread benoit . person
From: Benoit Person In the current state, a user of git-remote-mediawiki can edit the markup text locally, but has to push to the remote wiki to see how the page is rendererd. Add a new 'git mw preview' command that allows rendering the markup text on the remote wiki without actually p

[PATCH v6 2/5] git-remote-mediawiki: new git bin-wrapper for developement

2013-06-27 Thread benoit . person
From: Benoit Person The introduction of the Git::Mediawiki package makes it impossible to test, without installation, git-remote-mediawiki and git-mw. Using a git bin-wrapper enables us to define proper $GITPERLLIB to force the use of the developement version of the Git::Mediawiki package

[PATCH v6 4/5] git-remote-mediawiki: Adding git-mw command

2013-06-27 Thread benoit . person
From: Benoit Person For now, git-remote-mediawiki is only a remote-helper. This patch adds a new toolset script in which we will be able to build new tools for git-remote-mediawiki. This toolset uses a subcommand-mechanism to launch the proper action. For now only the 'help' sub

[PATCH v6 1/5] git-remote-mediawiki: Introduction of Git::Mediawiki.pm

2013-06-27 Thread benoit . person
From: Benoit Person Currently, the mw-to-git project contains only a remote helper (git-remote-mediawiki.perl). To improve the user experience while working with mediawiki remotes, new tools, designed for such cases, should be created. To achieve this goal, the project needs a way to share code

[PATCH v6 3/5] git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki

2013-06-27 Thread benoit . person
From: Benoit Person For now, Git::Mediawiki contains nothing. This first patch moves some of git-remote-mediawiki.perl's factorisable code into Git::Mediawiki. In the same time, it removes the side effects of that code and renames the fucntions and constants moved to expose a bette

[PATCH v5 1/5] git-remote-mediawiki: Introduction of Git::Mediawiki.pm

2013-06-26 Thread benoit . person
From: Benoit Person Currently, the mw-to-git project contains only a remote helper (git-remote-mediawiki.perl). To improve the user experience while working with mediawiki remotes, new tools, designed for such cases, should be created. To achieve this goal, the project needs a way to share code

[PATCH v5 5/5] git-remote-mediawiki: Add preview subcommand into git mw.

2013-06-26 Thread benoit . person
From: Benoit Person In the current state, a user of git-remote-mediawiki can edit the markup text locally, but has to push to the remote wiki to see how the page is rendererd. Add a new 'git mw preview' command that allows rendering the markup text on the remote wiki without actually p

[PATCH v5 3/5] git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki

2013-06-26 Thread benoit . person
From: Benoit Person For now, Git::Mediawiki contains nothing. This first patch moves some of git-remote-mediawiki.perl's factorisable code into Git::Mediawiki. In the same time, it removes the side effects of that code and renames the fucntions and constants moved to expose a bette

[PATCH v5 4/5] git-remote-mediawiki: Adding git-mw command

2013-06-26 Thread benoit . person
From: Benoit Person For now, git-remote-mediawiki is only a remote-helper. This patch adds a new toolset script in which we will be able to build new tools for git-remote-mediawiki. This toolset uses a subcommand-mechanism to launch the proper action. For now only the 'help' sub

[PATCH v5 0/5] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-26 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. changes from v4: - Rebase on latest master - Typos in commits messages and code - Comments in Makefile - Factorin

[PATCH v5 2/5] git-remote-mediawiki: new git bin-wrapper for developement

2013-06-26 Thread benoit . person
From: Benoit Person The introduction of the Git::Mediawiki package makes it impossible to test, without installation, git-remote-mediawiki and git-mw. Using a git bin-wrapper enables us to define proper $GITPERLLIB to force the use of the developement version of the Git::Mediawiki package

Re: [PATCH/RFC 3/4] git-mw: Adding git-mw.perl script

2013-06-24 Thread Benoit Person
Le 2013-06-24 18:56, Matthieu Moy a écrit : Junio C Hamano writes: Matthieu Moy writes: benoit.per...@ensimag.fr writes: diff --git a/contrib/mw-to-git/git-mw.perl b/contrib/mw-to-git/git-mw.perl new file mode 100644 index 000..a2f0aa1 --- /dev/null +++ b/contrib/mw-to-git/git-mw.per

[PATCH v4 3/5] git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki

2013-06-20 Thread benoit . person
From: Benoit Person For now, Git::Mediawiki contains nothing. This first patch moves some of git-remote-mediawiki.perl's factorisable code into Git::Mediawiki. In the same time, it removes the side effects of that code and renames the fucntions and constants moved to expose a bette

[PATCH v4 4/5] git-remote-mediawiki: Adding git-mw command

2013-06-20 Thread benoit . person
From: Benoit Person For now, git-remote-mediawiki is only a remote-helper. This patch adds a new toolset script in which we will be able to build new tools for git-remote-mediawiki. This toolset uses a subcommand-mechanism to launch the proper action. For now only the 'help' sub

[PATCH v4 2/5] git-remote-mediawiki: new git bin-wrapper for developement

2013-06-20 Thread benoit . person
From: Benoit Person The introduction of the Git::Mediawiki package makes it impossible to test, without installation, git-remote-mediawiki and git-mw. Using a git bin-wrapper enables us to define proper $GITPERLLIB to force the use of the developement version of the Git::Mediawiki package

[PATCH v4 1/5] git-remote-mediawiki: Introduction of Git::Mediawiki.pm

2013-06-20 Thread benoit . person
From: Benoit Person Currently, the mw-to-git project contains only a remote helper (git-remote-mediawiki.perl). To inmprove the user experience while working with mediawiki remotes, new tools, designed for such cases, should be created. To achieve this goal, the project needs a way to share code

[PATCH v4 5/5] git-remote-mediawiki: Add preview subcommand into git mw.

2013-06-20 Thread benoit . person
From: Benoit Person In the current state, a user of git-remote-mediawiki can edit the markup text locally, but has to push to the remote wiki to see how the page is rendererd. Add a new 'git mw preview' command that allows rendering the markup text on the remote wiki without actually p

[PATCH v4 0/5] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-20 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. changes from v3: - Rewrite all commit messages. - No more "\ No newline at end of file". - Rename GitMediaw

[PATCH V3 3/4] git-mw: Adding git-mw command

2013-06-15 Thread benoit . person
From: Benoit Person Add the new git-mw command, with its 'help' subcommand as an example. Argument parsing and subcommand choice is based on git-svn.perl. Update Makefile to build, install and clean both scripts now (git-mw.perl and git-remote-mediawiki.perl). Signed-off-by: Ben

[PATCH V3 2/4] git-mw: Move some functions from git-remote-mediawiki.perl to GitMediawiki.pm

2013-06-15 Thread benoit . person
From: Benoit Person Move and rename subs 'mediawiki_clean_filename' into 'clean_filename', 'mediawiki_smudge_filename' into 'smudge_filename' and 'mw_connect_maybe' into 'connect_maybe' since we have a cleaner namespace in a

[PATCH V3 4/4] git-mw: Add preview subcommand into git mw.

2013-06-15 Thread benoit . person
From: Benoit Person Add the subcommand to 'git-mw.perl'. Add a new constant in GitMediawiki.pm 'HTTP_CODE_PAGE_NOT_FOUND'. Signed-off-by: Benoit Person Signed-off-by: Matthieu Moy --- changes from V2: - Remove the --blob option, distinction between files and blobs i

[PATCH V3 1/4] git-mw: Introduction of GitMediawiki.pm

2013-06-15 Thread benoit . person
From: Benoit Person GitMediawiki.pm enable code factoring between several scripts in mw-to-git. To make it usable in scripts (ie: accessible in @INC) it adds two targets (copy_pm & install_pm) into the Makefile, one for tests and one for installation. Signed-off-by: Benoit Person Signed

[PATCH V3 0/4] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-15 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. changes from V2: - Add a way to test, without installation, code that uses GitMediawiki.pm. - Move more constan

[PATCH V2] git-remote-mediawiki: remove hardcoded version number in the test suite

2013-06-14 Thread benoit . person
From: Benoit Person Updates the code to make it more easy to switch mediawiki version when testing. Before that, the version number was partly hardcoded, partly in a var. Signed-off-by: Benoit Person Signed-off-by: Matthieu Moy --- contrib/mw-to-git/t/test-gitmw-lib.sh | 19

[PATCH] git-remote-mediawiki: remove hardcoded version number in the test suite

2013-06-13 Thread benoit . person
From: Benoit Person Updates the code to make it more easy to switch mediawiki version when testing. Before that, the version number was partly hardcoded, partly in a var. Maybe I should add a warning that the installation procedure may not work in the future ? It seems to work for the range

[PATCH/RFC 4/4] git-mw: Adding preview tool in git-mw.perl

2013-06-13 Thread benoit . person
From: Benoit Person This final commit adds the preview subcommand to git mw. It works as such: 1- Find the remote name of the current branch's upstream and check if it's a mediawiki one. 1b- If it's not found or if it's not a mediawiki one. It will list all the mediawiki re

[PATCH/RFC 3/4] git-mw: Adding git-mw.perl script

2013-06-13 Thread benoit . person
From: Benoit Person This script will be used for all tools and command related to a mediawiki remote. In this commit we introduce the tool, the way it parses argument and subcommands and an example of subcommand: "help". It also updates the Makefile so that the new tool is installe

[PATCH/RFC 1/4] git-mw: Introduction of GitMediawiki.pm

2013-06-13 Thread benoit . person
From: Benoit Person The GitMediawiki.pm goal is to share code betwwen several scripts in Git-Mediawiki (for now, git-mw.perl introduced in this patch serie and git-remote-mediawiki.perl) Signed-off-by: Benoit Person Signed-off-by: Matthieu Moy --- contrib/mw-to-git/GitMediawiki.pm | 24

[PATCH/RFC 2/4] git-mw: Moving some functions from git-remote-mediawiki.perl to GitMediawiki.pm

2013-06-13 Thread benoit . person
From: Benoit Person Moving mediawiki_clean_filename, mediawiki_smudge_filename and mw_connect_maybe Since we have a clean namespace in a perl module, we also rename them into more concise ones (clean_filename, smudge_filename and connect_maybe). It also delete the side effects of

[PATCH/RFC V2 0/4] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-13 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. This serie is a second attempt to achieve it: - It adds a new GitMediawiki.pm package to share code between the new tool

[PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-07 Thread benoit . person
From: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. This commit is a first attempt to achieve it. It adds a new git command, named `git mw`. This command accepts the subcommands

[PATCH] git-remote-mediawiki: use Git.pm functions for credentials

2013-06-05 Thread benoit . person
From: Benoit Person In 52dce6d, a new credential function was added to Git.pm, based on git-remote-mediawiki's functions. The logical follow-up is to use those functions in git-remote-mediawiki. Signed-off-by: Benoit Person Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-r

[PATCH] git-remote-mediawiki: use git.pm functions for credentials

2013-06-04 Thread benoit . person
From: Benoit Person In 52dce6d, a new credential function was added to git.pm, based on git-remote-mediawiki's functions. The logical follow-up is to use those functions in git-remote-mediawiki. Signed-off-by: Benoit Person Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-r