[PATCH 1 of 1] mq: abort when pull add changeset over mq patches

Pierre-Yves David pierre-yves.david at logilab.fr
Thu Mar 17 05:28:00 CDT 2011

On Wed, Mar 16, 2011 at 03:53:06PM +0100, Martin Geisler wrote:
> Pierre-Yves David <pierre-yves.david at ens-lyon.org> writes:
> >      if repo.local():
> >          repo.__class__ = mqrepo
> > +        ui.setconfig("hooks", "pretxnchangegroup.mq.safepull", mqhooksafepull)
> We discussed this a little at the Karlruhe sprint and I said I don't
> like it when extensions enable hooks. Back then I could only think of
> how it is annoying when hooks pollute the settings namespace, but now I
> have another complaint: the abort message from a hook is quite different
> From a normal abort.

I agree with the ugly error message. But their is currently no other easy,
robust and elegant way to plug this change (for some value of easy, robust and
elegant I choosed)

> > +Pulling over standard changeset
> > +  [...]
> This just tests that 'hg pull' works? That is not necessary to test
> here, it's been tested thousands of times already in other tests,
> hopefully also in a test dedicated to this command :)

No. This do works that hg pull still works with mq enable. This is not test
elsewhere. Moreover it test that hg pull with patches applied works if not
pulled changeset interact with applied patches. This test is necessary.

> > +Pulling over mq changeset
> > [...]
> Also, it should be easy enough toincorporate the above in one of the other mq tests, no?

This could go into ``test-mq-safety.t`` but the current size of this test-mq test-file is pretty standard. Do you really think it's necessary ?

> It should also be possible to move the other tests to existing test
> cases: take a repo with mq pathces applied, clone it a bit way from the
> tip and add some new changestes. Now pull from the clone back into the
> repo with patches and you should see the abort.

I don't get you. This is already tested in this test file and I don't see any
other candidate than ``test-mq-safety.t`` (aka the same that the above) to
receive them

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110317/bc4037f2/attachment.pgp>

More information about the Mercurial-devel mailing list