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

Re: [PATCH RFC] git-remote-mediawiki: push-by-rev

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 16, 2013, 20:49 UTC
Message-ID
<vpq8v29eq7n.fsf@anie.imag.fr>
In-Reply-To
<1371414499-13027-1-git-send-email-celestin.matte@ensimag.fr>
Célestin Matte <celestin.matte@ensimag.fr> writes:
> This uses subroutines used by the fetch-by-rev strategy. I'm not sure it's
> actually complete: can it be that simple?
The function says:
  # Get the last remote revision without taking in account which pages are
  # tracked or not. This function makes a single request to the wiki thus
  # avoid a loop onto all tracked pages. This is useful for the fetch-by-rev
  # option.
  sub get_last_global_remote_rev {
  ...

So I don't think this would work when you track only a subset of pages. If an untracked page has been modified, then the global last revision has increased and you'll get a non-fast forward. If you try to pull, it'll tell you there's nothing to import.

You'd have to iterate through revisions between the one given by get_last_global_remote_rev and the last one the local repo knows about, and remove ones touching untracked pages from the list.

> However, I tested on a local wiki and it seemed to work perfectly.
> Should I add associate tests?

See what t/t9364-pull-by-rev.sh does. You can set pushStrategy too in the same file (this won't test all push/pull combinations, but push and pull should be independant enough, so testing both unset and both set should be enough).

Not sure we have enough test for push with a subset of pages though.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Célestin Matte
Message 3 of 3 in “git-remote-mediawiki: push-by-rev”
  1. git-remote-mediawiki: push-by-revCélestin Matte, Jun 16, 2013
  2. git-remote-mediawiki: push-by-revCélestin Matte, Jun 16, 2013
  3. Matthieu MoyJun 16, 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.