Subject: Re: [PATCH 2/3] Test environment of git-remote-mw

From: "Simon.Cathebras" <[email-masked]>
Date: Mon, 04 Jun 2012 16:13:00 +0200

On 02/06/2012 12:47, Matthieu Moy wrote:
> "Simon.Cathebras"<[email-masked]>  writes:
>
>>>> +wiki_getpage () {
>>>> +	../test-gitmw.pl get_page -p "$1" "$2"
>>>> +}
>>> Any reason why test-gitmw.pl and wiki_getpage have this slightly
>>> different API? The perl version has a "-p" flag, and the shell command
>>> has only positionnal arguments.
>> The "-p" flag exists to specify if we have to use the admin login on
>> wiki to do the command.
> (then, maybe --admin would be a better name?)
>
I am ok with this... It would be more understandable.
>> For instance, here we fetch a page from the wiki with Admin privilege.
>> Others arguments remains the same.
> What I don't understand is why you need the flexibility to choose
> between admin and non-admin on the Perl side, and you don't need in on
> the shell side.
>
On one hand, we need to be authentificated as an admin to do some wiki's
operations, like deleting a page for instance. It is needed by the Perl.
On the other hand, we don't need it on the shell side because we believe
that we don't have to bother the user with some authentification
consideration.
I mean, if I intend to delete the page <foo> from wiki, it is easier to
call 'wiki_delete_page foo', than  'wiki_delete_page --user=thingumy
--pass=blahblah foo'.
Does it make sense ? If not, what do you think we should do ?

Simon

-- 
CATHEBRAS Simon

2A-ENSIMAG

Filière Ingéniérie des Systèmes d'Information
Membre Bug-Buster