Strategies for push/merge problem?

Martin Geisler mg at daimi.au.dk
Tue Jul 15 13:03:42 CDT 2008


Douglas Philips <dgou at mac.com> writes:

> On or about 2008 Jul 15, at 12:04 PM, Martin Geisler indited:
>> There is no need to compress things to a *single* changeset.
>> ... MQ example elided...
>> It is then a matter of going back and forth between the two patches
>> and updating them until the code align with the tests. When the two
>> patches are converted back to Mercurial changesets you get what
>> Adrian wants while still having written the tests before the code.
>
> I'm a little confused here, when you say: "converted back to
> Mercurial changesets" that seems to imply more than one, but I am
> still not seeing how to get what Adrian wants without them being
> converted back to one changeset...

If I have understood Adrian correctly, then he wants the test suite to
pass at every changeset. So the first changeset adds the new
functionality (without making any of the existing tests fail) and the
second changeset add tests for the new functionality.

The test suite never breaks -- people can do 'hg bisect' and trust
that a failure is because of an error, not just because one hit a
"bad" commit which was not meant to be tested.

>> The constant qpop/qpush takes a bit to get used to, but I find it
>> okay to work with.
>
> qrecord (if it existed)... letting me put the different hunks into
> different patches, would be a way to avoid that. (As I understand
> it, the reason for the qpush/qpop dancin' is to get the hunks into
> the right paches?)

Yes -- it is so that qrefresh affects the right patch.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.


More information about the Mercurial mailing list