git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: benoit.person@ensimag.fr
Cc: git@vger.kernel.org, Celestin Matte <celestin.matte@ensimag.fr>
Subject: Re: [PATCH V3 4/4] git-mw: Add preview subcommand into git mw.
Date: Sun, 16 Jun 2013 22:39:50 +0200	[thread overview]
Message-ID: <vpqr4g1eqnd.fsf@anie.imag.fr> (raw)
In-Reply-To: <1371349893-7789-5-git-send-email-benoit.person@ensimag.fr> (benoit person's message of "Sun, 16 Jun 2013 04:31:33 +0200")

[ Just a quick look, no time for a detailed review ]

benoit.person@ensimag.fr writes:

> From: Benoit Person <benoit.person@ensimag.fr>
>
> Add the subcommand to 'git-mw.perl'.

That's already said in the Subject field.

> Add a new constant in GitMediawiki.pm 'HTTP_CODE_PAGE_NOT_FOUND'.

And this brings zero information compared to

> --- a/contrib/mw-to-git/GitMediawiki.pm
> +++ b/contrib/mw-to-git/GitMediawiki.pm
> -				EMPTY HTTP_CODE_OK);
> +				EMPTY HTTP_CODE_OK HTTP_CODE_PAGE_NOT_FOUND);

I'd say your commit messages looks like a GNU-style changelog entry,
which I do not consider a compliment ;-).

Still, after removing rendundant information, you may notice that the
reader has no idea what "preview" is or does, and *why* it is a good
thing to have it. How about:

"
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
rendered. Add a new "git mw preview" command that allows rendering the
markup text on the remote wiki without actually doing any change on the
wiki.

This uses MediaWiki's API to render the markup, and inserts the result
in an actual HTML page from the wiki so that CSS be rendered properly.
"

?

(The first paragraph answers "*why* did you do this?" and the second
"*why* did you do it this way?")

(did I put enough emphasis on the "why"? ;-) )

> +	# file_name argumeent is mandatory

argumeent -> argument

> +	if (!defined $file_name) {
> +		die "File not set, see `git mw help` \n";

Perhaps "missing file argument"?

> +		# Search all possibles mediawiki remotes
> +		if (! $remote_url) {

The "why" thing about commit message also applies to comments: when you
start saying what you're doing in a comment, it usually means your code
should be refactored.

Wouldn't it better to add a function here? The name of the function
would probably carry the same information as the comment.

> +				print {*STDERR} "do you want ? Use the -r option to specify the remote\n";

Missing period (.).

> +	}) or die "No response from distant mediawiki\n";

distant -> remote.

> +	$template_content_id = Git::config('mediawiki.IDContent')
> +		|| $template_content_id;

It would be cool to have also remote.<name>.IDContent or something like
this in case you have several remotes with different div ids. But this
can be added later.

> @@ -41,6 +341,7 @@ usage: git mw <command> <args>
>  
>  git mw commands are:
>      help        Display help information about git mw
> +    preview 	Parse and render local file into HTML

Space/tab mix after preview.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2013-06-16 20:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-16  2:31 [PATCH V3 0/4] git-remote-mediawiki: new tool to preview local changes without pushing benoit.person
2013-06-16  2:31 ` [PATCH V3 1/4] git-mw: Introduction of GitMediawiki.pm benoit.person
2013-06-16 20:18   ` Matthieu Moy
2013-06-16 23:41     ` Benoît Person
2013-06-17  7:12       ` Matthieu Moy
2013-06-18  9:06         ` Benoît Person
2013-06-18 10:10           ` Matthieu Moy
2013-06-18 10:54           ` Matthieu Moy
2013-06-16  2:31 ` [PATCH V3 2/4] git-mw: Move some functions from git-remote-mediawiki.perl to GitMediawiki.pm benoit.person
2013-06-16  2:31 ` [PATCH V3 3/4] git-mw: Adding git-mw command benoit.person
2013-06-16  2:31 ` [PATCH V3 4/4] git-mw: Add preview subcommand into git mw benoit.person
2013-06-16 20:39   ` Matthieu Moy [this message]
2013-06-16  9:00 ` [PATCH V3 0/4] git-remote-mediawiki: new tool to preview local changes without pushing Ramkumar Ramachandra

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=vpqr4g1eqnd.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=benoit.person@ensimag.fr \
    --cc=celestin.matte@ensimag.fr \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).