From mboxrd@z Thu Jan 1 00:00:00 1970 From: benoit.person@ensimag.fr Subject: [PATCH v5 0/5] git-remote-mediawiki: new tool to preview local changes without pushing Date: Wed, 26 Jun 2013 21:12:45 +0200 Message-ID: <1372273970-9084-1-git-send-email-benoit.person@ensimag.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Celestin Matte , Matthieu Moy , Junio C Hamano , Benoit Person To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Jun 26 21:13:50 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrvA5-0005jV-Ks for gcvg-git-2@plane.gmane.org; Wed, 26 Jun 2013 21:13:49 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599Ab3FZTNq convert rfc822-to-quoted-printable (ORCPT ); Wed, 26 Jun 2013 15:13:46 -0400 Received: from mx1.imag.fr ([129.88.30.5]:47724 "EHLO shiva.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222Ab3FZTNm (ORCPT ); Wed, 26 Jun 2013 15:13:42 -0400 Received: from ensimag.imag.fr (ensimag.imag.fr [195.221.228.12]) by shiva.imag.fr (8.13.8/8.13.8) with ESMTP id r5QJDNn7004441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Jun 2013 21:13:23 +0200 Received: from ensibm.imag.fr (ensibm.imag.fr [195.221.228.8]) by ensimag.imag.fr (8.13.8/8.13.8/ImagV2.1.r_ens) with ESMTP id r5QJDQKs019159; Wed, 26 Jun 2013 21:13:26 +0200 Received: from localhost.localdomain (ensibm [195.221.228.8]) by ensibm.imag.fr (8.13.8/8.13.8/ImagV2.1.sb_ens.pm) with ESMTP id r5QJDNHt023434; Wed, 26 Jun 2013 21:13:24 +0200 X-Mailer: git-send-email 1.8.3.GIT X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (shiva.imag.fr [129.88.30.5]); Wed, 26 Jun 2013 21:13:24 +0200 (CEST) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: =46rom: Benoit Person The #7 issue on git-mediawiki's issue tracker [1] states that the abili= ty to preview content without pushing would be a nice thing to have. changes from v4: - Rebase on latest master - Typos in commits messages and code - Comments in Makefile - Factoring the conversion from relatives links to absolute ones in `git mw preview` - Updating that "conversion" mechanism to not convert links with an anchor '#'. - git-mw should be executable now. changes from v3: - Rewrite all commit messages. - No more "\ No newline at end of file". - Rename GitMediawiki.pm into Git::Mediawiki.pm (so it moves GitMedaw= iki.pm into Git/Mediawiki.pm). - Remove from the Makefile the copy_pm target (see below 'Add a bin-w= rapper'). - Use of 'install' insted of 'cp' in the Makefile. - Comment on the install_pm target in the Makefile. - Add a bin-wrapper for git to test scripts without 'make install'-in= g them. - Move verbose option handling from previous v3-4/4 (introduction of = preview tool) into v4-4/5 (introduction of git-mw). - Refactor some code into subroutines to clean the global 'preview' subroutine. - Rewrite some error messages to make them more concise while still g= iving the same amount of information. - Use 'remote.${remote_name}.mwIDcontent' instead of 'mediawiki.IDCon= tent' as config item for the lookup ID used to combine template + new con= tent. - Remove comments about what's going on in the preview subroutine. - Use 'clean_filename' (and not 'smudge_filename') in the preview too= l to find the correct mediawiki page name based on a filename. - Remove space/tab mixup in the 'help' subroutine. changes from v2: - Add a way to test, without installation, code that uses GitMediawik= i.pm. - Move more constants to GitMediawiki.pm - Remove the encapsulation of Git::config calls into a git_cmd_try on= e. - Remove the --blob option, distinction between files and blobs is no= w=20 automatic. - Add a --verbose option to output more information on what's going o= n. - Rewrote the doc and the commit message. - Rewrote of the template retrieving code (see 'get_template' sub). - Use a configuration variable to define the content ID search in the template. Default value set as 'bodyContent' since it seems more st= andard than 'mw-content-text'. - Final content is now saved as utf-8 to solve encoding issues. - Perlcritic changes:=20 - Update for loops style to a more perlish one. - All 'print's specify their output streams. --> Same useless warnings left in git-remote-mediawiki.perl after c= =C3=A9lestin's=20 work and git-mw.perl after this patch :) . changes from v1: - add new package GitMediawiki - move some of git-remote-mediawiki functions into the package - update git-remote-mediawiki to use those "moved" functions - add a hacky-way to install it in the Makefile - use it in the new git mw tool - add a way to give to the preview tool blobs as argument - add a fallback when the upstream's branch remote is not a mediawiki= remote - update the `autoload` option to use `git web--browse` and not `xdg-= open` - update the way we find the upstream's branch remote name This serie is based on the 'master' branch merged with c=C3=A9lestin's = patch series. [1] https://github.com/moy/Git-Mediawiki/issues/7 Benoit Person (5): git-remote-mediawiki: Introduction of Git::Mediawiki.pm git-remote-mediawiki: new git bin-wrapper for developement git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki git-remote-mediawiki: Adding git-mw command git-remote-mediawiki: Add preview subcommand into git mw. contrib/mw-to-git/Git/Mediawiki.pm | 100 ++++++++ contrib/mw-to-git/Makefile | 33 ++- contrib/mw-to-git/git | 25 ++ contrib/mw-to-git/git-mw.perl | 368 ++++++++++++++++++++= ++++++++ contrib/mw-to-git/git-remote-mediawiki.perl | 85 +------ 5 files changed, 535 insertions(+), 76 deletions(-) create mode 100644 contrib/mw-to-git/Git/Mediawiki.pm create mode 100755 contrib/mw-to-git/git create mode 100755 contrib/mw-to-git/git-mw.perl --=20 1.8.3.GIT