From: Junio C Hamano Date: Fri, 13 Jul 2012 22:36:53 +0000 (-0700) Subject: Merge branch 'mm/mediawiki-file-attachments' X-Git-Tag: v1.7.12-rc0~42 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2763aa2ba33e50905a0a2d1232c1d74685608faa;p=git.git Merge branch 'mm/mediawiki-file-attachments' "mediawiki" remote helper (in contrib/) learned to handle file attachments. * mm/mediawiki-file-attachments: git-remote-mediawiki: improve support for non-English Wikis git-remote-mediawiki: import "File:" attachments git-remote-mediawiki: split get_mw_pages into smaller functions git-remote-mediawiki: send "File:" attachments to a remote wiki git-remote-mediawiki: don't "use encoding 'utf8';" git-remote-mediawiki: don't compute the diff when getting commit message --- 2763aa2ba33e50905a0a2d1232c1d74685608faa diff --cc contrib/mw-to-git/git-remote-mediawiki index c07b4f0ee,063a978a6..6b128e88e --- a/contrib/mw-to-git/git-remote-mediawiki +++ b/contrib/mw-to-git/git-remote-mediawiki @@@ -70,8 -69,15 +66,13 @@@ chomp(@tracked_pages) my @tracked_categories = split(/[ \n]/, run_git("config --get-all remote.". $remotename .".categories")); chomp(@tracked_categories); + # Import media files too. + my $import_media = run_git("config --get --bool remote.". $remotename .".mediaimport"); + chomp($import_media); + $import_media = ($import_media eq "true"); + my $wiki_login = run_git("config --get remote.". $remotename .".mwLogin"); -# TODO: ideally, this should be able to read from keyboard, but we're -# inside a remote helper, so our stdin is connect to git, not to a -# terminal. +# Note: mwPassword is discourraged. Use the credential system instead. my $wiki_passwd = run_git("config --get remote.". $remotename .".mwPassword"); my $wiki_domain = run_git("config --get remote.". $remotename .".mwDomain"); chomp($wiki_login);