merging special txt files
TK Soh
teekaysoh at gmail.com
Sat Oct 16 07:53:45 UTC 2010
On Sat, Oct 16, 2010 at 12:37 PM, TK Soh <teekaysoh at gmail.com> wrote:
> On Sat, Oct 16, 2010 at 11:53 AM, Steve Borho <steve at borho.org> wrote:
>> On Fri, Oct 15, 2010 at 10:37 PM, TK Soh <teekaysoh at gmail.com> wrote:
>>> On Fri, Oct 15, 2010 at 7:09 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>>>> On 10/15/2010 06:31 AM, TK Soh wrote:
>>>>>
>>>>> One thing I can think of is to add a --merge-tool option to 'hg
>>>>> resolve'. In my case, most the time the merge will result in conflicts
>>>>> (or I can perhaps fake one if necessary), so I can then try resolve
>>>>> the conflict using the custom merge tool via --merge-tool option. To
>>>>> me this option sound like a reasonable one, since most conflict
>>>>> probably mean the default (pre-configured) tools are not able to
>>>>> handled it, and hence another tool or solution is required.
>>>>
>>>> It is already possible with
>>>> HGMERGE=tool hg resolve file
>>>> or
>>>> hg resolve --config ui.merge=tool file
>>>
>>> This is actually what I am doing already. But it's clumsy and only
>>> possible on command line (a significant of our users are on Windows)
>>>
>>>> A mere elegant syntax could however be nice.
>>>
>>> Indeed. But ultimately I'd like to see something more flexible,
>>> including a way to allow user to select the merge tool via some
>>> configurable mean and/or interactively. Perhaps the TortoiseHg team
>>> can work out something magical.
>>
>> I'm working on a patch that adds --tool arguments to merge and
>> resolve. With any luck it will make it into 1.7.
>
> hg resolve works on files, so the --tool args will have a more
> meaningful use. I wonder how it help on hg merge, which does not
> operate on files.
>
>> TortoiseHg has supported a similar feature for ages. You just need to
>> make the initial merge fail (setting ui.merge = internal:fail in your
>> config is the canonical way). Then from the commit tool you can chose
>> any detected merge tool to resolve each file, via the file's context
>> menu.
>
> I'll take a look. But offhand making the merge fail (on all files)
> using ui.merge = internal:fail isn't very practical, since only some
> (in my case, only a small number of them) files require special merge
> tool.
I just did a quick trial. Pretty nice. At least it should serve my
purpose for now. I wonder if you use the ui.merge trick also, or
something more interesting.
OT: I noticed the commit button is not disabled when there are
unresolved conflicts. Right now clicking on commit will bring up a
warning dialog. Though I feel it should probably just be disabled
until all conflicts are resolved.
>> I think the 2.0 (Qt) version of THG will operate in this manner by
>> default. The merge command will be told to fail all merges, then
>> unresolved files will be presented to the user for them to resolve at
>> their leisure. They'll be able to pick which tool they want to use
>> for each file.
>>
>>
>> Steve Borho
>>
>
More information about the Mercurial
mailing list