From: "Benoît Person" <benoit.person@ensimag.fr>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, "Célestin Matte" <celestin.matte@ensimag.fr>,
"Matthieu Moy" <matthieu.moy@grenoble-inp.fr>
Subject: Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing
Date: Tue, 11 Jun 2013 23:31:31 +0200 [thread overview]
Message-ID: <CAETqRCiJmnz_1yjwvyWx+=kPkt3M+vKk--CnS=rnQcDA4wMSmg@mail.gmail.com> (raw)
In-Reply-To: <20130609060807.GA8906@sigill.intra.peff.net>
The V2 is on the launchpad but I am still struggling with the code
factoring between git-mw.perl and git-remote-mediawiki.perl :/ .
On 9 June 2013 08:08, Jeff King <peff@peff.net> wrote:
>
> You could make a Git::MediaWiki.pm module, but installing that would
> significantly complicate the build procedure, and potentially be
> annoying for users. One trick I have done in the past is to concatenate
> bits of perl script together in the Makefile, like this:
>
> foo: common.pl foo.pl
> { \
> echo '$(PERL_PATH_SQ)' && \
> for i in $^; do \
> echo "#line 1 $src" && \
> cat $src \
> done \
> } >$@+
> mv $@+ $@
>
> That would conflict a bit with the way we chain to git's Makefile,
> though. I suspect you could do something complicated like build "foo.pl"
> from "common.pl" and "foo-main.pl", then chain to git's Makefile to
> build "foo" from "foo.pl".
I've implemented this one for now but after a real-life meeting with
Matthieu Moy we discussed the possibility to build a GitMediawiki.pm
module. It seems more "clean" than the concatenation of perl scripts.
Plus, it would force people to limit side effects inside the functions
used in this package/utils file (I have in mind the mw_connect_maybe
function here and a couple of others which directly *hope* for global
vars to be set to a nice value before being called).
What I find bad in the concatenating-thingy is the mandatory rename of
git-mw.perl into something like git-mw.unmerged.perl and
git-remote-mediawiki.perl into git-remote-mediawiki.unmerged.perl.
Otherwise, like you said, it would be hard to chain to git's Makefile
after the merge.
For now, I have really no idea which one is the best. If I may ask,
what did you have in mind while saying:
> You could make a Git::MediaWiki.pm module, but installing that would
> significantly complicate the build procedure, and potentially be
> annoying for users.
?
Since my previous commit (ea07ec1 in next - use Git.pm functions for
credentials), git-remote-mediawiki.perl already depends on the proper
installation of the Git.pm package. In what ways the need for the
installation of yet another package (GitMediawiki.pm) would annoy a
user ?
Thank you for your time,
Benoit
next prev parent reply other threads:[~2013-06-11 21:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 21:50 [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing benoit.person
2013-06-08 19:00 ` Matthieu Moy
2013-06-09 6:12 ` Jeff King
2013-06-09 6:08 ` Jeff King
2013-06-09 11:01 ` Matthieu Moy
2013-06-09 12:18 ` Benoît Person
2013-06-09 18:13 ` Jeff King
2013-06-09 12:35 ` Benoît Person
2013-06-09 14:37 ` Matthieu Moy
2013-06-09 18:32 ` Jeff King
2013-06-11 21:31 ` Benoît Person [this message]
2013-06-11 21:37 ` Jeff King
2013-06-12 6:55 ` Matthieu Moy
2013-06-12 8:55 ` 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAETqRCiJmnz_1yjwvyWx+=kPkt3M+vKk--CnS=rnQcDA4wMSmg@mail.gmail.com' \
--to=benoit.person@ensimag.fr \
--cc=celestin.matte@ensimag.fr \
--cc=git@vger.kernel.org \
--cc=matthieu.moy@grenoble-inp.fr \
--cc=peff@peff.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).