git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Sep 22, 2013, 19:27 UTC
Message-ID
<vpqsiwwejxz.fsf@anie.imag.fr>
In-Reply-To
<1379875468-24952-1-git-send-email-benoit.person@gmail.fr>
Benoit Person <benoit.person@gmail.com> writes:
Show 5 quoted lines
> 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.

That would be nice to explain a bit more here. Where did the infinite loop come from? How does your patch fix it?

> For now, if the tests suite is run without the fix, the new test
> introduces an infinite loop. I am not sure if this should be handled ?
> (a timeout of some kind maybe ?)

If the patch fix this, then it's not a really big problem. The test failure is an infinite loop. That would be problematic if ran non-interactively, but I think it's Ok since we only run the testsuite manually.

Show 10 quoted lines
> diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
> index c9a4805..2d7af57 100755
> --- a/contrib/mw-to-git/git-remote-mediawiki.perl
> +++ b/contrib/mw-to-git/git-remote-mediawiki.perl
> @@ -625,6 +625,9 @@ sub fetch_mw_revisions_for_page {
>  		rvstartid => $fetch_from,
>  		rvlimit => 500,
>  		pageids => $id,
> +
> +                # let the mediawiki knows that we support the latest API
s/knows/know/
> +                continue => '',
Indentation with spaces. Please, use tabs.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Benoit PersonNext: Jonathan Nieder
Message 2 of 3 in “git-remote-mediawiki: bugfix for pages w/ >500 revisions”
  1. git-remote-mediawiki: bugfix for pages w/ >500 revisionsBenoit Person, Sep 22, 2013
  2. Matthieu MoySep 22, 2013
  3. Jonathan NiederSep 23, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.