git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC 3/4] git-mw: Adding git-mw.perl script

From
BPBenoît Person <benoit.person@ensimag.fr>
Date
Jun 15, 2013, 13:22 UTC
Message-ID
<CAETqRCidQpBu-Ws7wQ3xx73ozu0OQeeM7atptYg=ei8ZUXRbsA@mail.gmail.com>
In-Reply-To
<vpq4nd2rwq1.fsf@anie.imag.fr>

The V3 is ready, but I am still not sure about what is the best way to do it for this issue though.

On 13 June 2013 15:01, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
> benoit.person@ensimag.fr writes:
> How does the "make" Vs "make install" work? How does a developer run the
> tool without installing?
Well it does not work without installing but I think you know that now :)
Show 39 quoted lines
> I first tried:
>
> $ ../../bin-wrappers/git mw
> git: 'mw' is not a git command. See 'git --help'.
>
> Then, this first seem OK:
>
> $ ./git-mw
> usage: git mw <command> <args>
>
> git mw commands are:
>     Help        Display help information about git mw
>     Preview     Parse and render local file into HTML
>
> BUT, this will take the installed GitMediawiki.pm if it is available,
> and we don't want this (if one hacks GitMediawiki.pm locally, one wants
> the new hacked to be taken into account without "make install"ing it).
>
> To understand better how it works, try adding this in git-mw.perl:
>
>   print "$_\n" for @INC;
>
> I get this:
>
> /home/moy/local/usr-squeeze/share/perl/5.14.2
> /home/moy/local/usr-squeeze/src/MediaWiki-API-0.39/blib/lib
> /etc/perl
> /usr/local/lib/perl/5.14.2
> /usr/local/share/perl/5.14.2
> /usr/lib/perl5
> /usr/share/perl5
> /usr/lib/perl/5.14
> /usr/share/perl/5.14
> /usr/local/lib/site_perl
> .
>
> The '.' is there, but it comes after the hardcoded
> /home/moy/local/usr-squeeze/share/perl/5.14.2 (which has to comes first,
> to let the install version be robust to whatever comes after).
Thanks for the explanations
> I think you need an equivalent of Git's toplevel bin-wrappers/git, or
> perhaps use the same bin-wrapper/git but let "make install" in
> contrib/mw-to-git/ install GitMediawiki.pm in perl/blib/lib
Typo s/make install/make/ ?

For now, I have implemented that one : each time you do `make`, if there is changes in GitMediawiki.pm, it gets copied to $GITPERLLIB (perl/blib/lib). But I am not sure it's the best approach here. If we want something entirely self-contained for GitMediawiki, creating a new git wrapper seems like the best way. But then, we could say that since GitMediawiki Makefile uses Git toplevel Makefile, it's not entirely self-contained :/ maybe it's the "copying file" that makes it weird ?

> BTW, I just noticed we had a Git::SVN, so perhaps GitMediawiki should be
> Git::MediaWiki.

For that one, I am not really sure Git::Mediawiki makes more sense than GitMediawiki. The point of the GitMediawiki.pm package is to contain all the stuff for the bidirectionnal-thingy. So they are not really Git-related, nor Mediawiki-related. Making it part of a "Git" directory / namespace does not really feels right, even if it's how it's done for SVN :/ .

Thank you for the all the reviews, (it works for Ensiwiki now \o/)
Benoit Person
Previous: Matthieu MoyNext: Matthieu Moy
Message 7 of 17 in “git-remote-mediawiki: new tool to preview local changes without pushing”
  1. 0/4 git-remote-mediawiki: new tool to preview local changes without pushingbenoit.person@ensimag.fr, Jun 13, 2013
  2. 1/4 git-mw: Introduction of GitMediawiki.pmbenoit.person@ensimag.fr, Jun 13, 2013
  3. Matthieu MoyJun 13, 2013
  4. 2/4 git-mw: Moving some functions from git-remote-mediawiki.perl to GitMediawiki.pmbenoit.person@ensimag.fr, Jun 13, 2013
  5. 3/4 git-mw: Adding git-mw.perl scriptbenoit.person@ensimag.fr, Jun 13, 2013
  6. Matthieu MoyJun 13, 2013
  7. Benoît PersonJun 15, 2013
  8. Matthieu MoyJun 16, 2013
  9. Matthieu MoyJun 24, 2013
  10. Junio C HamanoJun 24, 2013
  11. Matthieu MoyJun 24, 2013
  12. Jeff KingJun 24, 2013
  13. Benoit PersonJun 24, 2013
  14. Junio C HamanoJun 24, 2013
  15. 4/4 git-mw: Adding preview tool in git-mw.perlbenoit.person@ensimag.fr, Jun 13, 2013
  16. Matthieu MoyJun 13, 2013
  17. Matthieu MoyJun 13, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.