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

Re: [PATCHv2 1/2] git-remote-mediawiki: import "File:" attachments

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 11, 2012, 20:38 UTC
Message-ID
<vpq7gvd1t4j.fsf@bauges.imag.fr>
In-Reply-To
<1339442945-8561-1-git-send-email-Pavel.Volek@ensimag.imag.fr>
Pavel Volek <Pavel.Volek@ensimag.imag.fr> writes:
> +		# Get pages of related media files.
> +		if ($import_media) {
> +			get_mw_pages_for_linked_mediafiles(\@tracked_pages, \%pages);
> +		}
The comment is useless given the function name.
> +# Returns MediaWiki id for a canonical namespace name.
> +# Ex.: "File", "Project".
> +# Looks for the namespace id in the local configuration
> +# variables, if it is not found asks MW API.

Functions are usually specified in imperative form, hence "Return", not "Returns" for example.

> +	my $file = $mediawiki->download( { title => $filename } );
I'd call that $file_content, to avoid confusion with the file name.

Other than that, the patch looks good (but I didn't review very carefully).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Simon Perrat
Message 7 of 7 in “[PATCHv2 1/2] git-remote-mediawiki: import "File:" attachments”
  1. Pavel VolekJun 11, 2012
  2. 2/2 git-remote-mediawiki: refactoring get_mw_pages functionPavel Volek, Jun 11, 2012
  3. Simon PerratJun 12, 2012
  4. konglu@minatec.inpg.frJun 12, 2012
  5. Matthieu MoyJun 12, 2012
  6. Simon PerratJun 12, 2012
  7. Matthieu MoyJun 11, 2012

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.