[PATCH] merge: let the user choose to merge, keep local or keep remote subrepo revisions

Angel Ezquerra angel.ezquerra at gmail.com
Thu Sep 26 17:09:43 CDT 2013


On Thu, Sep 26, 2013 at 3:58 PM, Augie Fackler <raf at durin42.com> wrote:
>
> On Sep 25, 2013, at 2:20 AM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote:
>
>> On Wed, Sep 25, 2013 at 6:00 AM, Kevin Bullock
>> <kbullock+mercurial at ringworld.org> wrote:
>>> On 7 Sep 2013, at 12:09 AM, Angel Ezquerra wrote:
>>>
>>>> # HG changeset patch
>>>> # User Angel Ezquerra <angel.ezquerra at gmail.com>
>>>> # Date 1378420708 -7200
>>>> #      Fri Sep 06 00:38:28 2013 +0200
>>>> # Node ID 15548e5b1c00bd2f261e3c81d39f2465263bc3c3
>>>> # Parent  1d07bf106c2ad1c7ef5e257e754ca8d858bd04b0
>>>> merge: let the user choose to merge, keep local or keep remote subrepo revisions
>>>
>>> Fails tests:
>>
>> Sorry about that. I did not have git nor svn installed on my machine.
>> I installed them, re ran the tests and fixed them. I'll send an
>> updated patch in a minute.
>>
>> BTW, in the last "note" on the commit message I said:
>>
>> "I don't know of a way to test the "keep local" and "keep remote" options (i.e.
>> to force the test to choose those options)."
>>
>> Is that a problem? I tested it manually and it does work fine, but I'd
>> rather have an automated test. The problem is that I don't know of a
>> way to tell run-tests to answer "l" or "r" to the prompt that asks
>> which subrepo revision to use?
>
> HGMERGE=internal:local
> or
> HGMERGE=internal:other
>
> might help?

I'm no expert on that part of the code but I believe that the
internal:xxx tools are only used by filemerge, and thus they are not
taken into account by subrepo.merge. Perhaps it should take them into
account?

That being said, the ideal solution to the problem of testing the "l"
and "o" answers to the merge prompt would be to be able to chose the
answer to the prompt on a prompt by prompt basis. However I don't
think there is a way to do that. I checked Brodie Rao's cram tool
documentation (https://pypi.python.org/pypi/cram) which is based on
mercurial's unified test format, hoping that it might suggest of a way
to do this but it seems there isn't. Perhaps Brodie or Matt can give
their two cents?

Cheers,

Angel


More information about the Mercurial-devel mailing list