|
82 | 82 | # - by_rev: perform one query per new revision on the remote wiki
|
83 | 83 | # - by_page: query each tracked page for new revision
|
84 | 84 | my $fetch_strategy = run_git("config --get remote.${remotename}.fetchStrategy");
|
85 |
| -unless ($fetch_strategy) { |
| 85 | +if (!$fetch_strategy) { |
86 | 86 | $fetch_strategy = run_git('config --get mediawiki.fetchStrategy');
|
87 | 87 | }
|
88 | 88 | chomp($fetch_strategy);
|
89 |
| -unless ($fetch_strategy) { |
| 89 | +if (!$fetch_strategy) { |
90 | 90 | $fetch_strategy = 'by_page';
|
91 | 91 | }
|
92 | 92 |
|
|
108 | 108 | # deterministic, this means everybody gets the same sha1 for each
|
109 | 109 | # MediaWiki revision.
|
110 | 110 | my $dumb_push = run_git("config --get --bool remote.${remotename}.dumbPush");
|
111 |
| -unless ($dumb_push) { |
| 111 | +if (!$dumb_push) { |
112 | 112 | $dumb_push = run_git('config --get --bool mediawiki.dumbPush');
|
113 | 113 | }
|
114 | 114 | chomp($dumb_push);
|
@@ -667,7 +667,7 @@ sub fetch_mw_revisions_for_page {
|
667 | 667 | push(@page_revs, $page_rev_ids);
|
668 | 668 | $revnum++;
|
669 | 669 | }
|
670 |
| - last unless $result->{'query-continue'}; |
| 670 | + last if (!$result->{'query-continue'}); |
671 | 671 | $query->{rvstartid} = $result->{'query-continue'}->{revisions}->{rvstartid};
|
672 | 672 | }
|
673 | 673 | if ($shallow_import && @page_revs) {
|
@@ -1239,7 +1239,7 @@ sub mw_push_revision {
|
1239 | 1239 | die("Unknown error from mw_push_file()\n");
|
1240 | 1240 | }
|
1241 | 1241 | }
|
1242 |
| - unless ($dumb_push) { |
| 1242 | + if (!$dumb_push) { |
1243 | 1243 | run_git(qq(notes --ref=${remotename}/mediawiki add -f -m "mediawiki_revision: ${mw_revision}" ${sha1_commit}));
|
1244 | 1244 | run_git(qq(update-ref -m "Git-MediaWiki push" refs/mediawiki/${remotename}/master ${sha1_commit} ${sha1_child}));
|
1245 | 1245 | }
|
@@ -1320,7 +1320,7 @@ sub get_mw_namespace_id {
|
1320 | 1320 | my $ns = $namespace_id{$name};
|
1321 | 1321 | my $id;
|
1322 | 1322 |
|
1323 |
| - unless (defined $ns) { |
| 1323 | + if (!defined $ns) { |
1324 | 1324 | print {*STDERR} "No such namespace ${name} on MediaWiki.\n";
|
1325 | 1325 | $ns = {is_namespace => 0};
|
1326 | 1326 | $namespace_id{$name} = $ns;
|
|
0 commit comments