From: Jeff King <peff@peff.net>
To: Jeremie Nikaes <jeremie.nikaes@ensimag.imag.fr>
Cc: git@vger.kernel.org,
"Arnaud Lacurie" <arnaud.lacurie@ensimag.imag.fr>,
"Claire Fousse" <claire.fousse@ensimag.imag.fr>,
"David Amouyal" <david.amouyal@ensimag.imag.fr>,
"Matthieu Moy" <matthieu.moy@grenoble-inp.fr>,
"Sylvain Boulmé" <sylvain.boulme@imag.fr>
Subject: Re: [PATCHv3 1/2] Add a remote helper to interact with mediawiki, pull & clone handled
Date: Thu, 9 Jun 2011 20:21:38 -0400 [thread overview]
Message-ID: <20110610002137.GA11585@sigill.intra.peff.net> (raw)
In-Reply-To: <1307625360-10973-1-git-send-email-jeremie.nikaes@ensimag.imag.fr>
On Thu, Jun 09, 2011 at 03:15:59PM +0200, Jeremie Nikaes wrote:
> Partial cloning is supported using the following syntax :
> "git clone mediawiki::http://wikiurl##A_Page##Another_Page"
> As always, this url is kept in .git/config, helping to always keep
> track of these specific pages
Earlier today I posted a 10-patch series to allow git to handle
something like:
git clone \
-c mediawiki.page=GitWorkflows \
-c mediawiki.page=Tig \
https://git.wiki.kernel.org
and set that config into the .git/config file. The patch for the
mediawiki helper to actually read and use it (instead of the "##" syntax
in the url) is just:
---
diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki
index fd26f87..75c3537 100755
--- a/contrib/mw-to-git/git-remote-mediawiki
+++ b/contrib/mw-to-git/git-remote-mediawiki
@@ -11,10 +11,9 @@ use warnings;
my $slash_replacement = "%2F";
my $remotename = $ARGV[0];
-# Current syntax to fetch only a set of pages mediawiki::http://mediawikiurl##A_Page##Another_Page
-my @pages_titles = split(/##/,$ARGV[1]);
-my $url = shift (@pages_titles);
-
+my $url = $ARGV[1];
+my @pages_titles = `git config --get-all mediawiki.page`;
+chomp @pages_titles;
# commands parser
my $entry;
next prev parent reply other threads:[~2011-06-10 0:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 13:15 [PATCHv3 1/2] Add a remote helper to interact with mediawiki, pull & clone handled Jeremie Nikaes
2011-06-09 13:16 ` [RFC/PATCH 2/2] Git-remote-mediawiki: Add push support Jeremie Nikaes
2011-06-09 17:15 ` Junio C Hamano
2011-06-09 14:03 ` [PATCHv3 1/2] Add a remote helper to interact with mediawiki, pull & clone handled Sverre Rabbelier
2011-06-09 14:30 ` Jérémie NIKAES
2011-06-09 14:32 ` Sverre Rabbelier
2011-06-09 22:44 ` Jeff King
2011-06-10 0:21 ` Jeff King [this message]
2011-06-10 6:31 ` Arnaud Lacurie
2011-06-10 7:22 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110610002137.GA11585@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=arnaud.lacurie@ensimag.imag.fr \
--cc=claire.fousse@ensimag.imag.fr \
--cc=david.amouyal@ensimag.imag.fr \
--cc=git@vger.kernel.org \
--cc=jeremie.nikaes@ensimag.imag.fr \
--cc=matthieu.moy@grenoble-inp.fr \
--cc=sylvain.boulme@imag.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).