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

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

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 20, 2013, 08:53 UTC
Message-ID
<vpqip19duxn.fsf@anie.imag.fr>
In-Reply-To
<1371712593-6210-6-git-send-email-benoit.person@ensimag.fr>
benoit.person@ensimag.fr writes:
> +# @TODO : add documentation for verbose option
I guess that's not applicable anymore.
> +distant mediawiki and combined with a template retrieved from the mediawiki.
s/distant/remote/
Show 8 quoted lines
> +sub preview {
> +	my $wiki;
> +	my ($remote_url, $wiki_page_name);
> +	my ($new_content, $template);
> +	my $file_content;
> +
> +	if ($file_name eq EMPTY) {
> +		die "Missing file argument, see `git mw help` \n";
Unneeded space before \n.
Show 5 quoted lines
> +	for (@{ $html_tree->extract_links() }) {
> +		my ($link, $element, $attr) = @{ $_ };
> +		my $url = url($link)->canonical;
> +		$element->attr($attr, URI->new_abs($url, $remote_url));
> +	}

Extracting this into a function like "make_links_absolute" would have made it clearer.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: benoit.person@ensimag.frNext: Matthieu Moy
Message 9 of 12 in “git-remote-mediawiki: new tool to preview local changes without pushing”
  1. 0/5 git-remote-mediawiki: new tool to preview local changes without pushingbenoit.person@ensimag.fr, Jun 20, 2013
  2. 1/5 git-remote-mediawiki: Introduction of Git::Mediawiki.pmbenoit.person@ensimag.fr, Jun 20, 2013
  3. Matthieu MoyJun 20, 2013
  4. 2/5 git-remote-mediawiki: new git bin-wrapper for developementbenoit.person@ensimag.fr, Jun 20, 2013
  5. Matthieu MoyJun 20, 2013
  6. 3/5 git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawikibenoit.person@ensimag.fr, Jun 20, 2013
  7. 4/5 git-remote-mediawiki: Adding git-mw commandbenoit.person@ensimag.fr, Jun 20, 2013
  8. 5/5 git-remote-mediawiki: Add preview subcommand into git mw.benoit.person@ensimag.fr, Jun 20, 2013
  9. Matthieu MoyJun 20, 2013
  10. Matthieu MoyJun 20, 2013
  11. Matthieu MoyJun 20, 2013
  12. Benoît PersonJun 20, 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.