Git development
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Célestin Matte" <celestin.matte@ensimag.fr>
Cc: git@vger.kernel.org, benoit.person@ensimag.fr
Subject: Re: [PATCH RFC] git-remote-mediawiki: push-by-rev
Date: Sun, 16 Jun 2013 22:49:16 +0200	[thread overview]
Message-ID: <vpq8v29eq7n.fsf@anie.imag.fr> (raw)
In-Reply-To: <1371414499-13027-1-git-send-email-celestin.matte@ensimag.fr> ("Célestin Matte"'s message of "Sun, 16 Jun 2013 22:28:18 +0200")

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/

      parent reply	other threads:[~2013-06-16 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-16 20:28 [PATCH RFC] git-remote-mediawiki: push-by-rev Célestin Matte
2013-06-16 20:28 ` Célestin Matte
2013-06-16 20:49 ` Matthieu Moy [this message]

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=vpq8v29eq7n.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=benoit.person@ensimag.fr \
    --cc=celestin.matte@ensimag.fr \
    --cc=git@vger.kernel.org \
    /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