Re: [PATCH v4 3/7] remote-mediawiki: show known namespace choices on failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-11-07 10:45:27, Thomas Adam wrote:
> On Mon, Nov 06, 2017 at 04:19:49PM -0500, Antoine Beaupré wrote:
>> If we fail to find a requested namespace, we should tell the user
>> which ones we know about, since those were already fetched. This
>> allows users to fetch all namespaces by specifying a dummy namespace,
>> failing, then copying the list of namespaces in the config.
>> 
>> Eventually, we should have a flag that allows fetching all namespaces
>> automatically.
>> 
>> Reviewed-by: Antoine Beaupré <anarcat@xxxxxxxxxx>
>> Signed-off-by: Antoine Beaupré <anarcat@xxxxxxxxxx>
>> ---
>>  contrib/mw-to-git/git-remote-mediawiki.perl | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
>> index a1d783789..6364d4e91 100755
>> --- a/contrib/mw-to-git/git-remote-mediawiki.perl
>> +++ b/contrib/mw-to-git/git-remote-mediawiki.perl
>> @@ -1334,7 +1334,8 @@ sub get_mw_namespace_id {
>>  	my $id;
>>  
>>  	if (!defined $ns) {
>> -		print {*STDERR} "No such namespace ${name} on MediaWiki.\n";
>> +		my @namespaces = map { s/ /_/g; $_; } sort keys %namespaces_id;
>
> Oops.  This was my typo from my original suggestion.  The hash is
> '%namespace_id', not '%namespaces_id'.  However, how did this slip through
> testing?  I'm assuming you blindly copied this from my example, which although
> quick to do, is only being caught because of my sharp eyes...

I must admit I did not test that at all. Honestly, I'm just trying to
finalize this so we can move to GitHub and I can move on other
things. :)

I rerolled with your fix.

A.
-- 
If builders built houses the way programmers built programs,
The first woodpecker to come along would destroy civilization.
                        - Gerald Weinberg



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux